exokitxr / exokit

Native VR/AR/XR engine for JavaScript 🦖
MIT License
997 stars 118 forks source link

Bug | Logged this when opening https://www.twitter.com/ as a 3D site via exokit-front end #1353

Closed NoahSchiffman closed 5 years ago

NoahSchiffman commented 5 years ago

internal/modules/cjs/loader.js:670
    throw err;
    ^

Error: Cannot find module '/home/noah-a-s/Desktop'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
    at Function.Module._load (internal/modules/cjs/loader.js:591:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)
    at internal/main/run_main_module.js:21:11
[noah-a-s@the-golden-leaper Desktop]$ node . https://exo.land/
internal/modules/cjs/loader.js:670
    throw err;
    ^

Error: Cannot find module '/home/noah-a-s/Desktop'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:668:15)
    at Function.Module._load (internal/modules/cjs/loader.js:591:27)
    at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)
    at internal/main/run_main_module.js:21:11
[noah-a-s@the-golden-leaper Desktop]$ cd exokit
[noah-a-s@the-golden-leaper exokit]$ node . https://exo.land/
THREE.WebGLRenderer 105
loaded fake display
loaded root in XR
uncaught exception: internal/url.js:241
  throw new ERR_INVALID_URL(input);
  ^

TypeError [ERR_INVALID_URL]: Invalid URL: bin/mc.js
    at onParseError (internal/url.js:241:9)
    at new URL (internal/url.js:317:5)
    at Object._normalizeUrl (/home/noah-a-s/Desktop/exokit/src/utils.js:36:12)
    at _normalizeUrl (/home/noah-a-s/Desktop/exokit/src/WindowBase.js:245:36)
    at getScript (/home/noah-a-s/Desktop/exokit/src/WindowBase.js:263:14)
    at importScripts (/home/noah-a-s/Desktop/exokit/src/WindowBase.js:284:32)
    at evalmachine.<anonymous>:39:1
    at Script.runInThisContext (vm.js:124:20)
    at Object.runInThisContext (vm.js:314:38)
    at importScripts (/home/noah-a-s/Desktop/exokit/src/WindowBase.js:285:8)
enter https://www.twitter.com/
iframe loaded: volume https://www.twitter.com/
uncaught exception: TypeError: this.ownerDocument.createTextNode is not a function
    at HTMLTextareaElement.set textContent [as textContent] (/home/noah-a-s/Desktop/exokit/src/DOM.js:1204:41)
    at HTMLTextareaElement.set value [as value] (/home/noah-a-s/Desktop/exokit/src/DOM.js:2671:24)
    at new Element (/home/noah-a-s/Desktop/exokit/src/DOM.js:724:16)
    at new HTMLElement (/home/noah-a-s/Desktop/exokit/src/DOM.js:1372:5)
    at new HTMLTextareaElement (/home/noah-a-s/Desktop/exokit/src/DOM.js:2663:5)
    at HTMLTextareaElement.makeClass (/home/noah-a-s/Desktop/exokit/src/DOM.js:3422:48)
    at new HTMLTextareaElement (/home/noah-a-s/Desktop/exokit/src/DOM.js:3443:99)
    at _fromAST (/home/noah-a-s/Desktop/exokit/src/Document.js:361:7)
    at element.childNodes.DOM.NodeList.childNodes.map.childNode (/home/noah-a-s/Desktop/exokit/src/Document.js:388:11)
    at Array.map (<anonymous>)
failed to render child TypeError: Cannot read property 'length' of null
    at _waitLocalSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1030:33)
    at Array._renderLocal (/home/noah-a-s/Desktop/exokit/src/Window.js:1156:13)
    at _recurse (/home/noah-a-s/Desktop/exokit/src/Window.js:1171:19)
    at renders.(anonymous function).then.newSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1174:13)
failed to render child TypeError: Cannot read property 'length' of null
    at _waitLocalSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1030:33)
    at Array._renderLocal (/home/noah-a-s/Desktop/exokit/src/Window.js:1156:13)
    at _recurse (/home/noah-a-s/Desktop/exokit/src/Window.js:1171:19)
    at renders.(anonymous function).then.newSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1174:13)
failed to render child TypeError: Cannot read property 'length' of null
    at _waitLocalSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1030:33)
    at Array._renderLocal (/home/noah-a-s/Desktop/exokit/src/Window.js:1156:13)
    at _recurse (/home/noah-a-s/Desktop/exokit/src/Window.js:1171:19)
    at renders.(anonymous function).then.newSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1174:13)
failed to render child TypeError: Cannot read property 'length' of null
    at _waitLocalSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1030:33)
    at Array._renderLocal (/home/noah-a-s/Desktop/exokit/src/Window.js:1156:13)
    at _recurse (/home/noah-a-s/Desktop/exokit/src/Window.js:1171:19)
    at renders.(anonymous function).then.newSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1174:13)
failed to render child TypeError: Cannot read property 'length' of null
    at _waitLocalSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1030:33)
    at Array._renderLocal (/home/noah-a-s/Desktop/exokit/src/Window.js:1156:13)
    at _recurse (/home/noah-a-s/Desktop/exokit/src/Window.js:1171:19)
    at renders.(anonymous function).then.newSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1174:13)
failed to render child TypeError: Cannot read property 'length' of null
    at _waitLocalSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1030:33)
    at Array._renderLocal (/home/noah-a-s/Desktop/exokit/src/Window.js:1156:13)
    at _recurse (/home/noah-a-s/Desktop/exokit/src/Window.js:1171:19)
    at renders.(anonymous function).then.newSyncs (/home/noah-a-s/Desktop/exokit/src/Window.js:1174:13)```
avaer commented 5 years ago

This won't work at the moment, since Twitter is not implementing WebXR.

However, I'm actually considering implementations that allow Exokit to auto-guess whether a site is WebXR or not, which would get rid of these kinds of errors.

I'm closing this specific issue, but will investigate further whether the guessing implemention can be made to work 👍.