React-native-firebase: bug with actionCodeSettings

Created on 17 Dec 2017  路  17Comments  路  Source: invertase/react-native-firebase

  1. Application Target Platform:
    IOS
  2. Development Operating System:
    macOS Sierra
  3. React Native version:
    0.51.0
  4. RNFirebase Version:
    3.2.0
  5. Firebase Module:
    Auth
user.sendEmailVerification() - works
const actionCodeSettings = {
      android: {
        installApp: true,
        minimumVersion: '12',
        packageName: 'com.pivot3',
      },
      handleCodeInApp: true,
      iOS: {
        bundleId: 'org.reactjs.native.example.pivot3',
      },
      url: 'pivot3://',
    };
user.sendEmailVerification(actionCodeSettings)



md5-099f7f08a51e2e9d20411dc4c5ebca79



Error: An internal error has occurred, please try again.
    at createErrorFromErrorData (index.bundle:1822)
    at index.bundle:1775
    at MessageQueue.__invokeCallback (index.bundle:2138)
    at index.bundle:1952
    at MessageQueue.__guard (index.bundle:2071)
    at MessageQueue.invokeCallbackAndReturnFlushedQueue (index.bundle:1951)
    at debuggerWorker.js:72

actionCodeSettings structure looks fine

Bug Authentication Firebase

All 17 comments

@chrisbianca could you please have a look at this?

@Stas-Buzunko this will be looked at this week, thanks for the report.

@Ehesp any updates? :)

@Ehesp @chrisbianca any updates?

console.log output (on ios):

An internal error has occurred, please try again. auth/internal-error {"framesToPop":1,"code":"auth/internal-error","nativeStackIOS":["0 pivot3 0x0000000104c93258 RCTJSErrorFromCodeMessageAndNSError + 152","1 pivot3 0x0000000104bfc6d4 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.218 + 176","2 pivot3 0x0000000104e78320 -[RNFirebaseAuth promiseRejectAuthException:error:] + 288","3 pivot3 0x0000000104e71a0c __77-[RNFirebaseAuth sendEmailVerification:actionCodeSettings:resolver:rejecter:]_block_invoke + 92","4 libdispatch.dylib 0x00000001053a52cc _dispatch_call_block_and_release + 24","5 libdispatch.dylib 0x00000001053a528c _dispatch_client_callout + 16","6 libdispatch.dylib 0x00000001053a9ea0 _dispatch_main_queue_callback_4CF + 1196","7 CoreFoundation 0x0000000182cbe544 + 12","8 CoreFoundation 0x0000000182cbc120 + 2012","9 CoreFoundation 0x0000000182bdbe58 CFRunLoopRunSpecific + 436","10 GraphicsServices 0x0000000184a88f84 GSEventRunModal + 100","11 UIKit 0x000000018c25b67c UIApplicationMain + 236","12 pivot3 0x0000000104b1823c main + 124","13 libdyld.dylib 0x00000001826f856c + 4"],"domain":"FIRAuthErrorDomain","userInfo":{"error_name":"ERROR_INTERNAL_ERROR","NSLocalizedDescription":"An internal error has occurred, print and inspect the error details for more information.","NSUnderlyingError":{"code":"3","message":"underlying error","nativeStackIOS":["0 pivot3 0x0000000104c93258 RCTJSErrorFromCodeMessageAndNSError + 152","1 pivot3 0x0000000104c935b4 RCTJSErrorFromCodeMessageAndNSError + 1012","2 pivot3 0x0000000104bfc6d4 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.218 + 176","3 pivot3 0x0000000104e78320 -[RNFirebaseAuth promiseRejectAuthException:error:] + 288","4 pivot3 0x0000000104e71a0c __77-[RNFirebaseAuth sendEmailVerification:actionCodeSettings:resolver:rejecter:]_block_invoke + 92","5 libdispatch.dylib 0x00000001053a52cc _dispatch_call_block_and_release + 24","6 libdispatch.dylib 0x00000001053a528c _dispatch_client_callout + 16","7 libdispatch.dylib 0x00000001053a9ea0 _dispatch_main_queue_callback_4CF + 1196","8 CoreFoundation 0x0000000182cbe544 + 12","9 CoreFoundation 0x0000000182cbc120 + 2012","10 CoreFoundation 0x0000000182bdbe58 CFRunLoopRunSpecific + 436","11 GraphicsServices 0x0000000184a88f84 GSEventRunModal + 100","12 UIKit 0x000000018c25b67c UIApplicationMain + 236","13 pivot3 0x0000000104b1823c main + 124","14 libdyld.dylib 0x00000001826f856c + 4"],"domain":"FIRAuthInternalErrorDomain","userInfo":{"FIRAuthErrorUserInfoDeserializedResponseKey":{"message":null,"code":500}}}}}

xcode output (don't see any errors here)

2018-01-25 16:04:01.314186+0530 pivot3[412:100796] [Firebase/Analytics][I-ACS023007] Firebase Analytics v.40005000 started
2018-01-25 16:04:01.314720+0530 pivot3[412:100796] [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2018-01-25 4:04:01.377 [info][tid:main][RCTBatchedBridge.mm:79] Initializing (parent: , executor: RCTJSCExecutor)
2018-01-25 16:04:01.381045+0530 pivot3[412:100730] Initializing (parent: , executor: RCTJSCExecutor)
2018-01-25 4:04:01.463 [info][tid:main][RCTRootView.m:301] Running application pivot3 ({
initialProps = {
};
rootTag = 1;
})
2018-01-25 16:04:01.462817+0530 pivot3[412:100730] Running application pivot3 ({
initialProps = {
};
rootTag = 1;
})
2018-01-25 16:04:01.479028+0530 pivot3[412:100730] Setting up RNFirebase instance
2018-01-25 4:04:01.543 [info][tid:main][RCTBatchedBridge.mm:79] Initializing (parent: , executor: RCTWebSocketExecutor)
2018-01-25 16:04:01.543396+0530 pivot3[412:100730] Initializing (parent: , executor: RCTWebSocketExecutor)
2018-01-25 4:04:01.544 [warn][tid:main][RCTModuleData.mm:69] Module RCTJSCExecutor requires main queue setup since it overrides init but doesn't implement requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2018-01-25 16:04:01.544280+0530 pivot3[412:100730] Module RCTJSCExecutor requires main queue setup since it overrides init but doesn't implement requiresMainQueueSetup. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.
2018-01-25 16:04:01.548406+0530 pivot3[412:100730] Setting up RNFirebase instance
2018-01-25 16:04:01.928162+0530 pivot3[412:100794] TIC Read Status [1:0x0]: 1:57
2018-01-25 16:04:01.928284+0530 pivot3[412:100794] TIC Read Status [1:0x0]: 1:57
2018-01-25 16:04:08.828445+0530 pivot3[412:100794] [] nw_connection_get_connected_socket 8 Connection has no connected handler
2018-01-25 16:04:08.828548+0530 pivot3[412:100794] TCP Conn 0x1c016ca80 Failed : error 0:61 [61]
2018-01-25 4:04:08.845 [info][tid:main][RCTRootView.m:301] Running application pivot3 ({
initialProps = {
};
rootTag = 1;
})
2018-01-25 16:04:08.845441+0530 pivot3[412:100730] Running application pivot3 ({
initialProps = {
};
rootTag = 1;
})
2018-01-25 4:04:08.846 [warn][tid:main][RCTBatchedBridge.mm:513] RCTBatchedBridge is deprecated and will be removed in a future React Native release. See https://fb.me/react-cxx-bridge for upgrade instructions.
2018-01-25 16:04:08.846628+0530 pivot3[412:100730] RCTBatchedBridge is deprecated and will be removed in a future React Native release. See https://fb.me/react-cxx-bridge for upgrade instructions.
2018-01-25 16:04:10.880527+0530 pivot3[412:100815] [] nw_connection_get_connected_socket 12 Connection has no connected handler
2018-01-25 16:04:10.880631+0530 pivot3[412:100815] TCP Conn 0x1c016db00 Failed : error 0:61 [61]
2018-01-25 16:04:11.841348+0530 pivot3[412:100815] [Firebase/Database][I-RDB034028] Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ".indexOn": "userId" at /Employees to your security rules for better performance
2018-01-25 16:04:13.183294+0530 pivot3[412:100800] [] nw_connection_get_connected_socket 17 Connection has no connected handler
2018-01-25 16:04:13.183399+0530 pivot3[412:100800] TCP Conn 0x1c416cd80 Failed : error 0:61 [61]
2018-01-25 16:04:13.390178+0530 pivot3[412:100815] [Firebase/Database][I-RDB034028] Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ".indexOn": "companyId" at /Employees to your security rules for better performance
2018-01-25 16:04:13.799134+0530 pivot3[412:100800] [Firebase/Database][I-RDB034028] Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding ".indexOn": "time" at /Notifications/-L2UCdrhViMVb4he-qkv to your security rules for better performance
2018-01-25 16:04:15.544509+0530 pivot3[412:100800] [] nw_connection_get_connected_socket 19 Connection has no connected handler
2018-01-25 16:04:15.544790+0530 pivot3[412:100800] TCP Conn 0x1c016f000 Failed : error 0:61 [61]
2018-01-25 16:04:17.700267+0530 pivot3[412:100800] [] nw_connection_get_connected_socket 20 Connection has no connected handler
2018-01-25 16:04:17.700369+0530 pivot3[412:100800] TCP Conn 0x1c016d740 Failed : error 0:61 [61]
2018-01-25 16:04:19.735793+0530 pivot3[412:100794] [] nw_connection_get_connected_socket 21 Connection has no connected handler
2018-01-25 16:04:19.735897+0530 pivot3[412:100794] TCP Conn 0x1c016b7c0 Failed : error 0:61 [61]
2018-01-25 16:04:22.033327+0530 pivot3[412:100798] [] nw_connection_get_connected_socket 22 Connection has no connected handler
2018-01-25 16:04:22.033436+0530 pivot3[412:100798] TCP Conn 0x1c016b880 Failed : error 0:61 [61]
2018-01-25 16:04:24.153640+0530 pivot3[412:100789] [] nw_connection_get_connected_socket 23 Connection has no connected handler
2018-01-25 16:04:24.153915+0530 pivot3[412:100789] TCP Conn 0x1c016df80 Failed : error 0:61 [61]
2018-01-25 16:04:26.195170+0530 pivot3[412:100789] [] nw_connection_get_connected_socket 24 Connection has no connected handler
2018-01-25 16:04:26.195277+0530 pivot3[412:100789] TCP Conn 0x1c016d680 Failed : error 0:61 [61]
2018-01-25 16:04:28.232109+0530 pivot3[412:100798] [] nw_connection_get_connected_socket 25 Connection has no connected handler
2018-01-25 16:04:28.232216+0530 pivot3[412:100798] TCP Conn 0x1c016c240 Failed : error 0:61 [61]
2018-01-25 16:04:30.280693+0530 pivot3[412:100789] [] nw_connection_get_connected_socket 26 Connection has no connected handler
2018-01-25 16:04:30.280795+0530 pivot3[412:100789] TCP Conn 0x1c016e100 Failed : error 0:61 [61]
2018-01-25 16:04:32.319778+0530 pivot3[412:100789] [] nw_connection_get_connected_socket 27 Connection has no connected handler
2018-01-25 16:04:32.319884+0530 pivot3[412:100789] TCP Conn 0x1c016e940 Failed : error 0:61 [61]
2018-01-25 16:04:34.364904+0530 pivot3[412:100789] [] nw_connection_get_connected_socket 28 Connection has no connected handler
2018-01-25 16:04:34.365040+0530 pivot3[412:100789] TCP Conn 0x1c016e880 Failed : error 0:61 [61]
2018-01-25 16:04:36.401659+0530 pivot3[412:100789] [] nw_connection_get_connected_socket 29 Connection has no connected handler
2018-01-25 16:04:36.401762+0530 pivot3[412:100789] TCP Conn 0x1c016b100 Failed : error 0:61 [61]
2018-01-25 16:04:38.485829+0530 pivot3[412:100794] [] nw_connection_get_connected_socket 30 Connection has no connected handler
2018-01-25 16:04:38.485931+0530 pivot3[412:100794] TCP Conn 0x1c016abc0 Failed : error 0:61 [61]
2018-01-25 16:04:40.520371+0530 pivot3[412:100800] [] nw_connection_get_connected_socket 31 Connection has no connected handler
2018-01-25 16:04:40.520472+0530 pivot3[412:100800] TCP Conn 0x1c016e700 Failed : error 0:61 [61]
2018-01-25 16:04:42.607795+0530 pivot3[412:100800] [] nw_connection_get_connected_socket 32 Connection has no connected handler
2018-01-25 16:04:42.607901+0530 pivot3[412:100800] TCP Conn 0x1c0169a80 Failed : error 0:61 [61]
2018-01-25 16:04:44.837860+0530 pivot3[412:100789] [] nw_connection_get_connected_socket 33 Connection has no connected handler
2018-01-25 16:04:44.837964+0530 pivot3[412:100789] TCP Conn 0x1c016eac0 Failed : error 0:61 [61]
2018-01-25 16:04:47.256497+0530 pivot3[412:100789] [] nw_connection_get_connected_socket 34 Connection has no connected handler
2018-01-25 16:04:47.256599+0530 pivot3[412:100789] TCP Conn 0x1c016f0c0 Failed : error 0:61 [61]
2018-01-25 16:04:49.293603+0530 pivot3[412:100800] [] nw_connection_get_connected_socket 35 Connection has no connected handler
2018-01-25 16:04:49.293703+0530 pivot3[412:100800] TCP Conn 0x1c016ec40 Failed : error 0:61 [61]
2018-01-25 16:04:51.328593+0530 pivot3[412:100794] [] nw_connection_get_connected_socket 36 Connection has no connected handler
2018-01-25 16:04:51.328696+0530 pivot3[412:100794] TCP Conn 0x1c016f3c0 Failed : error 0:61 [61]
2018-01-25 16:04:53.368345+0530 pivot3[412:100798] [] nw_connection_get_connected_socket 37 Connection has no connected handler
2018-01-25 16:04:53.368448+0530 pivot3[412:100798] TCP Conn 0x1c016f300 Failed : error 0:61 [61]
2018-01-25 16:04:55.401920+0530 pivot3[412:100794] [] nw_connection_get_connected_socket 38 Connection has no connected handler
2018-01-25 16:04:55.402025+0530 pivot3[412:100794] TCP Conn 0x1c016dbc0 Failed : error 0:61 [61]
2018-01-25 16:04:57.441859+0530 pivot3[412:100794] [] nw_connection_get_connected_socket 39 Connection has no connected handler
2018-01-25 16:04:57.441960+0530 pivot3[412:100794] TCP Conn 0x1c016f180 Failed : error 0:61 [61]
2018-01-25 16:04:59.475007+0530 pivot3[412:100798] [] nw_connection_get_connected_socket 40 Connection has no connected handler
2018-01-25 16:04:59.475109+0530 pivot3[412:100798] TCP Conn 0x1c016f240 Failed : error 0:61 [61]
2018-01-25 16:05:01.699238+0530 pivot3[412:100798] [] nw_connection_get_connected_socket 41 Connection has no connected handler
2018-01-25 16:05:01.699342+0530 pivot3[412:100798] TCP Conn 0x1c016f6c0 Failed : error 0:61 [61]
2018-01-25 16:05:04.081735+0530 pivot3[412:100800] [] nw_connection_get_connected_socket 42 Connection has no connected handler
2018-01-25 16:05:04.081850+0530 pivot3[412:100800] TCP Conn 0x1c4168b80 Failed : error 0:61 [61]
2018-01-25 16:05:06.136426+0530 pivot3[412:100798] [] nw_connection_get_connected_socket 43 Connection has no connected handler
2018-01-25 16:05:06.136534+0530 pivot3[412:100798] TCP Conn 0x1c016f540 Failed : error 0:61 [61]
2018-01-25 16:05:08.172871+0530 pivot3[412:100800] [] nw_connection_get_connected_socket 44 Connection has no connected handler
2018-01-25 16:05:08.172974+0530 pivot3[412:100800] TCP Conn 0x1c016f600 Failed : error 0:61 [61]

looks like method works and firebase responses with error.code
"auth/unknown" (Android)
"auth/internal-error" (IOS)
but i have no idea what's wrong

Following discussion on discord, I'm closing this as it looks like an underlying native SDK issue.
Please let us know if you manage to resolve once speaking with Firebase directly.

Has there been a conclusion here? I have the same issue but only on android.

@RWOverdijk the conclusion we came to is that it was an issue with the underlying SDK. @Stas-Buzunko was going to flag an issue with Firebase directly but I'm not sure what happened there...

For me, the problem very specifically was with the API key. I use Google Maps and Firebase side by side, and they had the same project_id. This, somehow, caused a conflict. In the end I just put the google maps api key in my google-services.json, and it worked.

That's how I found the cause of the issue. I'm pretty sure it was before I added restrictions to my google maps api key, but the api key in firebase got updated automatically.

@RWOverdijk , where do you put the maps api-key in your google-services.json? please share the fragmnent.

@aMarCruz In the section that says api_key.

client.api_key

@Stas-Buzunko Any updates?

I have the same issue

looks like method works and firebase responses with error.code
"auth/unknown" (Android)
"auth/internal-error" (IOS)
but i have no idea what's wrong

I think it is a problem with the network. Your network can't link to Firebase

@rendomnet

Was this page helpful?
0 / 5 - 0 ratings