You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which @angular/* package(s) are the source of the bug?
service-worker
Is this a regression?
No
Description
I was trying to use a service worker to deliver prompt updates to users actively using the site. Followed the simple steps laid out in: https://angular.io/guide/service-worker-getting-started but I'm having issues with the initial load of the site.
Those are the only changes I made to the application. But it seems a total crapshoot if the service worked is actually linked to the SwUpdate service the first time you navigate to the page.
Sometimes it looks like:
Which is great, the checkForUpdate is returning a value and when I deploy a new version I see the dialog and can refresh.
But sometimes on initial load instead I get this:
The app is apparently still stable, and I can see the SW is registered in the Application tab of the chrome dev tools. But the checkForUpdate promise doesn't actually do anything, it doesn't resolve or reject. And new deployments are never detected.
All of the first load testing is done through new instances of the chrome incognito windows.
Refreshing the page does return this to working correctly, but it would be great if the checkForUpdate() promise would work consistently for first time users as well.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version)
I am seeing this issue as well, but it only happens when a user performs a hard refresh (ctrl F5). App is stable, just checkForUpdate() never resolves or rejects.
Which @angular/* package(s) are the source of the bug?
service-worker
Is this a regression?
No
Description
I was trying to use a service worker to deliver prompt updates to users actively using the site. Followed the simple steps laid out in: https://angular.io/guide/service-worker-getting-started but I'm having issues with the initial load of the site.
My app.config looks like:
The service watching for updates:
And my app.component is:
Those are the only changes I made to the application. But it seems a total crapshoot if the service worked is actually linked to the SwUpdate service the first time you navigate to the page.
Sometimes it looks like:
![image](https://private-user-images.githubusercontent.com/11820009/332572014-e68f72f2-a0f5-4fb1-8638-9b1c0658992e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4NjQ0NDcsIm5iZiI6MTcxODg2NDE0NywicGF0aCI6Ii8xMTgyMDAwOS8zMzI1NzIwMTQtZTY4ZjcyZjItYTBmNS00ZmIxLTg2MzgtOWIxYzA2NTg5OTJlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIwVDA2MTU0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwOWZlOGZhNzkxMWM3Y2U1ZTlmM2NmZjVkMTc0YTUyOTc3ZDhhYTJjNzY5ZjdmNmQ5ZWNlMTJjOGI0MzBjNjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.jQ5_It9oBOSgHNME4y92aBivu1umd1jWdAlEutxnlZo)
Which is great, the
checkForUpdate
is returning a value and when I deploy a new version I see the dialog and can refresh.But sometimes on initial load instead I get this:
![image](https://private-user-images.githubusercontent.com/11820009/332572036-8f5c8ade-9a33-4803-8a76-50270c3002fc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTg4NjQ0NDcsIm5iZiI6MTcxODg2NDE0NywicGF0aCI6Ii8xMTgyMDAwOS8zMzI1NzIwMzYtOGY1YzhhZGUtOWEzMy00ODAzLThhNzYtNTAyNzBjMzAwMmZjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA2MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNjIwVDA2MTU0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg5OGRjNzI4ODUzM2JiOTJhYzRkYTMzM2MzNjc0ODY2MWFiMDFjNTk0YjIxMzIzMGU5ZTc4N2Q4ODA1NmFkYjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.T3kZchdjkSARPrm7XNrLwqo_IHQdS8ipc-wVlpvH7rM)
The app is apparently still stable, and I can see the SW is registered in the Application tab of the chrome dev tools. But the
checkForUpdate
promise doesn't actually do anything, it doesn't resolve or reject. And new deployments are never detected.All of the first load testing is done through new instances of the chrome incognito windows.
Refreshing the page does return this to working correctly, but it would be great if the
checkForUpdate()
promise would work consistently for first time users as well.Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: