model-viewer: AR is not working on Android devices (couldn't load object)
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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 30 (7 by maintainers)
@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: