-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
reference error in PWA serviceworker #7372
Comments
Would you please add some more information like used Firefox version and OS, screenshoot, or a way to reproduce? I've tried on my local machine and on https://try.gitea.io with Ubuntu 18 and FF 67.0.4 (64-Bit). Unluckily (or luckily) I don't got any error from service worker. Additionally I tried to manually uninstall SW, disable/re-enable cache, to force update of SW. Thanks |
FF 67.0.4 (64-bit), macOS 10.14.5, and I am getting same output as @Cherrg on try.gitea.io |
UPD: that Firefox has |
@Oreolek is this something that you changed? My FF says what I have it set to is the default. |
yes |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
We don't really gain anything from it except the client-side caching which is a problem better solved on HTTP level. Gitea is not a PWA and will not do anything useful in a offline scenario without having access to the server. This should also resolve issues seen with the serviceworker interfering on SSE requests. The only API we can not use without a service worker is push notifications while the "app" is closed but the more established HTML Notification API will be a alternative. Fixes: go-gitea#11092 Fixes: go-gitea#8056 Fixes: go-gitea#7372
Instead of statically hardcoding every frontend asset, this uses a type-based approach to cache all js,css and manifest.json requests. This also fixes the issue that the service worker was interfering with EventSource because it was unconditionally handling all requests which this new implementation doesn't. Fixes: go-gitea#11092 Fixes: go-gitea#7372
* Move serviceworker to workbox and fix SSE interference Instead of statically hardcoding every frontend asset, this uses a type-based approach to cache all js,css and manifest.json requests. This also fixes the issue that the service worker was interfering with EventSource because it was unconditionally handling all requests which this new implementation doesn't. Fixes: #11092 Fixes: #7372 * rethrow error instead of logging * await .register * Revert "rethrow error instead of logging" This reverts commit 043162b. * improve comment * remove JSRenderer * add version-based cache invalidation * refactor * more refactor * remove comment * rename item to fit cache name Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Move serviceworker to workbox and fix SSE interference Instead of statically hardcoding every frontend asset, this uses a type-based approach to cache all js,css and manifest.json requests. This also fixes the issue that the service worker was interfering with EventSource because it was unconditionally handling all requests which this new implementation doesn't. Fixes: go-gitea#11092 Fixes: go-gitea#7372 * rethrow error instead of logging * await .register * Revert "rethrow error instead of logging" This reverts commit 043162b. * improve comment * remove JSRenderer * add version-based cache invalidation * refactor * more refactor * remove comment * rename item to fit cache name Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Move serviceworker to workbox and fix SSE interference Instead of statically hardcoding every frontend asset, this uses a type-based approach to cache all js,css and manifest.json requests. This also fixes the issue that the service worker was interfering with EventSource because it was unconditionally handling all requests which this new implementation doesn't. Fixes: #11092 Fixes: #7372 * rethrow error instead of logging * await .register * Revert "rethrow error instead of logging" This reverts commit 043162b. * improve comment * remove JSRenderer * add version-based cache invalidation * refactor * more refactor * remove comment * rename item to fit cache name Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
* Move serviceworker to workbox and fix SSE interference Instead of statically hardcoding every frontend asset, this uses a type-based approach to cache all js,css and manifest.json requests. This also fixes the issue that the service worker was interfering with EventSource because it was unconditionally handling all requests which this new implementation doesn't. Fixes: go-gitea#11092 Fixes: go-gitea#7372 * rethrow error instead of logging * await .register * Revert "rethrow error instead of logging" This reverts commit 043162b. * improve comment * remove JSRenderer * add version-based cache invalidation * refactor * more refactor * remove comment * rename item to fit cache name Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
ReferenceError: caches is not defined
- serviceworker.js, line 60.Appeared in #4730 PR, reproducible on https://try.gitea.io if you load Gitea in Firefox. Firefox doesn't have the
caches
variable.The text was updated successfully, but these errors were encountered: