gree / gree/unity-webview

SendMessage: object WebViewObject does not have receiver for function CallOnLoaded!

Open
#292 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C++
Stars
2.7k
Forks
734
Avg merge
11h 39m
Merged PRs (30d)
1

Description

I am building a Facebook authentication SDK in Unity with C# which involves using the Unity WebView object for user authentication. When the user presses continue, and their credentials were valid, I redirect them to a success page (specifically, "https://www.facebook.com/connect/login_success.html")

I then see where we were directed to, and if it was the success page we close the BrowserView. Sometimes this works, but occasionally I get the repeated error:

SendMessage: object WebViewObject does not have receiver for function CallOnLoaded! (Sometimes it says CallFromJS instead of CallOnLoaded)

And the BrowserView does not close. Unfortunately this error is Nondeterministic in that it appears only occasionally each time!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the WebViewObject callbacks named CallOnLoaded and CallFromJS and reproduce the Facebook authentication redirect to the stated success page. Determine why the callback sometimes has no receiver; done means the redirect consistently closes BrowserView without either SendMessage error.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
authentication, game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.