-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PWA endpoint errors while called from SW #2867
Closed
krissvaa opened this issue
Oct 24, 2024
· 1 comment
· Fixed by #2900 · May be fixed by vaadin/flow-hilla-common#16, vaadin/flow#20470 or #2901
Closed
PWA endpoint errors while called from SW #2867
krissvaa opened this issue
Oct 24, 2024
· 1 comment
· Fixed by #2900 · May be fixed by vaadin/flow-hilla-common#16, vaadin/flow#20470 or #2901
Labels
bug
Something isn't working
hilla
Issues related to Hilla
prerelease version for Hilla 24.6.0
Released with Hilla 24.6.0.beta2
Comments
krissvaa
added a commit
that referenced
this issue
Nov 4, 2024
krissvaa
added a commit
to vaadin/flow-hilla-common
that referenced
this issue
Nov 11, 2024
krissvaa
added a commit
to vaadin/flow-hilla-common
that referenced
this issue
Nov 11, 2024
krissvaa
added a commit
that referenced
this issue
Nov 11, 2024
This was referenced Nov 11, 2024
krissvaa
added a commit
that referenced
this issue
Nov 11, 2024
krissvaa
added a commit
that referenced
this issue
Nov 12, 2024
krissvaa
added a commit
that referenced
this issue
Nov 13, 2024
krissvaa
added a commit
that referenced
this issue
Nov 13, 2024
krissvaa
added a commit
that referenced
this issue
Nov 13, 2024
krissvaa
added a commit
that referenced
this issue
Nov 13, 2024
krissvaa
added a commit
that referenced
this issue
Nov 13, 2024
krissvaa
added a commit
that referenced
this issue
Nov 13, 2024
krissvaa
added a commit
that referenced
this issue
Nov 13, 2024
krissvaa
added a commit
that referenced
this issue
Nov 13, 2024
Env should be optional for other frameworks Fixes #2867
krissvaa
added a commit
that referenced
this issue
Nov 13, 2024
krissvaa
added a commit
to vaadin/flow
that referenced
this issue
Nov 14, 2024
krissvaa
added a commit
that referenced
this issue
Nov 15, 2024
This ticket/PR has been released with Hilla 24.6.0.beta2 and is also targeting the upcoming stable 24.6.0 version. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
hilla
Issues related to Hilla
prerelease version for Hilla 24.6.0
Released with Hilla 24.6.0.beta2
Describe the bug
Some issues stop endpoints from being called from the Service Worker.
Most of the issues are that
window
ordocument
references are not available in the worker context.Which should be quite easy to solve:
hilla/packages/ts/frontend/src/Connect.ts
Line 21 in c7d4707
hilla/packages/ts/frontend/src/Connect.ts
Line 303 in c7d4707
hilla/packages/ts/frontend/src/CookieManager.ts
Line 8 in c7d4707
Then there are related to the same issue but more complicated issues:
__REGISTER__()
includes references towindow
- but is defined in a different placehttps://github.com/vaadin/hilla/blob/c7d4707995f2235574f48d84a8619ab038beb503/packages/ts/frontend/src/index.ts#L8C1-L8C16
ConnectionState
andConnectionIndicator
from@vaadin/common-frontend
also have references towindow
and need to be either fixed in their repo or clone+fixed in hilla separatelyhilla/packages/ts/frontend/src/Connect.ts
Line 2 in c7d4707
Lastly there is an issue with atmosphere.js and default exports to Vite. Atmosphere dependency could be excluded by SW Vite plugin or by finding a better fix for exclusion as I am not sure about this approach.
Missing CSRF token in calling endpoints is separated in an another issue: #2791
Expected-behavior
All DOM
window
ordocument
references should be prefixed withself.window && window...
orself.document && document...
(or some alternative) so that SW could run without encountering them.Reproduction
sw-app.zip
System Info
Hilla 24.5
The text was updated successfully, but these errors were encountered: