-
Notifications
You must be signed in to change notification settings - Fork 937
webchannel-wrapper build process not compatible with web worker #285
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
Comments
We resolved the webchannel / Image issue separately. Can you try your workaround again and see if the webworker issue is resolved? If so, we can likely get your change implemented (if you're willing, a PR would be most appreciated :-)) |
i had the same error message with web workers, i tested the proposed change from @PCreations and it seems to work in web workers. |
Seems good now ! Maybe we can close this issue when the master branch is released :) |
Holler if anybody is still seeing issues! |
Uh oh!
There was an error while loading. Please reload this page.
Describe your environment
Describe the problem
When trying to use firestore inside a webworker, the window object is not set to the
self
variables, as it is for auth build process for example, thus making firestore to fail as if we were trying to use the browser sdk in a node environnement.I think the problem lies in the Closure compiler code of the webchannel-wrapper :
webchannel-wrapper/tools/build.js
When modifying this file, and
yarn link
ing the package manually, I get rid of the "nodejs" like error (k.setTimeout is not defined
, etc.) but some others pop out from browser.window dependent method likeImage
that are not defined in a webworker environnement (this error commes from the goog.net.WebChannel package).Any chance to add support for using firestore in webworker ?
The text was updated successfully, but these errors were encountered: