google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
7.02k stars 826 forks source link

Looks like there's something wrong with this object ARCore error #573

Closed faizan1990 closed 3 years ago

faizan1990 commented 5 years ago

This is my code:

<!-- Import the component -->
<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.js"></script>
<script nomodule src="https://unpkg.com/@google/model-viewer/dist/model-viewer-legacy.js"></script>
<!-- Use it like any other HTML element -->
<model-viewer src="/examples/assets/Astronaut.glb" ar camera-controls alt="A 3D model of an astronaut" background-color="#222" ios-src="assets/Astronaut.usdz" magic-leap unstable-webxr></model-viewer>

Serving it over HTTPS node server running locally. However, when I tap on the AR button in the Chrome browser to open the ARCore in Android Pie, I get an error saying:

Couldn't load object: Looks like there's something wrong with this object

Please see the attached images to see what I mean.

Any help will be really appreciated.

Screenshot_20190524_201155_com android chrome

Screenshot_20190524_201203_com google ar core

Browser

Chrome

OS

cdata commented 5 years ago

Hi @faizan1990 I'll try to confirm this but my guess is that you need a valid certificate for the origin to be considered secure. In other words, your browser should show a green lock in the location bar, not a red ⚠️

faizan1990 commented 5 years ago

Hi @cdata you are correct! I ran it on ngrok as a valid secure server and it works fine. Thanks for your prompt reply.