tweb
tweb copied to clipboard
[BUG] Using local ip access produces Uncaught ReferenceError: caches is not defined?
Describe the bug After modifying the local IP access, the console reports "mtproto.worker.62fa4c2af74d47fd0011.bundle.worker.js:3498 Uncaught ReferenceError: caches is not defined",I tried to replace localhost with my local ip, and the WORKER ERROR was triggered. To Reproduce Steps to reproduce the behavior:
- Modify the start command in package.json
- Add --host=0.0.0.0 to start the service,
"start": "node --max-old-space-size=12048 node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack.dev.js --host=0.0.0.0",
- View Google Chrome Console
- See error
Expected behavior Console no longer outputs WORKER ERROR, mtproto.worker.62fa4c2af74d47fd0011.bundle.worker.js:3498 Uncaught ReferenceError: caches is not defined
Screenshots
Desktop (please complete the following information):
- OS: [windows10]
- Browser [chrome]
- Version [100.0.4896.127]
Additional context
[0.486] [API-PROXY] [
Same error. Do you solved that?
After doing some research, I find out that: Chrome and Safari only expose CacheStorage to the windowed context over HTTPS (Ref: https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage), so it's failed since I've not setup HTTPS yet.
I consider this as a bug since I always test the functionality of the service before doing some advanced kinds of stuff (reverse proxy, https...etc), so I think it's abnormally to have this error and hope this can be fixed.
In order to host it, you have to use HTTPS, otherwise app won't work. You can use self-signed certificate (although some functions still won't work).