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.

App crashes when using React Native Debugger part 2

See original GitHub issue

Description

app is crashing when running RN debugger. global.performance.now is not a function

Expected behavior

app doesn’t crash

Actual behavior & steps to reproduce

just run RN debugger

Snack or minimal code example

no code available, it crashes upon any component that uses RNA

Package versions

2.3.1

name version
react-native 0.66.3
react-native-reanimated 2.3.1
NodeJS 17.0.1
Xcode 13.2.1
Java
Gradle

Affected platforms

  • [x ] Android
  • [x ] iOS
  • Web

if change line 386 from core.ts

      global.performance = {
        now: global._chronoNow,
      };

to

      if (global.performance == null) {
        global.performance = {
          now: global._chronoNow,
        };
      }

it works

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
piaskowykcommented, Jan 13, 2022

@minhchienwikipedia thank you, exactly like you said ❤️ This issue is already resolved here: https://github.com/software-mansion/react-native-reanimated/pull/2771 but it isn’t released yet. We will release 2.3.2 soon, please be patient 🙏

7reactions
hirbodcommented, Jan 12, 2022

I am not breaking anything, I am a consumer, not the library developer. Helping others in my free time.

It’s just not possible due to the architecture. You might want to read a bit about TurboModules, JSI, Fabric etc to understand it. Setting up Flipper is a 10 minute task and will give you all the tools you need to debug.

https://fbflipper.com/docs/features/react-native/

There are plenty of Flipper Plugins (React Navigation, Zustand, Redux etc.)

Also available for expo with a custom dev client. https://github.com/jakobo/expo-community-flipper

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why does React Native app crash when clicking on debug in ...
When clicked on reload app crashes and lost connection to debugger. Tried uninstalling and reinstalling apk in emulator and cd android ./gradlew ...
Read more >
ReactNative App Crashes when Deployed to TestFlight
I am working on a ReactNative app that is working on the simulator and works when debugging on a plugged in device (iPhone...
Read more >
Flipper: React Native App Debugging - Heartbeat - Comet ML
Monitoring app crashes was one of the most tedious tasks for RN developers prior to Flipper. With Flipper's Crash Reporter, we can easily...
Read more >
Using Hermes - React Native
Note that this is very different with the "Remote JS Debugging" from the In-App Developer Menu documented in the Debugging section, ...
Read more >
Debug React Native Apps like a PRO - Medium
As a mobile developer, it's not uncommon that your app will crash or freeze once in a while without any specific reasons. Debugging...
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