-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
WASM/nodejs throws "Io Error: operation not supported on this platform" if HTML has link to google fonts api #264
Comments
Hi @glove99 Thank you for reporting and sorry for the confusing error message! The issue is that our core crate sends requests via Probably, the solution will be to switch to |
Ah that makes sense. Here is a simple test case that fails:
|
BTW, while debugging this problem I dived into your project code. Really impressive. I always love learning I don't know near as much as I thought I did. 😄 |
@glove99 Sorry for the delay! Thank you for the reproduction code! Happy to hear that you found the source code useful :) Let me know if you have any questions about it, I'd be happy to chat :) On the issue side - I will fix the ongoing build failure and then look into switching the library that makes requests in the core crate first (maybe in a couple of weeks) and then will update the WASM bindings. |
FWIW, I updated the error text, so it clearly communicates the current state of things. Network requests are not supported on WASM now (though they work in the new, not yet released Though, it should be possible, here is an example with |
My HTML has links to google font apis:
Running
inline()
will throw an UnhandledPromiseRejection and kill the nodejs app. The error message is "Io Error: operation not supported on this platform". I replicated on MacOS and a RHEL container.If I set
load_remote_stylesheets: false
then the problem stops.Not sure if there is something specific about the google font api or a larger problem with loading remote stylesheets.
The text was updated successfully, but these errors were encountered: