Using the phone authentication method:
async function onPressLogin() {
try {
let confirmationResult = await firebase.auth().signInWithPhoneNumber(state.phone);
console.log("confirmation: " + confirmationResult);
} catch(err) {
console.error(err);
}
}
raises following exception:
Exception 'Please register custom URL scheme 'com.googleusercontent.apps.<CLIENT_ID>' in the app's Info.plist file.' was thrown while invoking signInWithPhoneNumber on target RNFirebaseAuth with params (
"[DEFAULT]",
"01234567",
814,
815
)
callstack: (
0 CoreFoundation 0x000000010e6a46fb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000010d55aac5 objc_exception_throw + 48
2 CoreFoundation 0x000000010e6a4555 +[NSException raise:format:] + 197
3 Decel 0x0000000109a7c15f -[FIRPhoneAuthProvider verifyPhoneNumber:UIDelegate:completion:] + 207
4 Decel 0x0000000109c3d7bb -[RNFirebaseAuth signInWithPhoneNumber:phoneNumber:resolver:rejecter:] + 475
5 CoreFoundation 0x000000010e6ab4cc __invoking___ + 140
6 CoreFoundation 0x000000010e6a8a45 -[NSInvocation invoke] + 325
7 CoreFoundation 0x000000010e6a8e96 -[NSInvocation invokeWithTarget:] + 54
8 Decel 0x0000000109d0d55a -[RCTModuleMethod invokeWithBridge:module:arguments:] + 2810
9 Decel 0x0000000109d11806 _ZN8facebook5reactL11invokeInnerEP9RCTBridgeP13RCTModuleDatajRKN5folly7dynamicE + 790
10 Decel 0x0000000109d11313 _ZZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEiENK3$_0clEv + 131
11 Decel 0x0000000109d11289 ___ZN8facebook5react15RCTNativeModule6invokeEjON5folly7dynamicEi_block_invoke + 25
12 libdispatch.dylib 0x0000000110195ccf _dispatch_call_block_and_release + 12
13 libdispatch.dylib 0x0000000110196d02 _dispatch_client_callout + 8
14 libdispatch.dylib 0x000000011019d720 _dispatch_lane_serial_drain + 705
15 libdispatch.dylib 0x000000011019e261 _dispatch_lane_invoke + 398
16 libdispatch.dylib 0x00000001101a6fcb _dispatch_workloop_worker_thread + 645
17 libsystem_pthread.dylib 0x0000000110538611 _pthread_wqthread + 421
18 libsystem_pthread.dylib 0x00000001105383fd start_wqthread + 13
)
RCTFatal
facebook::react::invokeInner(RCTBridge*, RCTModuleData*, unsigned int, folly::dynamic const&)
facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)::$_0::operator()() const
invocation function for block in facebook::react::RCTNativeModule::invoke(unsigned int, folly::dynamic&&, int)
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_lane_serial_drain
_dispatch_lane_invoke
_dispatch_workloop_worker_thread
_pthread_wqthread
start_wqthread
Click To Expand
#### `ios/Podfile`: - [ ] I'm not using Pods - [x] I'm using Pods and my Podfile looks like:
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'Decel' do
# Pods for Decel
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'Firebase/Core', '~> 6.3.0'
pod 'Firebase/Auth', '~> 6.3.0'
pod 'Firebase/Database', '~> 6.3.0'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'
target 'DecelTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'Decel-tvOS' do
# Pods for Decel-tvOS
target 'Decel-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
#### `AppDelegate.m`:
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import <Firebase.h>
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTRootView.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
[FIRApp configure];
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"Decel"
initialProperties:nil];
rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
return YES;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
@end
Click To Expand
Not using Android. #### Have you converted to AndroidX? - [ ] my application is an AndroidX application? - [ ] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`:
// N/A
#### `android/app/build.gradle`:
// N/A
#### `android/settings.gradle`:
// N/A
#### `MainApplication.java`:
// N/A
#### `AndroidManifest.xml`:
<!-- N/A -->
Click To Expand
**`react-native info` output:**
System:
OS: macOS 10.14.5
CPU: (4) x64 Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz
Memory: 175.16 MB / 8.00 GB
Shell: 2.7.1 - /usr/local/bin/fish
Binaries:
Node: 10.12.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.0 => 0.60.0
npmGlobalPackages:
react-native-cli: 2.0.1
react-native: 0.60.0
- **Platform that you're experiencing the issue on**:
- [x] iOS
- [ ] Android
- [x] **iOS** but have not tested behavior on Android
- [ ] **Android** but have not tested behavior on iOS
- [ ] Both
- **`react-native-firebase` version you're using that has this issue:**
- 5.5.5
- **`Firebase` module(s) you're using that has the issue:**
- Core
- Auth
- Database
- **Are you using `TypeScript`?**
- Yes
Think react-native-firebase
is great? Please consider supporting all of the project maintainers and contributors by donating via our Open Collective where all contributors can submit expenses. [Learn More]
React Native Firebase
and Invertase
on Twitter for updates on the library.Did you find a solution for this ?
@amitbravo yes, i forgot to enable app verification. See Captcha Verification
Most helpful comment
@amitbravo yes, i forgot to enable app verification. See Captcha Verification