@PWA annotation does not create ServiceWorker and manifest
See original GitHub issueSetup: Vaadin 14.0.2, Java 11, OpenSuse 15.2
Hello, I am not sure if this is a bug or a misconfiguration on my side. I am having an application with multiple servlets, one is working with Vaadin 14 where a PWA is developed.
The connection is running over HTTPS.
I use the following PWA annotation in my MainView:
@Route("main") @PWA(name = "Test", shortName = "Test") public class MainView extends AppLayout implements RouterLayout, BeforeEnter
If I access my application/sw.js there is no ServiceWorker found. Firefox also does not recognize the ServiceWorker. No installation window is shown. The Vaadin Bakery example worked fine in the browser. I could see the ServiceWorker in Firefox and access the .json over the application/sw.js.
Chrome Lighthouse confirmed that no ServiceWorker and manifest is running / was created.
My application is working fine, no errors there. Only the PWA part is not working.
I am not sure if only the ServiceWorker is effected by this or also the creation of the Webmanifest.
I would like to provide more information about this possible bug or the issue itself but I am not sure how.
If this is the wrong place for this ticket feel free to close it, please.
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (1 by maintainers)
Top GitHub Comments
@mkemmerz if
PwaConfiguration::isEnabled
returnsfalse
then it means thatPwaRegistry
has been created with anull
value forpwa
parameter. It means thatPWA
annotation has not been found. Even though you have the annotation on the class the functionality which searches for it was not able to find it.You mentioned here https://github.com/vaadin/flow/issues/6567#issuecomment-536868501 a custom servlet context class. I have a suspicion that the issue is caused by the custom servlet context. We have a code :
So the behavior may be cause by the behavior of the custom servlet context.
@mkemmerz The project setup seems quite complex. We would need a minimal project with the same setup to be able to reproduce the issue first.