0

Seems like I get an error using a test user with react-native-fbsdk to login. Here's the relevant code:

LoginManager.logInWithReadPermissions(['public_profile']).then(async result => {
})
.catch(error => {
    console.dir(error);
});

Now, the promise rejection is catched and this is printed out in the console:

{
    "framesToPop": 1,
    "code": "FacebookSDK",
    "nativeStackIOS": [
Array[26]
0
:
"0   beebo                               0x000000010c3d5306 RCTJSErrorFromCodeMessageAndNSError + 134"
1
:
"1   beebo                               0x000000010c349f38 __41-[RCTModuleMethod processMethodSignature]_block_invoke_2.224 + 184"
2
:
"2   beebo                               0x000000010c64f237 __71-[RCTFBSDKLoginManager _loginWithPermissions:resolver:rejecter:isRead:]_block_invoke + 135"
3
:
"3   beebo                               0x000000010c1dd4fa -[FBSDKLoginManager invokeHandler:error:] + 266"
4
:
"4   beebo                               0x000000010c1def35 __57-[FBSDKLoginManager validateReauthentication:withResult:]_block_invoke + 645"
5
:
"5   beebo                               0x000000010c1a7ce1 -[FBSDKGraphRequestMetadata invokeCompletionHandlerForConnection:withResults:error:] + 209"
6
:
"6   beebo                               0x000000010c1a3f1f __82-[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:]_block_invoke + 207"
7
:
"7   beebo                               0x000000010c1a3d1d -[FBSDKGraphRequestConnection processResultBody:error:metadata:canNotifyDelegate:] + 1805"
8
:
"8   beebo                               0x000000010c1a3475 __64-[FBSDKGraphRequestConnection completeWithResults:networkError:]_block_invoke + 1333"
9
:
"9   CoreFoundation                      0x0000000112a52652 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 114"
10
:
"10  CoreFoundation                      0x0000000112a524e2 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 194"
11
:
"11  beebo                               0x000000010c1a2df3 -[FBSDKGraphRequestConnection completeWithResults:networkError:] + 1043"
12
:
"12  beebo                               0x000000010c1a1a86 -[FBSDKGraphRequestConnection completeFBSDKURLSessionWithResponse:data:networkError:] + 2134"
13
:
"13  beebo                               0x000000010c19e537 __36-[FBSDKGraphRequestConnection start]_block_invoke_2 + 167"
14
:
"14  beebo                               0x000000010c1cd974 __65-[FBSDKURLSessionTask invokeHandler:error:response:responseData:]_block_invoke + 52"
15
:
"15  libdispatch.dylib                   0x0000000113bfc585 _dispatch_call_block_and_release + 12"
16
:
"16  libdispatch.dylib                   0x0000000113c1d792 _dispatch_client_callout + 8"
17
:
"17  libdispatch.dylib                   0x0000000113c05247 _dispatch_main_queue_callback_4CF + 1041"
18
:
"18  CoreFoundation                      0x0000000112a86909 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9"
19
:
"19  CoreFoundation                      0x0000000112a4cae4 __CFRunLoopRun + 2164"
20
:
"20  CoreFoundation                      0x0000000112a4c016 CFRunLoopRunSpecific + 406"
21
:
"21  GraphicsServices                    0x000000011469ba24 GSEventRunModal + 62"
22
:
"22  UIKit                               0x00000001102e90d4 UIApplicationMain + 159"
23
:
"23  beebo                               0x000000010c15629f main + 111"
24
:
"24  libdyld.dylib                       0x0000000113c6665d start + 1"
25
:
"25  ???                                 0x0000000000000001 0x0 + 1"
    ],
    "domain": "com.facebook.sdk.login",
    "userInfo": {}
}

I tried my best to print the returned object here.

With a normal, non-test user works perfectly.

Does anyone have a hint of what might be going on?

EDIT: The problem here is that apple will only approve my app if I provide a test user.

Patrick Bassut
  • 3,310
  • 5
  • 31
  • 54

1 Answers1

-1

So, I finally found the answer. Looks like apple changed the way keychain works on iOS 10. For more information checkout this answer: How to use Facebook iOS SDK on iOS 10

Community
  • 1
  • 1
Patrick Bassut
  • 3,310
  • 5
  • 31
  • 54