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.

onPress works only on debugging mode!

See original GitHub issue

I’ve got an issue, The whole app i am building is only working on debugging mode, all the buttons and components that has onPress not firing any event if i am not opening remote debugger, also its not working on the production for both android and iOS

React Native version: Environment: OS: macOS 10.14.4 Node: 10.15.3 Yarn: 1.10.0 npm: 6.4.1 Watchman: 4.9.0 Xcode: Xcode 10.2.1 Build version 10E1001 Android Studio: 3.2 AI-181.5540.7.32.5014246

Packages: (wanted => installed) react: 16.3.1 => 16.3.1 react-native: 0.55.4 => 0.55.4

Steps To Reproduce

  1. Run the app when Remote debugging mode is ON everything is working perfectly
  2. Run the app when remote debugging mode is OFF nothing firing events, everything is not working except scrolling

Snack, code example, or link to a repository: Code Example: <TouchableOpacity style={styles.touchable} onPress={() => console.log('Pressed!!')} > <Text> Press Me </Text> </TouchableOpacity>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
Philemonocommented, May 25, 2019

@react-native-bot I did update React native and it still freezing, i wonder why i am replying to a bot 😄

1reaction
gopinath-socialsurveycommented, Jun 4, 2019

clear all console.log or comment console.log…because debugger mode take console.log so …it will hang

this is work for me

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native buttons OnPress does not fire when app running ...
When I stop running the app in debug mode, the buttons work as expected. Debugging works on my emulator, but fails on a...
Read more >
onPress not working when in debugging mode : r/reactnative
Sometimes when in Debug mode - onPress won't work in the Emulator. This is because there is a 1 or 2 second difference...
Read more >
Performance Overview - React Native
LayoutAnimation only works for fire-and-forget animations ("static" animations) -- if it must be interruptible, you will need to use Animated .
Read more >
React native buttons OnPress does not fire when app running ...
[Solved]-React native buttons OnPress does not fire when app running in debug mode-Reactjs · To fix it go to the Settings (device) ->...
Read more >
How Insidious React Native onPress Could Be - Bam Tech
Imagine, you are working on a social network application. ... The share button can use the same function, we will just slightly modify...
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