midworld / unity-googledrive

Google Drive for Unity3D
Apache License 2.0
121 stars 28 forks source link

Exception: Authorization failed (Application name is not set) #32

Closed GuillermoDoradoVide closed 6 years ago

GuillermoDoradoVide commented 6 years ago

I get this message in the console log debugging in android build:

GoogleDrive+Exception: Authorization failed.

And in the Android Device monitor I get this error:

11-28 17:40:07.718: D/Unity-GoogleDrivePlugin(28571): setUnityActivity: com.unity3d.player.UnityPlayerActivity@bed688c 11-28 17:40:07.728: D/Unity-GoogleDrivePlugin(28571): auth with accountName: userNameSample1234567AV@gmail.com 11-28 17:40:07.738: W/AbstractGoogleClient(28571): Application name is not set. Call Builder#setApplicationName. 11-28 17:40:07.738: D/Unity-GoogleDrivePlugin(28571): google drive service: com.google.api.services.drive.Drive@d81164f 11-28 17:40:07.738: E/Unity-GoogleDrivePlugin(28571): checkAuthorized: java.lang.IllegalArgumentException: the name must not be empty: null

I thought I set everything correctly (in editor works and uploads a file)

midworld commented 6 years ago

Follow this page, we need more permission: https://stackoverflow.com/a/34701518

If you have given this permission(you can check this in several App settings in Settings app), refer this page: https://stackoverflow.com/questions/16115109/google-drive-on-android-error-java-lang-illegalargumentexception-the-name-must/41511391#41511391

GuillermoDoradoVide commented 6 years ago

Going into de AppSettings on android and giving "contact permissions", then launching the app the plugin works and no warning!

midworld commented 6 years ago

Good. Google Drive needs saved Google accounts on the mobile phone.