facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 908 forks source link

version 1.1.1, I got this error when run on ios "FBSDKSwizzle "Thread 1: EXC_BAD_ACCESS (code=2, address=0x7ffee6d00ff8)" #685

Open tuan072090 opened 4 years ago

tuan072090 commented 4 years ago

🐛 Bug Report

My project worked well in the last 3 days, but today when I re-run my project and got this error. I don't know the reasion why.

Code Example

Please look at the screenshot https://gyazo.com/c11e57e195ade82798988afa50dc42ff

Environment

Binaries: Node: 12.11.1 - /usr/local/bin/node Yarn: 1.19.0 - ~/.yarn/bin/yarn npm: 6.11.3 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0 IDEs: Android Studio: 3.5 AI-191.8026.42.35.5900203 Xcode: 11.1/11A1027 - /usr/bin/xcodebuild npmPackages: react: 16.8.6 => 16.8.6 react-native: 0.60.5 => 0.60.5 npmGlobalPackages: react-native-cli: 2.0.1

C3sarR0driguezNtnx commented 4 years ago

i have the same problem i tried with a lot of framework versions not luck i have exact same config

i realized only by including them everything is falling apart, it does not matter if i do not make use of it either AppDelegate.m or in js

project build succeeds but not content is loaded and the same failure appears but is showed up only in xcode not in device's screen

macci10 commented 4 years ago

facing same problem also. I downgraded to v1.0.4 which was working fine previously but no use.

tomcheung commented 4 years ago

Seem it is FBSDKCoreKit issue, it apply method swizzling on both UIView and RCTTextView Because RCTTextView is sub-class of UIView and it override didMoveToWindow and [super didMoveToWindow], this case will cause infinite recursive call

https://github.com/facebook/facebook-ios-sdk/blob/fe155d1e5686e9c91f9a76e9b5e3412677743b76/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/AAM/FBSDKMetadataIndexer.m#L145

https://github.com/facebook/facebook-ios-sdk/blob/fe155d1e5686e9c91f9a76e9b5e3412677743b76/FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKEventBindingManager.m#L156-L159

macci10 commented 4 years ago

@tomcheung can we apply this solution for this issue?

tomcheung commented 4 years ago

@macci10 I afraid not, as this comment say, this error happen FBSDKCoreKit, not FBSDKLoginKit

Also I think that issue is relate to iOS native swift project, which is different to react native project, actually react-native-fbsdk is using FBSDKLoginKit (which is for objective-c), not FBSDKLoginKit/Swift (which is for swift)

The0racle commented 4 years ago

Facing the same issue. Trying to update our SDK to use Advanced Matching but getting this crash.

Olovorr commented 4 years ago

Same issue. Did someone manage to find a workaround?

Environment: RN 0.62.2 React 16.11 Node 10.15.0 Everything else is pretty much the same as the original post.

boygiandi commented 4 years ago

Same problem here

ofito commented 4 years ago

I had the same problem, it's fixed in v2.0.0. FBSDKCoreKit is using now v7.0.

The0racle commented 4 years ago

I can confirm it's gone in v7.0.0.

shereengh commented 3 years ago

Try this https://github.com/facebook/react-native-fbsdk/issues/661#issuecomment-551146537

shereengh commented 3 years ago

Try this #661 (comment)

It has solved the issue for me