Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Facebook Login Crashes from Facebook App - iOS #490

Open
vincegnzls opened this issue Mar 6, 2019 · 2 comments
Open

Facebook Login Crashes from Facebook App - iOS #490

vincegnzls opened this issue Mar 6, 2019 · 2 comments

Comments

@vincegnzls
Copy link

馃悰 Bug Report

App crashes when login manager redirects to Facebook app in iOS.

To Reproduce

  1. Using an iPhone, use login with facebook.

  2. Choose "Login with the Facebook app"
    3

  3. Tap "Open in Facebook"
    1

  4. Tap "Continue"
    2

  5. App crashes

Error in XCode:
Terminating app due to uncaught exception 'RCTFatalException: Unhandled JS Exception: null is not an object (evaluating 'n.match(//([^\/]+)/?$/)[1]')', reason: 'Unhandled JS Exception: null is not an object (evaluating 'n.match(//([^/..., stack:
navigate@490:1484
handleOpenURL@490:1670
value@51:1271
value@25:3311
@25:822
value@25:2565
value@25:794
'
*** First throw call stack:
(0x1b7680ec4 0x1b6851a50 0x1008d4cc4 0x1008d11b4 0x1b7688630 0x1b7566450 0x1b7567034 0x1008e8d94 0x10092fb34 0x10092f890 0x1020d7824 0x1020d8dc8 0x1020e0e6c 0x1020e1b60 0x1020ebbfc 0x1b729d0dc 0x1b729fcec)
libc++abi.dylib: terminating with uncaught exception of type NSException

Expected Behavior

  1. Using an iPhone, use login with facebook.

  2. Choose "Login with the Facebook app"
    3

  3. Tap "Open in Facebook"
    1

  4. Tap "Continue"
    2

  5. User will be logged in

Code Example

LoginManager.logInWithReadPermissions(['email', 'public_profile']).then( (result, error) => { if (result.isCancelled) { console.log('cancelled') } else { if (!error) { this.login() } else { console.log(error) } } }

Environment

React Native Environment Info:
System:
OS: macOS 10.14.3
CPU: x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 45.55 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.6.0 - /usr/local/bin/node
Yarn: 1.12.3 - ~/.yarn/bin/yarn
npm: 6.1.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: ^16.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728
react-native: 0.57.4 => 0.57.4
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
react-native-rename: 2.2.2

@bijuC1983
Copy link

Facing the same issue.. Any fixes?

@wodka
Copy link

wodka commented May 21, 2019

I had a similar issue and did not properly add - (BOOL)application:(UIApplication *)application openURL:(NSURL *)url to appDelegate.m - adding it as in the readme fixed it for me

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants