Open hajimeku opened 4 years ago
Hello,
We also had this issue in ~25% of cases of users trying to initialize FB on WebGL in production. What solved it for us is changing from where FB.Init() is called, or more precisely, from which point in Unity update cycle we called it. Exceptions were happening while we have called FB.Init() from a Unity coroutine (i.e. between yield returns), and they stopped happening completely when we moved FB.Init() to be called from a Unity's Update() method. I assume that some edge case was happening, where FB SDK still wasn't finished setting up (creating) GameObjects for handling callbacks from native JavaScript...
Hope this helps, Milos Markovic Nordeus
Checklist
Environment
Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:
2019.2.17
7.18.1
WebGL
versionX.X.X
Goals
Not have this Exception thrown
Expected Results
Not have this Exception thrown
Actual Results
MethodAccessException: Attempt to access method 'Facebook.Unity.Canvas.ICanvasFacebookCallbackHandler.OnUrlResponse' on type '' failed.
Steps to Reproduce
Cant reproduce it myself, this shows up in the unity crashlytics logs. It happens a lot