AR is not working on Android devices (couldn't load object)

See original GitHub issue

Description

Attempting to use the model-viewer in our project, and it works wonderfully on desktop and iOS. However, I am unable to get the AR aspect to work on our android devices. Displaying the 3d-objects works fine, but when we tap on the AR button it seems like it attempts to load the Scene Viewer but just displays “Couldn’t load object”.

For the model-viewer src, I have tried using both https://... paths and relative paths to the directory that contains the .gltf file. We currently have three separate 3d-models for testing purposes, and they all have the same issue. Right now we are using the bundled build and adding script tags to the page we want to display the 3d-models.

Live Demo

The following demo is pretty close to what we have on our test page. We have been removing the ‘optional’ js (and required webcomponents-loader.js pertaining to Edge/Firefox support) but decided to leave it in for the demo.

Note that we are in the early stages of implemented 3d-model functionality on our website, and the .bin, .gltf, and .usdz files we currently have are rather large (the model in the demo has a .usdz file that is around 15MB and the .bin file is around 10MB, so at its current state can eat up data plans pretty quickly):

https://entertaining-bosworth.glitch.me/

Browser Affected

  • Chrome
  • Edge
  • Firefox
  • Helios
  • IE
  • Safari

OS

  • Android (Galaxy S7 and S10, both Android 8.0+)
  • iOS
  • Linux
  • MacOS
  • Windows

Versions

  • model-viewer: 0.7.1, although we couldn’t get it to work using 0.7.0 as well

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:21 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
cdatacommented, Oct 25, 2019

@bankey1443 that’s very strange, I would actually expect the opposite. Scene Viewer is supposed to have trouble with localhost origins.

I filed this bug internally with the Scene Viewer team. Meanwhile, you can use this web-based Scene Viewer test tool (currently in beta) to get some feedback on the model: https://vr.google.com/scene-viewer-preview

I noticed it outputs some warnings with the test model you provided above: image

0reactions
elalishcommented, Jul 15, 2022

We won’t be able to help with so little info. Please open a new issue and fill out the template completely, particularly the repro link, a screen recording, and any JS console errors/warnings.

Read more comments on GitHub >

github_iconTop Results From Across the Web

google ar search error arcore couldn't load object.
I try the new feature frome google search the augmented reality, every time i try to see for example the tiger or the...
Read more >
Enable AR in your Android NDK app | ARCore
Enable AR to use augmented reality features in your new or existing app. Configure your app to be AR Required or AR Optional....
Read more >
GLTF/GLB couldn't load object in ARCore Android ThreeJS
I'm trying to load my GLTF/GLB exported ThreeJS model in ARCore by calling the intent. When I do that, ARCore notifies me Can't...
Read more >
Google 3D animals not working | XDA Forums
Has anyone had any luck getting the 3D animals from Google working, I get an error every time, couldn't load object, looks like...
Read more >
How to fix when Google's 'View in 3D' animals AR object ...
Another reason your phone might not be working with View in 3D's 'View in your space' functionality is the Google Play Services for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found