It seems Facebook Login has been broken in Unity 2019.3.13f1 but works in 2019.3.7f1. Calling Login will show a login dialog briefly only to disappear but game will still be visible and “paused” like if game is still in the background (clock and notifications-bar is still shown).
I don’t have any particular logs with this because the app doesn’t crash it just stays like that forever. I don’t think this issue has to do with Facebook SDK in particular but rather a change in how some rendering is handled. It’s like there’s an invisible windows overlaying it all.
NOTE:
Also tested in Unity 2020.1, same issue there.
I needed to make a build for simulator (for Facebook review), but 2019.3.7f did have “gfx device initialization” issue and was told it was fixed in 2019.3.10+ so I updated to 2019.3.13f and also tested 2020.1 (because Metal works here) and came upon this problem.
I’m basically here now:
2019.3.7 = Facebook works but not simulator
2020.1 = Simulator works but not Facebook
I’m sorry but I don’t have the time to making a minimum project showcasing this as I spent 12 hours straight trying to figure out what I was doing wrong.
Writing this to see if other have same issue and hopefully someone with less fatigue and more time can provide a repro case and submit.
Issue has been reported here as well:
As I said there, I think the issue is a Unity issue rather than Facebook issue.
Can confirm that the issue doesn’t present after downgrading to 2019.3.9f1. No issues downgrading either, just had to delete the package cache from Library
Hello, same issue here with 2019.3.13f1 or 3.11f1 and FB 7.19.2 or 7.18.1
With Unity 2019.3.9f1 and FB 7.18.1 it is ok.
Seems to happened when we are already connected to facebook app. I will try to upgrade FB sdk with 2019.3.9f1.
So much time lost to track issue each time we update Unity or facebook… Really!
Note: Be carefull FB.ShareLink on iOS does not call callback. I use FB.FeedShare instead for iOS. Android is ok.
That’s because UnityAppController.mm closes any presenting views, such as FB login. You can fix it by commenting out createSnapshotView and closeSnapshotView calls in UnityAppController. I hope Unity fixes it in future releases.
Solution (from thread): “Alternatively if you don’t want to setup a post-processor the UNITY_SNAPSHOT_VIEW_ON_APPLICATION_PAUSE flag can be turned off simply by unticking the “Render extra frame on pause” option in the iOS Player Settings area.”
This should be easy for you guys (Unity) to replicate and fix as it’s very straight forward. Probably you force closes native dialogs (or something) on pause to get a “nice” preview frame.