Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login gets stuck in loop in 9.0.0 if Facebook app is installed #546

Open
1 task done
Cptweirdo opened this issue Apr 20, 2021 · 9 comments
Open
1 task done

Login gets stuck in loop in 9.0.0 if Facebook app is installed #546

Cptweirdo opened this issue Apr 20, 2021 · 9 comments
Labels

Comments

@Cptweirdo
Copy link

Cptweirdo commented Apr 20, 2021

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

  • Unity Editor Version: 2018.4.32(.NET 3.5)
  • Xcode Version 12.4
  • Unity SDK Version: 9.0.0
  • Installation Platform & Verison: [iOS] version 14.5(18E5154f)
  • Facebook app installed
  • Included 3rd Party SDKs: AppsFlyer 6.2.2, Firebase Analytics 7.1.0

Goals

Log into the game using facebook gaming login via the Facebook app.

Expected Results

User taps the login button, gets a propmt to switch to the Facebook app. On confirmation user is returned to the app where login success callback is executed.

Actual Results

On confirming login in the facebook app, user is returned the our app, but neither success nor error callbacks are triggered.

Steps to Reproduce

  • Logout of the app
  • Logout of Facebook on your default browser
  • In the app, login via Facebook
  • When it opens your browser, the browser would ask "Do you want to login through the Facebook app?"
  • Say yes
  • it would go to Facebook app and return to app (still not logged in)

Code Samples & Details

Our issue seems to be similar to these issues:

However suggested fix to enable the iOS swizzling for the AppsFlyer SDK does not solve problems for all the users.

Here's a log of the error:

-> applicationWillResignActive()
2021-04-21 08:22:35.044787+0200 footballmanager[1063:508071] swizzled applicationDidBecomeActive
-> applicationDidBecomeActive()
-> applicationWillResignActive()
2021-04-21 08:22:39.143466+0200 footballmanager[1063:508071] swizzled applicationDidEnterBackground
-> applicationDidEnterBackground()
-> applicationWillEnterForeground()
2021-04-21 08:22:48.599457+0200 footballmanager[1063:508071] swizzled openURL
2021-04-21 08:22:48.956194+0200 footballmanager[1063:510290] 7.5.0 - [Firebase/Analytics][I-ACS023000] Deep Link Web URL query is empty
2021-04-21 08:22:48.988706+0200 footballmanager[1063:508289] [connection] nw_read_request_report [C7] Receive failed with error "Software caused connection abort"
2021-04-21 08:22:48.998704+0200 footballmanager[1063:508289] [connection] nw_read_request_report [C4] Receive failed with error "Software caused connection abort"
2021-04-21 08:22:49.004311+0200 footballmanager[1063:508289] Connection 7: encountered error(1:53)
2021-04-21 08:22:49.007265+0200 footballmanager[1063:508289] Connection 7: received failure notification
2021-04-21 08:22:49.008679+0200 footballmanager[1063:508289] [connection] nw_connection_copy_connected_local_endpoint [C7] Connection has no local endpoint
2021-04-21 08:22:49.010444+0200 footballmanager[1063:508289] Connection 4: encountered error(1:53)
2021-04-21 08:22:49.012331+0200 footballmanager[1063:508289] Connection 4: received failure notification
2021-04-21 08:22:49.013514+0200 footballmanager[1063:508289] [connection] nw_connection_copy_connected_local_endpoint [C4] Connection has no local endpoint
2021-04-21 08:22:49.016235+0200 footballmanager[1063:508289] Connection 8: received failure notification
2021-04-21 08:22:49.018139+0200 footballmanager[1063:508289] [connection] nw_flow_add_write_request [C8.1.1 35.241.52.229:443 failed channel-flow (satisfied (Path is satisfied), interface: en0, ipv4, ipv6, dns)] cannot accept write requests
2021-04-21 08:22:49.018329+0200 footballmanager[1063:508289] [connection] nw_write_request_report [C8] Send failed with error "Socket is not connected"
2021-04-21 08:22:49.130966+0200 footballmanager[1063:508071] swizzled applicationDidBecomeActive
-> applicationDidBecomeActive()
AppsFlyer_Unity_v6.2.2 onAppOpenAttribution called

2021-04-21 08:22:49.650903+0200 footballmanager[1063:508289] [tcp] tcp_input [C11.1.1:3] flags=[R] seq=3224266975, ack=0, win=0 state=CLOSED rcv_nxt=3224266975, snd_una=4145637851
2021-04-21 08:22:49.652027+0200 footballmanager[1063:509853] [tcp] tcp_input [C11.1.1:3] flags=[R] seq=3224266975, ack=0, win=0 state=CLOSED rcv_nxt=3224266975, snd_una=4145637851
Uploading Crash Report
Exception: Login failed
FBError => An unknown error has occurred.  // <- "An unknown error has occurred" is the error message returned from the FB SDK
@Cptweirdo Cptweirdo added the bug label Apr 20, 2021
@ppansy
Copy link
Contributor

ppansy commented Apr 22, 2021

Hey, from the description "neither success nor error callbacks are triggered", but from the log it seems like a FBError was returned. Do you mind confirming the behavior? thanks

@legoritma
Copy link

We're facing same issue, it probably caused by Facebook gaming. Our Facebook contact informed us they're internally investigating in this issue (I don't have any public issue or detail link).

@EllieTellie
Copy link

Likewise. The callback just says unknown error on the callback. FB.LogInWithReadPermissions("gaming_profile", "user_friends", Callback);

@IgorGalimski
Copy link

Do you use Appsflyer? If yes - use swizzling for it

@EllieTellie
Copy link

EllieTellie commented May 4, 2021

Do you use Appsflyer? If yes - use swizzling for it

We do not use AppsFlyer, but we do use a lot of other SDKs. Ironsource, Firebase, Amplitude, Adjust and the list goes on.

Some users are still experiencing not being able to login.

@IgorGalimski
Copy link

@EllieTellie
Make a search in you project to AppDelegateListener
You need to merge all AppDelegateListeners in one
Screen Shot 2021-05-05 at 08 43 54

@EllieTellie
Copy link

EllieTellie commented May 5, 2021

Ok yes, we do have UnityRegisterAppDelegateListener(...) and an SDK which is overriding UnityAppController and maybe messing with this. Thanks a lot @IgorGalimski

@legoritma
Copy link

legoritma commented May 5, 2021

Do you use Appsflyer? If yes - use swizzling for it

I believe this is unrelated. We use appsflyer and swizling enabled. The sytmptoms are different when the problem is swizling, the login callback is never called. In this issue the callback is called with "An unknown error has occurred."

@EllieTellie
Copy link

EllieTellie commented May 6, 2021

Ok here's what fixed our case (non-appsflyer but similar issue). We had an SDK that implemented a custom AppController to replace the UnityAppController but that custom AppController had an override for continueUserActivity which always returned YES preventing other apps like Facebook from handling it. Simply returning NO and allowing other Apps to handle them fixed it for us.

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

No branches or pull requests

5 participants