-
Notifications
You must be signed in to change notification settings - Fork 3
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
Unable to get worker running #7
Comments
It for some reason seems to be this issue: https://stackoverflow.com/questions/60836401/failed-to-execute-fetch-on-workerglobalscope |
The problematic line is https://github.com/dunnock/wasi-worker/blob/master/crates/wasi-worker-cli/js/src/worker.ts#L29 |
Apparently self.location is |
And thats because the way how web-sys yew loads workers: https://github.com/yewstack/yew/blob/master/yew/src/agent/worker/mod.rs#L91-L123 |
So I have a horrible workaround to make it work: First add this code to the worker.ts (THIS DOES NOT RESPECT SUBDIRECTORIES):
and secondly in yew you would need to disable their wasm loading. |
hi @MTRNord , thank you for digging into this and sorry you experienced this issue. Seems these caused by new changes with Yew, I will work on upgrading it. In regards to javascript error, as it's minified it's hard to tell which function is not able to load. If you compile JS adaptor in a dev mode it will have sourcemap:
then you would need to rebuild wasi-worker-cli from
|
Hi I can try that. I have a version that is updated at https://github.com/daydream-mx/wasi-worker/tree/yew-fork The fork of yew I use is based on the current master but has some minor changes like no bincode for worker to worker communication (It uses json as the stuff I pass only works with serde_json). I will get back to this in a few hours and give you hopefully a better log |
there is change in WASI specification in the rust std library with recent rust, hence wasi cannot load. I am currently trying to upgrade @wasmer/wasi first but got stuck with this issue atm wasmerio/wasmer-js#241 |
I have managed to upgrade to wasmer-js with a few workarounds, related to how typescript compiler to cjs interoperates with rollup.. I've pushed commit to branch https://github.com/dunnock/wasi-worker/tree/wasmer-0_11 that far, you may try to pull changes to your branch to validate that issue with wasm bindings sorted. I've also tested this on wabench (which is still old version of yew) |
Hi I have a yew worker (I updated this to the latest yew) but I am getting some errors:
I did not modify any of the JS stuff. I only updated the yew crate in here. I have no comparison with the version in this repo.
Any hints?
The text was updated successfully, but these errors were encountered: