google / model-viewer

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

Scene viewer banner not being displayed for some parameters. #4045

Open hd-esteban opened 1 year ago

hd-esteban commented 1 year ago

Use the below intent link URLs, one of them works perfectly and shows the information correctly in the AR banner, but the other one is not displaying the information.

This one works:

intent://arvr.google.com/scene-viewer/1.0?title=Replay%20Club%20Loveseat%20-%20Price%3A%20%242%2C999.00&link=https%3A%2F%2Fwebsite.pluto.eq3.com%2Fca%2Fen%2Fproduct%2Fck3ezp9ig24ll0178smmbpmkx%2Fliving%2Fseating%2Fsofas%2Freplay-club-loveseat-fabric-hs021-black-sand&file=http%3A%2F%2Fcontent.cylindo.com%2Fapi%2Fv2%2F4916%2Fproducts%2F30147-03%2FAR%2F30147-03.glb%3Ffeature%3DSIZE%3ACLUB%26feature%3DUPHOLSTERY%3AJI728%26feature%3DLEGS%3AHS021&mode=ar_only

This one is not working:

intent://arvr.google.com/scene-viewer/1.0?file=https%3A%2F%2Fcontent.cylindo.com%2Fapi%2Fv2%2F4916%2Fproducts%2F30147-03%2FAR%2FAR.glb%3Ffeature%3DSIZE%3ACLUB%26feature%3DUPHOLSTERY%3AJI728%26feature%3DLEGS%3AHS021&mode=ar_only&resizable=true&link=https%3A%2F%2Fwebsite.pluto.eq3.com%2Fca%2Fen%2Fproduct%2Fck3ezp9ig24ll0178smmbpmkx%2Fliving%2Fseating%2Fsofas%2Freplay-club-loveseat-fabric-hs021-black-sand&title=Replay%20Club%20Loveseat%20-%20Price%3A%20%242%2C999.00

It've checked and both have same parameters and structure, but this is weird that the first intent link shows the banner and the second one is not showing the banner

This is a live demo where you can check the behavior: https://pluto.eq3.com/ca/en/product/ck3ezql3m24mt0178z64nfs3v/living/seating/sofas/replay-club-loveseat-leather-hs021-bisque-sp?ck2z0vr4w02ri0142ez714agh=ck2z0vr5j02rk0142x5baqc4g&ck2z0vr4w02ri0142ez714agh%7CPrimaryColour=JI728&ck2z0vr4w02ri0142ez714agh%7CBaseLeg=HS021#

When you open it on desktop and tap the button View in AR, the QR code is displayed and when you scan it with your Android device, the banner is displayed correctly.

When you open the link directly in your Android device and tap the same button AR is triggered but the banner is not displayed.

Version

Model viewer version doesn't apply since this is an error win Scene viewer

Browser Affected

OS

AR

elalish commented 1 year ago

@AdrianAtGoogle Can you repro this SceneViewer issue?

hd-esteban commented 1 year ago

hi @AdrianAtGoogle hope you're doing well, quick question, do you've any update on this ticket?

hd-esteban commented 1 year ago

hi @elalish @AdrianAtGoogle I was wondering if you were able to reproduce the error in your side, I think this is caused due to the order of the URL parameters, but as far as I can see it should work

hd-esteban commented 1 year ago

Hi @elalish / @AdrianAtGoogle as a work around I've reordered the parameters of the URL, but it seems to be a problem with the way Scene Viewer receives and recognize the parameters of the URL

AdrianAtGoogle commented 1 year ago

Maybe I'm doing something wrong, but I tried invoking those URLS (after appending the fragment portion #Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;S.browser_fallback_url=https://developers.google.com/ar;end; per https://developers.google.com/ar/develop/scene-viewer) and they both display a banner with a title and visit link. I'm glad that re-ordering the parameters has fixed it for you