Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xcode 11] [iOS 13] EXC_BAD_ACCESS in fishhook.c #25182

Closed
Tracked by #25181
chrisspankroy opened this issue Jun 6, 2019 · 19 comments
Closed
Tracked by #25181

[Xcode 11] [iOS 13] EXC_BAD_ACCESS in fishhook.c #25182

chrisspankroy opened this issue Jun 6, 2019 · 19 comments
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.

Comments

@chrisspankroy
Copy link

chrisspankroy commented Jun 6, 2019

Bug

When running my app on an iPhone XR (iOS 13), the app immediately crashes with EXC_BAD_ACCESS.

Screen Shot 2019-06-06 at 5 04 19 PM

I can only reproduce this when running on a physical iPhone. iPad and simulator both work fine.

Environment info

React native info output:

 info
  React Native Environment Info:
    System:
      OS: macOS 10.15
      CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
      Memory: 1.78 GB / 16.00 GB
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 8.16.0 - ~/.nvm/versions/node/v8.16.0/bin/node
      Yarn: 1.16.0 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.16.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5522156
      Xcode: 11.0/11M336w - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.6 => 16.8.6
      react-native: ^0.59.9 => 0.59.9

Library version: 0.59.9

Steps To Reproduce

Make a new React Native project with react-native init and run on device.

Describe what you expected to happen:

  1. App to not crash immediately

Reproducible sample code

Here That's a link to a repo I just made for a test project.

EDIT: Fixed the link to the repo

@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Jun 6, 2019
@hramos hramos changed the title EXC_BAD_ACCESS in fishhook.c (iOS 13/Xcode 11) [Xcode 11] [iOS 13] EXC_BAD_ACCESS in fishhook.c Jun 7, 2019
@ryanoconnor7
Copy link

ryanoconnor7 commented Jun 10, 2019

I found a temporary (and terrible) workaround of simply commenting that line out 🙃

However, once it actually runs, a (dismissible) error comes up. This same error occurs in the simulator, although the simulator is not affected by the bad access issue.

image

@chrisspankroy
Copy link
Author

What version of React Native are you using? There was a similar issue ( #25138 ) that was fixed in 59.9. I'm using 59.9 and after commenting out the line in fishhook.c, I can get the app to run fine. But, I'm willing to bet that's not the right solution 😕

@chrisspankroy
Copy link
Author

I might have a real fix for it. PR coming soon

@ryanoconnor7
Copy link

Got it, thanks. Hopefully that fixes it. Sorry for asking this here but what should I do if I'm using expo and need to upgrade to 59.9?

@chrisspankroy
Copy link
Author

I’ve never used Expo, but my understanding of how it works is it can take about a month after a version of React Native comes out for it to be supported on Expo. The Expo SDK should support 59.9 in a few weeks

@ryanoconnor7
Copy link

ryanoconnor7 commented Jun 11, 2019 via email

@mmmulani
Copy link
Contributor

this should be fixed by 46bdb41, let me know if it doesn't work for you

@chrisspankroy
Copy link
Author

Awesome, thanks!

@mjgallag
Copy link

Does anyone understand why this crashes in production when all the references to RCTReconnectingWebSocket are in DevSupport classes? I ask because I'm trying to figure out if there is anything I can possibly do to address this issue from a javascript code push. Shot in the dark but if anyone has any ideas let me know, thanks!

@enaluz
Copy link

enaluz commented Oct 15, 2019

I'm still getting this bug. Any updates on this? So far, the only fix I can find for this (although it's horrible) is to comment the line out.

@mmmulani

@mmmulani
Copy link
Contributor

upgrade your version of RN, it was fixed months ago

@Mcebrera
Copy link

@mmmulani What RN version fixed this? I'm on 0.59.10

@mmmulani
Copy link
Contributor

v61.0 I believe is the first to have this fix

@nomoreboredom
Copy link

I am also still on 0.59.10, needed to apply these manually to compile 46bdb41

@xeric
Copy link

xeric commented Oct 28, 2019

For you guys who are still working on 0.59.10 and hard to apply 46bdb41 patch in to your local.
Go to ‘node_modules/react-native/Libraries/fishhook/fishhook.c' and delete whole method 'perform_rebinding_with_section' content, keep the method definition.
Save -> Done.

@ipenpen
Copy link

ipenpen commented Dec 6, 2019

I am using

   React Native 0.59.9,
   Xcode 11.2.1(11B500). 
   iOS SDK: iOS 13.2

I tried to reproduce this crash but could not.
It work fine in both simulator and real device(include iPhone XR iOS 13).

I have to decide to update to new React Native version or not.
Do you have any idea why I can not reproduce this crash?

Is it happened only in iOS SDK 13.0 and Xcode 11?

@GleidsonDaniel
Copy link

GleidsonDaniel commented Jan 9, 2020

The curious thing is that this error only happens on iphones 11, on inferior devices like X, the error does not happen ...

@meetyourdev
Copy link

For you guys who are still working on 0.59.10 and hard to apply 46bdb41 patch in to your local.
Go to ‘node_modules/react-native/Libraries/fishhook/fishhook.c' and delete whole method 'perform_rebinding_with_section' content, keep the method definition.
Save -> Done.

This still works in 2020

@IdrisHanafi
Copy link

The curious thing is that this error only happens on iphones 11, on inferior devices like X, the error does not happen ...

+1 This error occurred only on iPhone 11s. Worked on all other devices including emulators.

v61.0 I believe is the first to have this fix

Oof that sucks because one of our dependencies max supported version as of now is 0.59.9

@facebook facebook locked as resolved and limited conversation to collaborators Jun 12, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jun 12, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

Successfully merging a pull request may close this issue.