Giter Site home page Giter Site logo

Comments (13)

avaer avatar avaer commented on May 25, 2024

This looks like it's not Exokit crashing -- Exokit is catching the error.

This might be a bug in Exokit though, if this throw is non-standard behavior. I'll look into this. Thanks for filing!

from exokit.

avaer avatar avaer commented on May 25, 2024

Indeed, I think this should be a non-throwing case, but it throws in Exokit:

c = new WebSocket('ws://lol.com');
c.close();

from exokit.

avaer avatar avaer commented on May 25, 2024

@bknill Could you try #1388 to see if it handles this issue?

from exokit.

bknill avatar bknill commented on May 25, 2024

The error has changed but the crash appears to be more serious

core:a-node:error Failure loading node:   TypeError: ctx.setGrContext is not a function
    at _onGl2DConstruct (/home/owner/workspace/client/exokit/src/native-bindings.js:435:9)
    at new CanvasRenderingContext2D (/home/owner/workspace/client/exokit/src/native-bindings.js:456:5)
    at HTMLCanvasElement.getContext (/home/owner/workspace/client/exokit/src/DOM.js:2557:23)
    at setup (https://localhost:3000/static/js/7.chunk.js:64257:36)
    at NewComponent.init (https://localhost:3000/static/js/7.chunk.js:64229:13)
    at NewComponent.initComponent (https://localhost:3000/static/js/7.chunk.js:69876:16)
    at NewComponent.updateProperties (https://localhost:3000/static/js/7.chunk.js:69856:18)
    at HTMLElement.value (https://localhost:3000/static/js/7.chunk.js:68371:25)
    at HTMLElement.value (https://localhost:3000/static/js/7.chunk.js:71553:49)
    at HTMLElement.value (https://localhost:3000/static/js/7.chunk.js:68343:20)
    at entityLoadCallback (https://localhost:3000/static/js/7.chunk.js:68104:20)
    at emitLoaded (https://localhost:3000/static/js/7.chunk.js:69171:19)
    at runNextTicks (internal/process/task_queues.js:55:5)
    at processTimers (internal/timers.js:472:9)
Error: WebSocket was closed before the connection was established
    at WebSocket.close (/home/owner/workspace/client/exokit/node_modules/ws/lib/websocket.js:217:14)
    at WebSocket.close (/home/owner/workspace/client/exokit/src/WindowBase.js:184:24)
    at WebSocketTransport.push../node_modules/sockjs-client/lib/transport/websocket.js.WebSocketTransport.close (https://localhost:3000/static/js/7.chunk.js:478867:8)
    at SockJS.push../node_modules/sockjs-client/lib/main.js.SockJS._transportTimeout (https://localhost:3000/static/js/7.chunk.js:476460:23)
    at listOnTimeout (internal/timers.js:533:17)
    at processTimers (internal/timers.js:475:7)

from exokit.

avaer avatar avaer commented on May 25, 2024

Thanks, that looks like progress. I can't tell from this why the Canvas2D would be uninitialized however.

Are you able to console.log(ctx) on this line?

nativeWindow.setCurrentWindowContext(windowHandle);

from exokit.

bknill avatar bknill commented on May 25, 2024

Do I need to rebuild exokit with this change?

from exokit.

avaer avatar avaer commented on May 25, 2024

If it's on Linux then no rebuild needed, it should just be a JS file change. 👍

from exokit.

bknill avatar bknill commented on May 25, 2024

Its not even starting at the moment.

unhandled rejection: TypeError: nativeWindow.hasCurrentWindowContext is not a function
    at _waitLocalSyncs (/home/owner/workspace/client/exokit/src/Window.js:1037:24)
    at Array._renderLocal (/home/owner/workspace/client/exokit/src/Window.js:1156:13)
    at _recurse (/home/owner/workspace/client/exokit/src/Window.js:1171:19)
    at /home/owner/workspace/client/exokit/src/Window.js:1185:5
    at new Promise (<anonymous>)
    at _render (/home/owner/workspace/client/exokit/src/Window.js:1167:39)
    at window.tickAnimationFrame (/home/owner/workspace/client/exokit/src/Window.js:1191:12)
    at global.onrunasync (/home/owner/workspace/client/exokit/src/Window.js:1351:21)
    at MessagePort.<anonymous> (/home/owner/workspace/client/exokit/src/WindowBase.js:320:45)
    at MessagePort.emit (events.js:196:13)

from exokit.

bknill avatar bknill commented on May 25, 2024

Took that console log out and get this far:

ore:a-node:error Failure loading node:   TypeError: ctx.setGrContext is not a function
    at _onGl2DConstruct (/home/owner/workspace/client/exokit/src/native-bindings.js:436:9)
    at new CanvasRenderingContext2D (/home/owner/workspace/client/exokit/src/native-bindings.js:457:5)
    at HTMLCanvasElement.getContext (/home/owner/workspace/client/exokit/src/DOM.js:2557:23)
    at NewShader.init (https://localhost:3000/static/js/4.chunk.js:883:31)
    at NewComponent.updateShader (https://localhost:3000/static/js/4.chunk.js:62334:26)
    at NewComponent.update (https://localhost:3000/static/js/4.chunk.js:62258:18)
    at NewComponent.initComponent (https://localhost:3000/static/js/4.chunk.js:69884:16)
    at NewComponent.updateProperties (https://localhost:3000/static/js/4.chunk.js:69856:18)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68371:25)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68343:20)
    at entityLoadCallback (https://localhost:3000/static/js/4.chunk.js:68104:20)
    at emitLoaded (https://localhost:3000/static/js/4.chunk.js:69171:19)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
core:a-node:error Failure loading node:   TypeError: ctx.setGrContext is not a function
    at _onGl2DConstruct (/home/owner/workspace/client/exokit/src/native-bindings.js:436:9)
    at new CanvasRenderingContext2D (/home/owner/workspace/client/exokit/src/native-bindings.js:457:5)
    at HTMLCanvasElement.getContext (/home/owner/workspace/client/exokit/src/DOM.js:2557:23)
    at NewShader.init (https://localhost:3000/static/js/4.chunk.js:883:31)
    at NewComponent.updateShader (https://localhost:3000/static/js/4.chunk.js:62334:26)
    at NewComponent.update (https://localhost:3000/static/js/4.chunk.js:62258:18)
    at NewComponent.initComponent (https://localhost:3000/static/js/4.chunk.js:69884:16)
    at NewComponent.updateProperties (https://localhost:3000/static/js/4.chunk.js:69856:18)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68371:25)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68343:20)
    at entityLoadCallback (https://localhost:3000/static/js/4.chunk.js:68104:20)
    at emitLoaded (https://localhost:3000/static/js/4.chunk.js:69171:19)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
core:a-node:error Failure loading node:   TypeError: ctx.setGrContext is not a function
    at _onGl2DConstruct (/home/owner/workspace/client/exokit/src/native-bindings.js:436:9)
    at new CanvasRenderingContext2D (/home/owner/workspace/client/exokit/src/native-bindings.js:457:5)
    at HTMLCanvasElement.getContext (/home/owner/workspace/client/exokit/src/DOM.js:2557:23)
    at NewShader.init (https://localhost:3000/static/js/4.chunk.js:883:31)
    at NewComponent.updateShader (https://localhost:3000/static/js/4.chunk.js:62334:26)
    at NewComponent.update (https://localhost:3000/static/js/4.chunk.js:62258:18)
    at NewComponent.initComponent (https://localhost:3000/static/js/4.chunk.js:69884:16)
    at NewComponent.updateProperties (https://localhost:3000/static/js/4.chunk.js:69856:18)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68371:25)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68343:20)
    at entityLoadCallback (https://localhost:3000/static/js/4.chunk.js:68104:20)
    at emitLoaded (https://localhost:3000/static/js/4.chunk.js:69171:19)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
core:a-node:error Failure loading node:   TypeError: ctx.setGrContext is not a function
    at _onGl2DConstruct (/home/owner/workspace/client/exokit/src/native-bindings.js:436:9)
    at new CanvasRenderingContext2D (/home/owner/workspace/client/exokit/src/native-bindings.js:457:5)
    at HTMLCanvasElement.getContext (/home/owner/workspace/client/exokit/src/DOM.js:2557:23)
    at NewShader.init (https://localhost:3000/static/js/4.chunk.js:883:31)
    at NewComponent.updateShader (https://localhost:3000/static/js/4.chunk.js:62334:26)
    at NewComponent.update (https://localhost:3000/static/js/4.chunk.js:62258:18)
    at NewComponent.initComponent (https://localhost:3000/static/js/4.chunk.js:69884:16)
    at NewComponent.updateProperties (https://localhost:3000/static/js/4.chunk.js:69856:18)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68371:25)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68343:20)
    at entityLoadCallback (https://localhost:3000/static/js/4.chunk.js:68104:20)
    at emitLoaded (https://localhost:3000/static/js/4.chunk.js:69171:19)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
core:a-node:error Failure loading node:   TypeError: ctx.setGrContext is not a function
    at _onGl2DConstruct (/home/owner/workspace/client/exokit/src/native-bindings.js:436:9)
    at new CanvasRenderingContext2D (/home/owner/workspace/client/exokit/src/native-bindings.js:457:5)
    at HTMLCanvasElement.getContext (/home/owner/workspace/client/exokit/src/DOM.js:2557:23)
    at NewShader.init (https://localhost:3000/static/js/4.chunk.js:883:31)
    at NewComponent.updateShader (https://localhost:3000/static/js/4.chunk.js:62334:26)
    at NewComponent.update (https://localhost:3000/static/js/4.chunk.js:62258:18)
    at NewComponent.initComponent (https://localhost:3000/static/js/4.chunk.js:69884:16)
    at NewComponent.updateProperties (https://localhost:3000/static/js/4.chunk.js:69856:18)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68371:25)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68343:20)
    at entityLoadCallback (https://localhost:3000/static/js/4.chunk.js:68104:20)
    at emitLoaded (https://localhost:3000/static/js/4.chunk.js:69171:19)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
core:a-node:error Failure loading node:   TypeError: ctx.setGrContext is not a function
    at _onGl2DConstruct (/home/owner/workspace/client/exokit/src/native-bindings.js:436:9)
    at new CanvasRenderingContext2D (/home/owner/workspace/client/exokit/src/native-bindings.js:457:5)
    at HTMLCanvasElement.getContext (/home/owner/workspace/client/exokit/src/DOM.js:2557:23)
    at NewShader.init (https://localhost:3000/static/js/4.chunk.js:883:31)
    at NewComponent.updateShader (https://localhost:3000/static/js/4.chunk.js:62334:26)
    at NewComponent.update (https://localhost:3000/static/js/4.chunk.js:62258:18)
    at NewComponent.initComponent (https://localhost:3000/static/js/4.chunk.js:69884:16)
    at NewComponent.updateProperties (https://localhost:3000/static/js/4.chunk.js:69856:18)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68371:25)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68343:20)
    at entityLoadCallback (https://localhost:3000/static/js/4.chunk.js:68104:20)
    at emitLoaded (https://localhost:3000/static/js/4.chunk.js:69171:19)
    at processTicksAndRejections (internal/process/task_queues.js:89:5)
THREE.Box3: .getSize() target is now required
THREE.Box3: .getSize() target is now required
core:a-node:error Failure loading node:   TypeError: ctx.setGrContext is not a function
    at _onGl2DConstruct (/home/owner/workspace/client/exokit/src/native-bindings.js:436:9)
    at new CanvasRenderingContext2D (/home/owner/workspace/client/exokit/src/native-bindings.js:457:5)
    at HTMLCanvasElement.getContext (/home/owner/workspace/client/exokit/src/DOM.js:2557:23)
    at setup (https://localhost:3000/static/js/4.chunk.js:64257:36)
    at NewComponent.init (https://localhost:3000/static/js/4.chunk.js:64229:13)
    at NewComponent.initComponent (https://localhost:3000/static/js/4.chunk.js:69876:16)
    at NewComponent.updateProperties (https://localhost:3000/static/js/4.chunk.js:69856:18)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68371:25)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:71553:49)
    at HTMLElement.value (https://localhost:3000/static/js/4.chunk.js:68343:20)
    at entityLoadCallback (https://localhost:3000/static/js/4.chunk.js:68104:20)
    at emitLoaded (https://localhost:3000/static/js/4.chunk.js:69171:19)

from exokit.

bknill avatar bknill commented on May 25, 2024

Switched back to master and everything is running fine. That websocket error only seems to happen intermitently.

from exokit.

avaer avatar avaer commented on May 25, 2024

Switched back to master and everything is running fine.

Which branch was being run before?

from exokit.

avaer avatar avaer commented on May 25, 2024

Was this one with the console.log? #1386 (comment)

The log I would have expected to see was the CanvasRenderingContext2D.

from exokit.

bknill avatar bknill commented on May 25, 2024

No it failed when it tried to console.log(ctx)

from exokit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.