google-ar / arcore-android-sdk

ARCore SDK for Android Studio
https://developers.google.com/ar
Other
4.98k stars 1.22k forks source link

Chrome crashes entering WebAR (Tiger Demo) (35+ known device models) #1373

Closed Mann1ng closed 2 years ago

Mann1ng commented 2 years ago

SPECIFIC ISSUE ENCOUNTERED

Our own AR module has been crashing for about 5% of our clients 1m+ user base in app. It was found to be due to an ArCore issue with some well known devices.

We then tested this finding by opening Chrome to see if it too had the issue (we use the same systems (Google Play Services for AR and ARCore). It was found that the 'classic' Tiger AR model (accessed via google search 'tiger') would also fail to load on opening AR View, and crash Chrome.

The crash line is: 2022-04-21 19:39:14.416 16438-16438/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.google.android.googlequicksearchbox:search, PID: 16438 java.lang.NoSuchMethodError: No virtual method startOp(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I in class Landroid/app/AppOpsManager; or its super classes (declaration of 'android.app.AppOpsManager' appears in /system/framework/framework.jar) at com.google.android.libraries.ar.sceneviewer.accountability.CameraAccessAttributionHandler.notifyCameraUsageStart(PG:6)

VERSIONS USED

STEPS TO REPRODUCE THE ISSUE

  1. Open Chrome (or any app using Google Play Services for AR)
  2. Search for 'Tiger', Scroll down to the first (non-ad) result which should be Google's Tiger overview containing a 'View in 3D' button.
  3. When the model is loaded, attempt to enter AR mode, selecting the button 'View in your space'

WORKAROUNDS (IF ANY)

None.

ADDITIONAL COMMENTS

We have a large number of Samsung and Motorola users in Europe, and Asia, and would be very appreciative of any thoughts, ideas or information on a path forward for them..

Many thanks, Isaac :)

rozag commented 2 years ago

+1, we've encountered the same exception on some devices while trying to use Scene Viewer. Google app crashes and that's basically it. 3D scene seems to be working fine though. We can also see that the crash happens not only with our models, but with 'tiger', 'turtle' and other models you can discover via google search. All these things had worked correctly some time ago, probably one of the recent google AR services update broke things.

Mann1ng commented 2 years ago

rozag

Hi Rozag, thanks for the comments on this, it seems to be a rather critical issue. I was hoping the latest Play Services for AR update may have included a fix, but it seems this issue is still persisting for a large number of Samsung / Moto% end users (eek).

Happy to see @devbridie is on the case! Many thanks for assigning, and please keep us in the loop. :)

Mann1ng commented 2 years ago

Hi all, Just checking in here, perhaps with @devbridie (though I'm sure you're flat out). We have a (large) Brazilian retail app using AR for product visualisation before checkout who are really grinding against customers who use the above listed devices then crashing out.. because these devices are approved in the official ARCore compatibility list, yet are crashing reliably when using AR, there are a few questions being hammered around regarding how accurate the list is, but I'm generally pushing back awaiting this fix.. just wondering if I can provide them with any estimate on when it might be possibly released? And once again many thanks for your support in general... best, Isaac

eugenecys commented 2 years ago

Hi Isaac, the issue is fixed in Google App version 13.15 and above since 4th of May: https://github.com/google/model-viewer/issues/3372, and the crash logs aren't showing this specific issue anymore (It's happening in 1% of all users, who have still yet to update).

If possible, can you obtain the crash logs from some of your users so we can get a better sense of what is crashing for them, or check if this issue is still happening to you after updating to >13.15?

Mann1ng commented 2 years ago

Hi @eugenecys,

Many thanks for the update. We weren't aware that the Google app was a dependency of ARCore, only that Play Services for AR was a dependancy requiring a pre-check before AR requests.

It appears that the devices still reporting the crash hadn't automatically updated the Google App and after manually updating Google on an problematic device we have AR running again :)

..I'm wondering if we should perhaps include a version check similar to how we check for 'Google Play Services for AR' pre launch, to ensure that the 'Google' app is also up-to-date, and if not prompt the user to update this, again similar to how Play Services prompts for a Play Store update?

Best, Isaac

devbridie commented 2 years ago

We weren't aware that the Google app was a dependency of ARCore, only that Play Services for AR was a dependancy requiring a pre-check before AR requests.

In particular, it is the Google app that powers the "View in your space" functionality (aka "Scene Viewer"), which is also run when launching the Android Intent. This is the app that contained the bug, so it's somewhat unrelated to ARCore! I'm not certain if a mechanism for checking the version of the Google app beforehand is feasible since it seems to be a "oneshot" request, but I'm not on that team so will let Eugene comment on this.

In any case glad to hear that it's resolved.