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

WebXR problem. Browser.pauseAsyncCallbacks is not a function #48178

Closed
MikhailMartianov opened this issue Apr 25, 2021 · 10 comments · Fixed by #48268
Closed

WebXR problem. Browser.pauseAsyncCallbacks is not a function #48178

MikhailMartianov opened this issue Apr 25, 2021 · 10 comments · Fixed by #48268

Comments

@MikhailMartianov
Copy link

Godot version:
Godot_v3.3-stable_win64

OS/device including version:
HTML5, GLES2, Chrome and firefox (Tested only in them (it seems to me this error will be in any browser)
I am the owner of quest 2, so only that was used in the test.

Issue description:
When running the VR example, the developer console in the browser shows the error "Browser.pauseAsyncCallbacks is not a function". This happens when you press the "switch to VR mode". If you build through v3.2.4.beta.custom_build.dca9f0938, then there is no such error.
I tested via oculus link and in browser inside quest 2.

I examined the js source code that is generated when exporting to html5 and saw that the call to Browser.pauseAsyncCallbacks appeared only from version 3.3, it was not there before, so there was no error. Manually removing the call to this nonexistent function helped and everything started working as it should, but this trick is very insecure.

Steps to reproduce:
Repeat the code from the example in your project and try to run.
https://docs.godotengine.org/en/3.3/classes/class_webxrinterface.html

Minimal reproduction project:
Made an example where this error occurs
example.zip

@dsnopek
Copy link
Contributor

dsnopek commented Apr 28, 2021

I'm able to reproduce this issue. :-(

Browser.pauseAsyncCallbacks() is an emscripten function. Perhaps there was an update to the emscripten version used to build the HTML5 export templates that removed it? Unfortunately, I hadn't tested the last few RC's, so I'm not sure exactly when this would have broken... But I'll look into it!

@dsnopek
Copy link
Contributor

dsnopek commented Apr 28, 2021

@Faless @akien-mga What version of Emscripten was used to build the HTML5 export templates for Godot 3.3? It looks like Browser.pauseAsyncCallbacks() was removed in 2.0.13. Anyway, I'd like to test locally using the same version as was/will be used for the official builds.

@akien-mga
Copy link
Member

akien-mga commented Apr 28, 2021

@dsnopek
Copy link
Contributor

dsnopek commented Apr 28, 2021

Ok, thanks!

This was updated from 2.0.11 on March 27: godotengine/build-containers@f8aed4f

Gah, I really should have tested those last few RCs! I was just really busy with getting that Steam release out. Sorry!

@Faless
Copy link
Collaborator

Faless commented Apr 28, 2021

Gah, I really should have tested those last few RCs!

It's alright, emscripten is just a mess, breaking compatibility every other version, without even mentioning it in the changelog.
I really hope we can ditch it at some point.

@dsnopek
Copy link
Contributor

dsnopek commented Apr 28, 2021

I created a PR that fixes this in my testing: #48268

@akien-mga Is it possible to update the HTML5 export templates for Godot 3.3 without making a new release? It's just unfortunate that WebXR support was added in 3.3, but actually doesn't work because of this issue. This issue probably also means that WebXR doesn't work in the 3.3 version of the web editor (it did in earlier RCs), but other than the novelty of it, I don't know that anyone would actually use that for a real WebXR project.

@akien-mga
Copy link
Member

Is it possible to update the HTML5 export templates for Godot 3.3 without making a new release?

It's possible but it creates a messy situation as we can't force update templates for people who have installed them already. I prefer making a 3.3.1-stable release soon with the initial batch of fixes to 3.3 (Linux 32-bit templates are also broken in 3.3 for example when using an old distro).

@akien-mga akien-mga added this to the 4.0 milestone Apr 28, 2021
Faless added a commit that referenced this issue Apr 28, 2021
Fixes #48178: WebXR broken when built with Emscripten 2.0.13 or later
@dsnopek
Copy link
Contributor

dsnopek commented Apr 28, 2021

Ok, sounds good!

akien-mga pushed a commit to akien-mga/godot that referenced this issue Apr 29, 2021
akien-mga pushed a commit that referenced this issue Apr 29, 2021
@dsnopek
Copy link
Contributor

dsnopek commented May 11, 2021

I just tested WebXR with the export templates from 3.3.1-rc1, and it's working! Definitely gonna try to stay on top of testing all the rc's this time around. :-)

@dsnopek
Copy link
Contributor

dsnopek commented May 15, 2021

Just tested with 3.3.1-rc2 - all still seems to work! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment