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

Problem with Facebook SDK and Invite SDK #75

Closed
comtaler opened this issue Apr 7, 2017 · 5 comments
Closed

Problem with Facebook SDK and Invite SDK #75

comtaler opened this issue Apr 7, 2017 · 5 comments

Comments

@comtaler
Copy link

comtaler commented Apr 7, 2017

I am experiencing the same problem as reported in issue #32 with the latest SDK. After connecting to facebook, it stays on the browser with a blank page and it does not return.

Unity version: 5.5.1p2
Facebook SDK version: 7.9.4
Invite SDK version: 3.0.1

I tested it with the sample invite project. Here is the console log:

2017-04-07 11:02:39.611 appname[337:45401] -> registered mono modules 0x100dba2f0
-> applicationDidFinishLaunching()
2017-04-07 11:02:39.781 appname[337:45401] Metal GPU Frame Capture Enabled
2017-04-07 11:02:39.781 appname[337:45401] Metal API Validation Disabled
-> applicationDidBecomeActive()
GfxDevice: creating device client; threaded=1
Init: screen size 1080x1920
Initializing Metal device caps: Apple A8 GPU
Initialize engine version: 5.5.1p2 (72bb63a39d55)
UnloadTime: 1.119500 ms
Setting up firebase...
UIHandler:DebugLog(String)
UIHandler:InitializeFirebase()
UIHandler:Start()
 
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

2017-04-07 11:02:42.400 appname[337] <Notice> [Firebase/Analytics][I-ACS023007] Firebase Analytics v.3700000 started
2017-04-07 11:02:42.405 appname[337] <Notice> [Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
2017-04-07 11:02:42.408 appname[337] <Notice> [Firebase/Analytics][I-ACS003007] Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2017-04-07 11:02:42.441 appname[337] <Warning> [Firebase/Analytics][I-ACS005000] The AdSupport Framework is not currently linked. Some features will not function properly. Learn more at http://goo.gl/9vSsPb
2017-04-07 11:02:42.460 appname[337] <Notice> [Firebase/Analytics][I-ACS023012] Firebase Analytics enabled
Invites initialized
UIHandler:DebugLog(String)
UIHandler:Start()
 
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

Using Facebook Unity SDK v7.9.4 with FBiOSSDK/4.17.0
Facebook.Unity.CompiledFacebookLoader:Start()
 
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

No Invite or Deep Link received on start up
UIHandler:DebugLog(String)
Firebase.Invites.Listener:TrySendCachedMessage()
Firebase.AppUtil:PollCallbacks()
 
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

-> applicationWillResignActive()
2017-04-07 11:03:07.470 appname[337:45401] DEBUG: OpenURL(fb1318350838212620://authorize/#state={"challenge":"3tw1qqHVuUAvW8bcpDy29vayqGk%3D","0_auth_logger_id":"ED7D5F5D-2919-4E10-8CBC-3F2250B9628E","com.facebook.sdk_client_state":true,"3_method":"sfvc_auth"}&granted_scopes=user_friends,email,contact_email,publish_actions,public_profile&denied_scopes=&signed_request=<signed request code>
OpenURL(fb1318350838212620://authorize/#state={"challenge":"3tw1qqHVuUAvW8bcpDy29vayqGk%3D","0_auth_logger_id":"ED7D5F5D-2919-4E10-8CBC-3F2250B9628E","com.facebook.sdk_client_state":true,"3_method":"sfvc_auth"}&granted_scopes=user_friends,email,contact_email,publish_actions,public_profile&denied_scopes=&signed_request=<signed request code>
 
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

2017-04-07 11:03:07.480 appname[337:45401] DEBUG: Method not cached for class FIRA_UnityAppController-1491588162408 selector application:openURL:options:.
Method not cached for class FIRA_UnityAppController-1491588162408 selector application:openURL:options:.
 
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)

-> applicationDidBecomeActive()
Fetch Pending Invites
Firebase.Invites.FirebaseInvitesHandler:OnApplicationFocus(Boolean)
 
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
@comtaler
Copy link
Author

Any update on this?

One more piece of info: it happens on both iOS 9 and iOS 10.

@BoaNeo
Copy link

BoaNeo commented Apr 28, 2017

Anything? I have the same issue... FB redirects to blank page, no errors or warning in the log and no indication that anything went wrong, but it's not working. I've been through every trick on SO with no luck.

@stewartmiles
Copy link
Contributor

Looks like we missed this message, sorry about that.
From my response on https://developers.facebook.com/bugs/992759727521507/

"We (Firebase / FPL at Google) found the issue today. It turns out that Unity's AppDelegate doesn't implement the new openURL selector but we swizzle it in (add it to the app delegate) on initialization. This results in the URL being handled by our openURL method which doesn't call Unity's legacy openURL selector and hence notify the Facebook SDK that a sign-in in complete. We'll cook up a workaround. In the meantime you can "fix" this by adding the following to UnityAppController.mm:

  • (BOOL)application:(UIApplication *)app
    openURL:(NSURL *)url
    options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
    {
    NSString *sourceApplication = options[UIApplicationOpenURLOptionsSourceApplicationKey];
    id annotation = options[UIApplicationOpenURLOptionsAnnotationKey];
    return [self application:app openURL:url sourceApplication:sourceApplication annotation:annotation];
    }
    "

We have a fix lined up and are running through QA at the moment but this workaround should be fine until then.

@BoaNeo
Copy link

BoaNeo commented Apr 28, 2017 via email

@jonsimantov
Copy link
Contributor

We have released version 3.0.2 of the Firebase Unity SDK, which fixes this issue. You can view the release notes and download the new version from http://firebase.google.com/docs/unity/setup.

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

No branches or pull requests

4 participants