unity-googledrive icon indicating copy to clipboard operation
unity-googledrive copied to clipboard

iOS Build: invalid_request

Open peter-slattery opened this issue 8 years ago • 3 comments

I've gone through the process of getting this repo to build to iOS, and upon successfully launching the app on a device, instantly get a Debug.Log saying "invalid_request" as follows:

GoogleDrive+Exception: invalid_request
<InitGoogleDrive>c__Iterator0:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
 
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51

Background: Before this, I had gone through all of WebView.mm and removed all dealloc, release and retain commands. I also found that we needed to modify all webViewPlugin assignments to match below: WebViewPlugin *webViewPlugin = (__bridge WebViewPlugin *)instance;

peter-slattery avatar Dec 13 '17 00:12 peter-slattery

Hi Peter, It doesn't have the specific line where the exception is occurred. Can you build it with debug option to investigate? Thanks.

midworld avatar Dec 13 '17 14:12 midworld

We built it in Debug to begin with, but because it's in a Coroutine, the line numbers it provides aren't super helpful. We figured out that its this section in your DriveTest script:

if (authorization.Current is Exception) {
    Debug.LogWarning ((authorization.Current as Exception));
    goto finish;
} else
    Debug.Log ("User Account: " + drive.UserAccount);

The Google+Drive Exception is being raised by the Debug.LogWarning ((authorization.Current as Exception)); command

peter-slattery avatar Dec 13 '17 18:12 peter-slattery

Hmm, I think Google drive doesn't support OAuth2 anymore.

midworld avatar Dec 14 '17 04:12 midworld