Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

AR on Android Chrome 88 fails #2007

Closed
2 of 10 tasks
danbaechtold opened this issue Feb 10, 2021 · 13 comments
Closed
2 of 10 tasks

AR on Android Chrome 88 fails #2007

danbaechtold opened this issue Feb 10, 2021 · 13 comments

Comments

@danbaechtold
Copy link

Description

When I try your AR examples page (https://modelviewer.dev/examples/augmentedreality/), 4 of 5 of my Android-Chrome88 devices fail to enter AR mode. Pressing the "View in your space" btn will just make the button to disappear. Trying the 3rd demo (2nd austronaut), it says "AR not supported on this device".

The devices I have are mid-range and btw 1-2 years old, all up to date, with normal end-user settings.

My first guess was that it might be related to this Three.js bug: mrdoob/three.js#21126
But the latest model-viewer seems to have the fixed version already..

Let me know if I can help or if you need more info.
Thanks!

Browser Affected

  • Chrome 88
  • Edge
  • Firefox
  • IE
  • Safari

OS

  • Android
  • iOS
  • Linux
  • MacOS
  • Windows
@elalish
Copy link
Collaborator

elalish commented Feb 11, 2021

What you're saying here is different than the comment you left on the other bug: #1694 (comment)

Is this a crash in AR or on model load? The way you describe it here, it does indeed sound like a dupe of #1694.

@elalish
Copy link
Collaborator

elalish commented Feb 11, 2021

Actually this looks like a separate Chrome regression. It's fixed in 89, but I'm very sorry this slipped through into 88! Can you verify that it's working in Chrome beta?

@danbaechtold
Copy link
Author

Yes, it's different (than what I wrote in 1694). Here really the only thing I do is open the AR examples in Chrome and try to start AR, but it doesn't. Now on one of the phones, it works, in both Chrome 88 and 89. But on the other one, it does not start AR, not even in Chrome 89! The one working is a Huawei P20, while the non-working is a Huawei P30 Lite. Both have the exact same Chrome versions, and run Android 10, and are totally regular.. I'm sorry that I don't have a clue myself where the difference is. If there is anything I can provide to help find the issue, let me know. Thanks!

@elalish
Copy link
Collaborator

elalish commented Feb 11, 2021

@klausw Perhaps another Chrome issue, as it repros in 89?

@klausw
Copy link
Contributor

klausw commented Feb 11, 2021

@danbaechtold , can you please check your specific release number from chrome://version ? There was a known bug affecting some devices where AR doesn't start correctly, https://crbug.com/1169822 . That should be fixed for Chrome Beta >= 89.0.4389.31, and Chrome Dev/Canary >= 90.0.4404.0.

@danbaechtold
Copy link
Author

danbaechtold commented Feb 12, 2021 via email

@klausw
Copy link
Contributor

klausw commented Feb 17, 2021

@danbaechtold - could you please look up the Android OS version for both the working Huawei P20 and for the non-working Huawei P30 Lite? It's shown in chrome://version, for example "OS: Android 11 Build/RQ2A" on my phone.

Also, would you mind trying a couple of other AR sites to rule out other potential problems?

https://modelviewer-ar-test.glitch.me/ - this is a test page using Scene Viewer, not WebXR

https://immersive-web.github.io/webxr-samples/immersive-ar-session.html - a simple WebXR AR example

https://immersive-web.github.io/webxr-samples/ar-barebones.html - another test, with DOM Overlay

Thank you for your patience! We don't currently have a known issue that would cause this, so it may be hardware or driver specific.

@klausw
Copy link
Contributor

klausw commented Feb 17, 2021

One more thing to try would be to disable "Android SurfaceControl" in chrome://flags for Chrome Beta.

Direct link: chrome://flags#enable-surface-control

@danbaechtold
Copy link
Author

danbaechtold commented Feb 18, 2021

@klausw Thank you for looking into it! Here are my findings (still not working):

Test Honor 8X Nokia 5.3 Huawei P30 Lite Huawei P20
ModelViewer website AR example OK NOK NOK OK
ModelViewer-AR-Test OK NOK* NOK* OK
Immersive-AR-Session OK NOK** NOK** OK
AR-Barebones OK NOK*** NOK*** OK
Chrome Beta SurfaceControl OFF NOK NOK****
Chrome Version 88.0.4324.181 88.0.4324.152 88.0.4324.152 88.0.4324.152
Android Version 10, Build: HONOR JSN-L21 NOKIA5.3 QKQ1.200114.002 MAR-LX1B EM2-229

*) Pressing the AR button a second time started a fullscreen session (but just showing the model-viewer, not in AR)
**) The AR-Button gave the error feedback by wiggling
***) Error shown, "Failed to start immersive AR.."
****) Here I even used Chrome DEV, instead of Beta (I used Beta with the Nokia), but no difference either

Further observations:

  • All phones have German as language, and the phones which can't start AR always translated the website and showed the Google Translate bar in the bottom. I tried to disable it for the current page, completly restarted Chrome, but it still didn't work. The working phones both don't have the translation (probably set to "Do not translate English"), but I'm not sure
  • Both phones not working are mid-to-low range phones.. could that be the issue, that they simply don't meet the minimal requirements? I honestly don't remember if they ever worked (if I ever tried) with older versions of model-viewer. But if this would indeed be the reason, then it would be very helpful if the error message would say so (because this would be a reasoning users could more or less comprehend)..

@klausw
Copy link
Contributor

klausw commented Feb 18, 2021

@danbaechtold , thank you for the very thorough test.

I'm afraid the issue is simply that these phones aren't supported by ARCore. The list at https://developers.google.com/ar/discover/supported-devices#google_play includes the Honor 8X and Huawei P20, but not the Nokia 5.3 or Huawei P30 Lite. I was under the mistaken impression that this was a regression, but I assume these had never worked with model-viewer?

For background, the "Enter AR" button or equivalent appears when navigator.xr.supportsSession('immersive-ar') returns true, but this result is based on a heuristic. It can return true for devices with a sufficiently new Android version to potentially support ARCore, but at this point ARCore has not been initialized yet (and may not even be installed yet), so the actual session start can still fail.

@elalish , I think it would be worth following up to have better error reporting for cases like these where the session fails to start. It appears as if requestSession is correctly rejected according to the "Immersive AR session" webxr-samples test, though it's odd that the error wasn't reported on the Nokia 5.3 for the "AR Barebones" test.

@danbaechtold
Copy link
Author

Oh, no.. sorry I didn't realize that this could be the reason, as both phones where purchased only a few months ago.

So, I hope I didn't cause you too much trouble, and if it is some how possible to improve the check or error, then we can give such users a better explanation.

Thank you so much,
Dan

@klausw
Copy link
Contributor

klausw commented Feb 18, 2021

No worries, it was my mistake to assume that it's a regression even though you didn't claim that in your report. I had recently been investigating related issues and was worried that my recent fix was not effective on some devices. Also, the current error handling is admittedly not very user friendly. To some extent this is by design, since for privacy reasons the application isn't supposed to be able to tell if a session failed due to missing hardware support or due to the user declining a consent prompt, but I think it should be possible to be a bit more helpful here.

@danbaechtold
Copy link
Author

Small update, regarding the Noka. I rechecked and there too it shows the "Failed to start immersive AR" error, as it should.
I corrected my report in the table above.

@elalish elalish closed this as completed Mar 2, 2021
@google google locked and limited conversation to collaborators Mar 2, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants