Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Networked A-Frame new connections force exokit to close #1217

Open
kfarr opened this issue Jun 17, 2019 · 9 comments
Open

Networked A-Frame new connections force exokit to close #1217

kfarr opened this issue Jun 17, 2019 · 9 comments
Labels
bug Something isn't working
Projects

Comments

@kfarr
Copy link

kfarr commented Jun 17, 2019

Describe the bug
What happened, and what did you expect to happen?

When using an a-frame project with networked aframe component, and when a new user joins the scene, exokit closes, usually without an error message.

Instead I would expect exokit to stay running and that both users can interact in the scene together.

To Reproduce
Steps or commands ran to reproduce the behavior:

Install and build exokit 1462531
git clone from https://github.com/MozillaReality/networked-aframe (NAF 27d9765bef5f0e10617a4f7dd8dc33572219db05)
npm install
npm run dev

in exokit dir:
node . -x webvr localhost:8080/tracked-controllers.html

then open in another browser
localhost:8080/tracked-controllers.html

exokit will crash within a few seconds but usually with no error. sometimes a console error is displayed:

uncaught exception: TypeError: Cannot read property 'owner' of undefined
    at i.networkUpdate (/build.js:1895:19)
    at NetworkEntities.updateEntity (/build.js:663:53)
    at NetworkConnection.receivedData (/build.js:570:37)
    at Easyrtc.receivePeerDistribute (/easyrtc/easyrtc.js:5103:25)
    at Socket.onChannelMsg (/easyrtc/easyrtc.js:7389:18)
    at Socket.Emitter.emit (https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js:3:10860)
    at Socket.onevent (https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js:3:5790)
    at Socket.onpacket (https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js:3:5306)
    at Manager.<anonymous> (https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js:3:9520)
    at Manager.Emitter.emit (https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.5/socket.io.min.js:3:10860)

Additional context
Add any other context about the problem here.

workaround - load exokit last after other naf users have joined

System information:

  • OS: [e.g. Windows 10]

  • Exokit Version [e.g. v0.0.512]
    1462531

  • Node version

  • Npm version/build log if applicable

  • Is your Exokit downloaded or built?

Screenshots
If applicable, add screenshots to help explain your problem.

@kfarr
Copy link
Author

kfarr commented Jun 17, 2019

unfortunately the "workaround" of running other client first before opening exokit doesn't actually seem to work, exokit user isn't providing pose updates to the scene

@avaer
Copy link
Member

avaer commented Jun 17, 2019

Managed to repro the "no pose update".

@avaer
Copy link
Member

avaer commented Jun 17, 2019

I think there are several issues here. The first is a timers bug: #1218

@avaer
Copy link
Member

avaer commented Jun 17, 2019

The current bug is:

  • Connect with browser
  • Connect with Exokit
  • Disconnect+reconnect with browser
  • Jiggle browser input

The browser input will not be reflected in Exokit's view.

@avaer avaer added the bug Something isn't working label Jun 17, 2019
@avaer avaer added this to Triage in Exokit via automation Jun 17, 2019
@avaer avaer moved this from Triage to To Do in Exokit Jun 17, 2019
@avaer
Copy link
Member

avaer commented Jun 17, 2019

☝️ The above only happened when using websockets, so it could be a rarely-tested corner case for NAF.

I was unable to reproduce any crashes or hangs with the current code in master.

@kfarr Can you confirm?

@kfarr
Copy link
Author

kfarr commented Jun 17, 2019

☝️ The above only happened when using websockets, so it could be a rarely-tested corner case for NAF.

Unfortunately this test case is intending to use websockets but I will experiment with the alternate protocols such as firebase as a workaround

I am still able to reliably reproduce this issue with 6fc129d

@kfarr
Copy link
Author

kfarr commented Jun 17, 2019

There is application error on other WebVR browser (Firefox) when following the same instructions, so not just an exokit issue. (When add'l client connects after Firefox WebVR mode was first client, then WebVR client resets its tracked poses to 0 0 0 and stops sending updates.

Digging in more.

@avaer
Copy link
Member

avaer commented Jun 18, 2019

Thanks, does that mean the repro requires setting websockets as the protocol (as opposed to RTC)?

@kfarr
Copy link
Author

kfarr commented Jun 18, 2019

For me I see issue with both and it's my understanding that websockets is default https://github.com/MozillaReality/networked-aframe#adapters

I do not see issue tab on that repo so I have not filed w/NAF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Exokit
  
To Do
Development

No branches or pull requests

2 participants