question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught TypeError: Cannot read properties of undefined (reading '1')

See original GitHub issue

Expected Behavior

I can interact with my content normally and handle cursor events.

Current Behavior

After Upgrading react-scripts to a newer version (5.0.1), the Canvas still loads and displays our content, but we cannot interact with it anymore. Instead of handling the events like “onPointerUp”, every mouse movement leads to the following error: image The error occures here: image

Possible Solution

I assume that due to our dependencies, some handlers are not initialised correctly, but it worked before.

Steps to Reproduce

Hard to tell, I didn’t get to replicate it in a small repo, everything seem to work there.

Environment

  • pixi.js version: 6.5.7
  • Browser & Version: 106.0.5249.119 (Official Build) (arm64)
  • OS & Version: _e.g. MacOS 12.5
  • Running Example: -
  • React + react-dom: 18.2

Pixi-Related Dependencies

"@pixi/app": "^6.5.7",
"@pixi/constants": "^6.5.7",
"@pixi/core": "^6.5.7",
"@pixi/display": "^6.5.7",
"@pixi/events": "^6.5.7",
"@pixi/extensions": "^6.5.7",
"@pixi/filter-color-overlay": "^5.0.0",
"@pixi/graphics": "^6.5.7",
"@pixi/interaction": "^6.5.7",
"@pixi/loaders": "^6.5.7",
"@pixi/math": "^6.5.7",
"@pixi/polyfill": "^6.5.7",
"@pixi/settings": "^6.5.7",
"@pixi/sprite": "^6.5.7",
"@pixi/text": "^6.5.7",
"@pixi/ticker": "^6.5.7",
"@pixi/utils": "^6.5.7",
"pixi-viewport": "^4.36.0",

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
CodingVampyrecommented, Oct 22, 2022

Another update because who needs sleep anyways?

I figured the hex2rgb is used by the ColorOverlayFilter, so I removed every initialisation of said filter on our end. With parcel, it works! Now, I can interact with my application again. I guess for me, it may solve most problems. (After I get to fix the hex2rgb issues, that should probably work…).

I guess the trouble regarding webpack remain, don’t they?

0reactions
CodingVampyrecommented, Oct 22, 2022

Update:

I swapped react-scripts with parcel and it seems to change things. Now, there is no more error regarding the parameter mentioned above, so the error seems to be react-scripts.

I can click on things again, which is nice, but I get another error: image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError: Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Uncaught TypeError: Cannot read property of undefined In
JavaScript TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or...
Read more >
TypeError: Cannot read properties of undefined (reading 'id')
What is happening: The function itemToForm() is being called before the this.item is ready. There are many strategies to avoid this error.
Read more >
Uncaught TypeError : Cannot read properties of undefined
The root cause of the error is that the declared variable doesn't have any value, so by default, JavaScript treats all variables as...
Read more >
Uncaught TypeError: Cannot read property '1' of undefined
This error is because there is a property field in that model, on that form that doesn't have his generic value defined, probably...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found