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 'gift_type')

See original GitHub issue

Hello, what can it be? We use a simple code and sometimes it gives this error

Uncaught TypeError: Cannot read properties of undefined (reading ‘gift_type’)

if (data.gift.gift_type === 1 && data.gift.repeat_end === 0) {} else {

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:34 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
Davinciblecommented, Apr 13, 2022

I amended the gift proto definition to include the to_user_id, as one room can have multiple people which receive gifts, see screenshot. Also added the timestamp as I thought that could be of value.

https://github.com/Davincible/gotiktoklive/blob/master/proto/tiktok.proto#L46-L60

Also noticed the health disclaimer shown at the bottom of the screenshot is the WebcastBottomMessage

https://github.com/Davincible/gotiktoklive/blob/master/proto/tiktok.proto#L245-L248

2reactions
zerodytrashcommented, Apr 11, 2022

image Unbelievable…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught TypeError: Cannot read properties of undefined ...
However, when I open on my local host I get lots of these errors: Uncaught TypeError: Cannot read properties of undefined (Reading '***')....
Read more >
Resolving TypeError: Cannot Read Property of Undefined ...
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 properties of undefined
Looking for ways to handle Uncaught TypeError: Cannot read property of undefined in JavaScript? This guide will help you to catch errors.
Read more >
Uncaught TypeError: Cannot read property of undefined In
Uncaught TypeError : Cannot read property of undefined error occurs in Chrome when you read a property or call a method on an...
Read more >
Why is the error "Cannot read properties of undefined ...
I'm building a LWC to be used as a flow screen component. In the LWC, I allow the border color of the component...
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