Hubs-Foundation / hubs

Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.
https://hubsfoundation.org
Mozilla Public License 2.0
2.13k stars 1.41k forks source link

Intermittent crash on scene entry #5286

Open keianhzo opened 2 years ago

keianhzo commented 2 years ago

Description Sometimes when entering the scene there is an exceptions that stops client execution and avoids the user to login.

To Reproduce Steps to reproduce the behavior:

  1. Enter a Hubs scene
  2. See error

Expected behavior The user should always be able to enter the scene without errors

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

Additional context``` Looks like a race condition if the avatar-pov-node is not yet created but the cursor already accesses it.

raven.js:381 Uncaught TypeError: Cannot read properties of null (reading 'object3D')
    at n.AFRAME.registerComponent.tick2 (cursor-controller.js:111:35)
    at zk.tick (cursor-targetting-system.js:47:56)
    at i.tick (hubs-systems.js:97:33)
    at HTMLElement.value (a-scene.js:823:40)
    at HTMLElement.value (a-scene.js:867:36)
    at three.module.js:26185:35
    at r (three.module.js:12486:3)
    at a (raven.js:377:21)
rawnsley commented 2 years ago

I think this might be useful https://discord.com/channels/498741086295031808/535606666708910101/935841875670212628

It happens almost every time I enter a room on my MaxBook, but then stops happening for a while.

keianhzo commented 2 years ago

I'll work on a way to reproduce this steadily. It seems that having and empty cache and/or slow connection may help based on your discord comment and my own experience. For some reason I just started to see it recently but I bet it's definitely affecting a lot of users.

qiangjiadong commented 2 years ago

Thks a lot! Once this issue solved, I think more and more mainland Chinese audience can easily create and enjoy hubs!!!

keianhzo commented 2 years ago

@qiangjiadong do you have any steps to reproduce this that make it happen consistently? Things like browser, operating system, connection speed, specific scenes or steps in general might be helpful. I'm trying to find consistent steps but it seems to be quite random.

qiangjiadong commented 2 years ago

Sure check this scene room: https://hubs.mozilla.com/PGtEHb2/ji-xu-zhui-xun-jie-kou

As I checked regardless of chrome, edge, Firefox and safari on Windows or Mac, this issue is mostly happened with big and heavy scenes and access via China mainland. Sometimes my friend from UK also faced the same issue.

I have to say it is very random and very regular without VPN to access in mainland China. I have to control + f5 all the time and start a new incognito mode, 30% times it works.

I can send u more log or anything from console if u needed.

hope it can help! Thks a lot!

Pete

qiangjiadong commented 2 years ago

any updates?