Skip to content
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

EMSCRIPTEN: HTTP requests are not working #563

Open
mgerhardy opened this issue Dec 9, 2024 · 1 comment
Open

EMSCRIPTEN: HTTP requests are not working #563

mgerhardy opened this issue Dec 9, 2024 · 1 comment
Labels
OS: emscripten WASM/GLES3

Comments

@mgerhardy
Copy link
Collaborator

mgerhardy commented Dec 9, 2024

ERROR: Http request for 'https://api.github.com/repos/vengi-voxel/vengi/releases/latest' failed [vengi-voxedit.js:1:26304](https://vengi-voxel.de/ve/vengi-voxedit.js)
    put_char https://vengi-voxel.de/ve/vengi-voxedit.js:1
    write https://vengi-voxel.de/ve/vengi-voxedit.js:1
    write https://vengi-voxel.de/ve/vengi-voxedit.js:1
    doWritev https://vengi-voxel.de/ve/vengi-voxedit.js:1
    _fd_write https://vengi-voxel.de/ve/vengi-voxedit.js:1
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:5479493
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:2012463
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:2012205
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:513390
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:5692858
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:2902217
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:7337316
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:5822079
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:766820
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:21433
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:848762
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:5190101
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:7201103
    <anonymous> https://vengi-voxel.de/ve/vengi-voxedit.wasm:7203795
    callUserCallback https://vengi-voxel.de/ve/vengi-voxedit.js:1
    runIter https://vengi-voxel.de/ve/vengi-voxedit.js:1
    Browser_mainLoop_runner https://vengi-voxel.de/ve/vengi-voxedit.js:1
    (Async: FrameRequestCallback)
    requestAnimationFrame https://vengi-voxel.de/ve/vengi-voxedit.js:1
    Browser_mainLoop_scheduler_rAF https://vengi-voxel.de/ve/vengi-voxedit.js:1
    Browser_mainLoop_runner https://vengi-voxel.de/ve/vengi-voxedit.js:1
    (Async: FrameRequestCallback)

The latest emscripten removed the support for synchronous downloads from the main thread. See emscripten-core/emscripten#8070 for more details behind the reasoning.

We've adopted our code in that regards in 0a1daa9 - but this is of course not an ideal solution as the unittests can run, and not all parts are downloaded from threads. We most likely should refactor the Request class to return a future or some kind of state that you can query to implement fully async downloads for all drivers (winhttp, curl and emscripten)

@mgerhardy mgerhardy added the OS: emscripten WASM/GLES3 label Dec 9, 2024
@mgerhardy
Copy link
Collaborator Author

0a1daa9 - not yet working - only works from threads in sync mode - see emscripten-core/emscripten#8070

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: emscripten WASM/GLES3
Projects
None yet
Development

No branches or pull requests

1 participant