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
Describe the bug
A clear and concise description of what the bug is.
Using 4.7.5, when running a production build utilizing shared workers, socket.IO import causes a DOMException. Development builds and virtual environment (localhost) do not have this issue
To Reproduce
Create a shared worker within any react app, and import socketIO in the shared worker like so:
import { io } from 'socket.io-client';
In your react app, call this shared worker (can perform any task, the import is what causes the issue)
Run a production build using yarn
When opening the new production build, worker file will not run, and opening the console on the shared worker will look like this:
When removing the socket.io import and re-running the build, the worker will no longer throw this error.
Expected behavior
No importScripts error is thrown, and shared workers can open their own socket session.
Platform:
Device: Lenovo ThinkBook 15p
OS: Ubuntu
Additional context
Please note that a development build and a local environment will not throw this error in the shared worker. We discovered it only after we ran a production build using yarn
The text was updated successfully, but these errors were encountered:
Describe the bug
A clear and concise description of what the bug is.
Using 4.7.5, when running a production build utilizing shared workers, socket.IO import causes a DOMException. Development builds and virtual environment (localhost) do not have this issue
To Reproduce
In your react app, call this shared worker (can perform any task, the import is what causes the issue)
Run a production build using yarn
When opening the new production build, worker file will not run, and opening the console on the shared worker will look like this:
"Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'https://yourApp/static/js/static/js/3002.2646329c.chunk.js' failed to load."
When removing the socket.io import and re-running the build, the worker will no longer throw this error.
Expected behavior
No importScripts error is thrown, and shared workers can open their own socket session.
Platform:
Additional context
Please note that a development build and a local environment will not throw this error in the shared worker. We discovered it only after we ran a production build using yarn
The text was updated successfully, but these errors were encountered: