Search code examples
javascriptaframegear-vr

AFrame Project run no script in GearVR Samsung Internet


I am writing a AFrame prject. It works good in 2D browser like chrome on my laptop.

But the the scripts don't run in Samsung Internet in Gear VR.

Maybe have someone ideal about it?

Demo: http://webvr.virtualskillslab.de

Github: https://github.com/LeMueller/skills-lab-web (in develop branch)


Solution

  • When I run it in Samsung Internet for VR, I get

    Uncaught SyntaxError: Unexpected token )

    on the last line of this fragment:

    function putOnTable(){
        console.log("put on table: ");
        Object(_utils_aAnimationWrapper__WEBPACK_IMPORTED_MODULE_4__["default"])(
            element, '', 'position', schema.inCan, schema.outOfCan, schema.dur,
            '', true, 'forwards',
        );

    So

    1. Lint your code, or use your IDE's syntax checker
    2. Post a version that isn't minified (or at least has sourcemaps) when asking for help
    3. Use Chrome's Remote Debugging to view the JavaScript console log: https://developer.oculus.com/documentation/vrweb/latest/concepts/carmel-remote-debugging/