-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
pThreads: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed. #14089
Comments
I'm willing to bet that this part is broken somehow maybe because I have everything in single file??
|
Found this, https://stackoverflow.com/questions/63698319/the-module-variables-mechanism-in-emscripten-while-compiling-pthread-to-worke and this comment,
I'm not sure what should I do. Should I create a post processing script to copy the whole file again into Module['mainScriptUrlOrBlob'] as a blob? Why the compiler don't provide an option for this? I have both worker and the main in same file but the whole file loaded via Blob .. |
Ahahaha I found existing thread on this (Thanks to Github Search),
|
I upgraded to the latest version but I still can't fix the damn thing...I am not sure what should I do .. |
I love this..
The fix for this error is here in case anyone came across |
I've never seen that The PR you mention was closed, and reading it now, I don't think it was needed, so I don't understand the last point either. |
Overload resolution failed means that the URL.createObjectURL(e.data.urlOrBlob) received undefined value. You can try this on Chrome console and you will see the error,
The worker file has no checking for undefined values. |
If you Google this, "emscripten Failed to execute 'createObjectURL' on 'URL': Overload resolution failed" You will find a lot of posts seeking help (including this) to debug because the error is ambiguous |
@jeffRTC Have you solved it? |
@Alexufo No, In my case, I gotten close to fixing this, but it turns out Emscripten lack test cases for |
@jeffRTC I solved it in my case. You have a wrong worker initialisation config I suppose. try it in your worker
And you must compile with more info https://web.dev/webassembly-threads/ |
template solved method: change this code:
|
I am also running into this issue because I have a service-worker that is caching resources (this also allows me to enable CrossOriginIsolation & sharedArrayBuffers for pthreads). The last solution from @engineer1109 works for me, but I would prefer not to change the generated js bindings. Is there a way to set the |
console-----------ERROR TypeError: Failed to execute 'createObjectURL' on 'URL': Overload resolution failed. |
@Anandk0801 that doesn't looks like emscripten-related code. As of #21701 we no longer need |
This line
var objectUrl = URL.createObjectURL(e.data.urlOrBlob);
in the worker file generated by Emscripten cause this error on my browser (Chrome). I don't know the exact reason for this.I compiled with
-s USE_PTHREADS=1
and-s PTHREAD_POOL_SIZE=1
The worker file is inlined but I don't think that causing this issue.
The text was updated successfully, but these errors were encountered: