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.

[v4] Cannot read property toString of undefined

See original GitHub issue

Bug

After upgrading from 4 to 4.1.5 I get this error message: Cannot read property toString of undefined. Tried to debug a bit and it seems like in utils.js there is one exported function below:

// builds one big hash from multiple worklets' hashes
export function buildWorkletsHash(handlers) {
    return Object.values(handlers).reduce((acc, worklet) => 
    // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
    acc + worklet.__workletHash.toString(), '');
}

worklet.__workletHash.toString() seems to be undefined for me. Console logging worklet.__workletHash gives me [Function onEnd]

Environment info

Library Version
@gorhom/bottom-sheet 4.1.5
react-native 0.66.4
react-native-reanimated 2.3.1
react-native-gesture-handler 2.2.0

Steps To Reproduce

  1. Current version 4
  2. Upgrade to 4.1.5

Describe what you expected to happen:

  1. Eveything to work out of the box as with the prev installed version

Reproducible sample code

Please note that everything was working out just perfect until I decided to upgrade the package. I understand this might not be an issue with the lib itself so I will appreciate any ideas and hints on how to debug further to find out what the issue is.

Screenshot_20220222-130652.jpg

Thanks

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:14
  • Comments:26

github_iconTop GitHub Comments

18reactions
rahmanharooncommented, Feb 8, 2022

Any update on this…??

11reactions
christiaankreeftmeijercommented, Sep 8, 2022

https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation#babel-plugin

Thanks! This fixed it for me. Did add the plugin before but needed to clear the cache too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do I get Cannot read property 'toString' of undefined
I think it logs correct string, but fails on undefined one without logging the logs. Is this possible? I've found out that one...
Read more >
TypeError: Cannot read property 'toString' of undefined
It looks like the zap is working with still sending the information to Active Campaign but it still sends errors. Any help appreciated....
Read more >
Cannot read property 'toString' of undefined - Syncfusion
In your shared code snippet, you have assigned value in string type for value property. But the value property accepts only string array...
Read more >
TypeError: Cannot read property 'toString' of undefined
The error is "TypeError: Cannot read property 'toString' of undefined" and it comes from my 32bit Modbus converters, I have pasted the 32 ......
Read more >
Cannot read property 'toString' of undefined - Web
The full error message or issue you are running into. Which Web Client SDK version? ... Steps to reproduce the behavior: ... If...
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