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

oculus-touch-controls.js:347 Uncaught TypeError: Cannot read properties of undefined (reading 'trigger') #5220

Closed
mikemainguy opened this issue Jan 18, 2023 · 8 comments

Comments

@mikemainguy
Copy link

Description:

Navigate to above site:

oculus-touch-controls.js:347 Uncaught TypeError: Cannot read properties of undefined (reading 'trigger')
at NewComponent.onButtonChangedV3 (oculus-touch-controls.js:347:48)
at NewComponent.onButtonChanged (oculus-touch-controls.js:316:12)
at AEntity.bound (bind.js:12:17)
at AEntity.emit (a-node.js:287:10)
at NewComponent.handleButton (tracked-controls-webxr.js:134:13)
at NewComponent.updateButtons (tracked-controls-webxr.js:115:12)
at NewComponent.tick (tracked-controls-webxr.js:81:12)
at AScene.tick (a-scene.js:696:30)
at AScene.render (a-scene.js:742:32)
at bound (bind.js:12:17)

@mikemainguy mikemainguy changed the title Immersive VR Mode isn't working oculus-touch-controls.js:347 Uncaught TypeError: Cannot read properties of undefined (reading 'trigger') Jan 18, 2023
@vincentfretin
Copy link
Contributor

Probably a button is pressed before the model is loaded, we'll need to verify that this.buttonRanges exists before accessing it I guess

this.triggerEuler.copy(this.buttonRanges.trigger.min.rotation);

There is also a similar issue in #5212
If anyone having a Quest 2 have one of those issues, those are really simple changes to make your first PR.

@vincentfretin
Copy link
Contributor

Oh I didn't see it was also you who reported the other one. Can you try making a PR?

@dmarcos
Copy link
Member

dmarcos commented Jan 18, 2023

PRs def welcome

vincentfretin added a commit to vincentfretin/aframe that referenced this issue Jan 21, 2023
…, this fixes Quest 2 buttons highlighting errors when the model is not loaded yet (fix aframevr#5212 and aframevr#5220)
@vincentfretin
Copy link
Contributor

It should be fixed in #5223, if you can test @mikemainguy that would be awesome.

dmarcos pushed a commit that referenced this issue Mar 30, 2023
… model is loaded (#5223)

* Check if buttonObjects or buttonMeshes is defined before accessing it, this fixes Quest 2 buttons highlighting errors when the model is not loaded yet (fix #5212 and #5220)

* check this.buttonMeshes before calling this.onButtonChangedV3

* Revert "check this.buttonMeshes before calling this.onButtonChangedV3"

This reverts commit 7b2cda9.
@vincentfretin
Copy link
Contributor

@dmarcos you can close this issue now that #5223 is merged.

@dmarcos
Copy link
Member

dmarcos commented Mar 31, 2023

Thanks. Fixed by #5223

What I usually do to close issues automatically is to add the issue to the commit message. "blah blah blah (fix #5220)" I'll point it out in future reviews. Also makes writting releas notes easier.

@dmarcos dmarcos closed this as completed Mar 31, 2023
@vincentfretin
Copy link
Contributor

I used "(fix #5212 and #5220)" in the commit comment but it didn't close the second issue, maybe because of the "and"?

@dmarcos
Copy link
Member

dmarcos commented Apr 3, 2023

never tried that. I believe comma should work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants