React-native: [Xcode 11] [iOS 13] EXC_BAD_ACCESS in fishhook.c

Created on 7 Jun 2019  Â·  19Comments  Â·  Source: facebook/react-native

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

Bug iOS Locked

Most helpful comment

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.

All 19 comments

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

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 😕

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

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?

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

I’m seriously considering ditching it, haha

On Jun 10, 2019, at 8:13 PM, Chris Spankroy notifications@github.com wrote:

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

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/facebook/react-native/issues/25182?email_source=notifications&email_token=ADCE4OIDVFQ7CC7J3WOSMODPZ3UZLA5CNFSM4HVLGCQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXLR7KY#issuecomment-500637611, or mute the thread https://github.com/notifications/unsubscribe-auth/ADCE4OPE7PMFO4THNIOO5VDPZ3UZLANCNFSM4HVLGCQQ.

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

Awesome, thanks!

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!

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

upgrade your version of RN, it was fixed months ago

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

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

I am also still on 0.59.10, needed to apply these manually to compile https://github.com/facebook/react-native/commit/46bdb4161c84b33f1d0612e9c7cdd824462a31fd

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.

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?

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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

grabbou picture grabbou  Â·  3Comments

lazywei picture lazywei  Â·  3Comments

anchetaWern picture anchetaWern  Â·  3Comments

upbit picture upbit  Â·  3Comments

DreySkee picture DreySkee  Â·  3Comments