Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by MukeshM · Feb 27, 2017 at 11:05 AM · androidunity 5google playgoogle play games

Unity Google Play Service Plugin Social.localUser.Authenticate(…) App Crash

Unity3d Code for Google Play Service.I am using GooglePlayGamesPlugin-0.9.36 and Unity 5.4

 using UnityEngine;
     using System.Collections;
     using UnityEngine.SocialPlatforms;
     using GooglePlayGames;
 
 public class MainGui : MonoBehaviour
 {
     private const float FontSizeMult = 0.05f;
     private bool mWaitingForAuth = false;
     private string mStatusText = "Ready.";
     private bool dumpedToken = false;
 void Start()
 {
     // Select the Google Play Games platform as our social platform implementation
     PlayGamesPlatform.Activate();
 }
 
 void OnGUI()
 {
     GUI.skin.button.fontSize = (int)(FontSizeMult * Screen.height);
     GUI.skin.label.fontSize = (int)(FontSizeMult * Screen.height);
 
     GUI.Label(new Rect(20, 20, Screen.width, Screen.height * 0.25f),
               mStatusText);
 
     Rect buttonRect = new Rect(0.25f * Screen.width, 0.10f * Screen.height,
                       0.5f * Screen.width, 0.25f * Screen.height);
     Rect imageRect = new Rect(buttonRect.x + buttonRect.width / 4f,
                               buttonRect.y + buttonRect.height * 1.1f,
                               buttonRect.width / 2f, buttonRect.width / 2f);
 
     if (mWaitingForAuth)
     {
         return;
     }
 
     string buttonLabel;
 
 
     if (Social.localUser.authenticated)
     {
         buttonLabel = "Sign Out";
         if (Social.localUser.image != null)
         {
             GUI.DrawTexture(imageRect, Social.localUser.image,
                             ScaleMode.ScaleToFit);
         }
         else {
             GUI.Label(imageRect, "No image available");
         }
 
         mStatusText = "Ready";
 
         if (!dumpedToken)
         {
             string token = GooglePlayGames.PlayGamesPlatform.Instance.GetToken();
 
             Debug.Log("AccessToken = " + token);
             dumpedToken = token != null && token.Length > 0;
         }
     }
     else {
         buttonLabel = "Authenticate";
     }
 
     if (GUI.Button(buttonRect, buttonLabel))
     {
         if (!Social.localUser.authenticated)
         {
             // Authenticate
             mWaitingForAuth = true;
             mStatusText = "Authenticating...";
             Social.localUser.Authenticate((bool success) =>
             {
                 mWaitingForAuth = false;
                 if (success)
                 {
                     mStatusText = "Welcome " + Social.localUser.userName;
                 }
                 else {
                     mStatusText = "Authentication failed.";
                 }
             });
         }
         else {
             // Sign out!
             mStatusText = "Signing out.";
             ((GooglePlayGames.PlayGamesPlatform)Social.Active).SignOut();
         }
     }
     }
 }

App crash when I Press Authenticate Button.And Google Play Service Dialog does not appear.I have build the app and run it in Android Mobile.

 02-25 20:18:42.181: A/DEBUG(583): pid: 23421, tid: 23439, name: main  >>> devnp.testing <<<
 02-25 20:18:42.197: W/debuggerd(583): type=1400 audit(0.0:35378): avc: denied { search } for name="devnp.testing" dev="dm-1" ino=141182 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
 02-25 20:18:42.260: A/DEBUG(583):     #11 pc 0009221b  /data/app/devnp.testing-1/lib/arm/libgpg.so
 02-25 20:18:42.260: A/DEBUG(583):     #12 pc 00092e37  /data/app/devnp.testing-1/lib/arm/libgpg.so
 02-25 20:18:42.261: A/DEBUG(583):     #13 pc 000933dd  /data/app/devnp.testing-1/lib/arm/libgpg.so
 02-25 20:18:42.261: A/DEBUG(583):     #14 pc 0008dc69  /data/app/devnp.testing-1/lib/arm/libgpg.so (_ZNK3gpg28AndroidPlatformConfiguration5ValidEv+76)
 02-25 20:18:42.261: A/DEBUG(583):     #15 pc 00053441  /data/app/devnp.testing-1/lib/arm/libgpg.so (_ZN3gpg12GameServices7Builder6CreateERKNS_28AndroidPlatformConfigurationE+40)
 02-25 20:18:42.261: A/DEBUG(583):     #16 pc 000c73dd  /data/app/devnp.testing-1/lib/arm/libgpg.so (GameServices_Builder_Create+16)
 02-25 20:18:43.054: W/ActivityManager(1439):   Force finishing activity devnp.testing/com.unity3d.player.UnityPlayerActivity
 02-25 20:18:43.233: I/ActivityManager(1439): Process devnp.testing (pid 23421) has died
 02-25 20:18:43.234: W/InputDispatcher(1439): channel 'd1b52d4 devnp.testing/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
 02-25 20:18:43.234: E/InputDispatcher(1439): channel 'd1b52d4 devnp.testing/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
 02-25 20:18:43.237: I/WindowState(1439): WIN DEATH: Window{d1b52d4 u0 devnp.testing/com.unity3d.player.UnityPlayerActivity}
 02-25 20:18:43.237: W/InputDispatcher(1439): Attempted to unregister already unregistered input channel 'd1b52d4 devnp.testing/com.unity3d.player.UnityPlayerActivity (server)'

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image _Yash_ · Feb 27, 2017 at 11:08 AM 0
Share

have a look if this helps:
http://stackoverflow.com/questions/42457572/unity-google-play-service-plugin-social-localuser-authenticate-app-crash

avatar image MukeshM _Yash_ · Feb 27, 2017 at 05:23 PM 0
Share

After trying for two days i posted the same question in stackoverflow and here.I found the solution.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by MukeshM · Feb 28, 2017 at 07:47 AM

Downgrading the .aar file fix the problem

See: https://github.com/playgameservices/play-games-plugin-for-unity/issues/1604

Older Files: https://drive.google.com/drive/u/0/folders/0B-w9u2zDKrHGUmtjMmk2VDhhSjA

Here is how I worked around this issue:

  1. Go to Assets > Play Services Resolver > Android Resolver > Settings Un-tick Enable Background resolution (This will suppress the update notifications once we downgrade the .aar files)

  2. Go to \extras\google\m2repository\com\google\android\gms .Inside each of the folders there are version folders (such as 10.0.1, 10.2.0). And inside those are the .aar files we need or download from above google drive link We will need the following files:

    • play-services-ads-10.0.1.aar

    • play-services-ads-lite-10.0.1.aar

    • play-services-auth-10.0.1.aar

    • play-services-auth-base-10.0.1.aar

    • play-services-base-10.0.1.aar

    • play-services-basement-10.0.1.aar

    • play-services-clearcut-10.0.1.aar

    • play-services-drive-10.0.1.aar

    • play-services-games-10.0.1.aar

    • play-services-gass-10.0.1.aar

    • play-services-nearby-10.0.1.aar

    • play-services-tasks-10.0.1.aar

  3. Under \Assets\Plugins\Android delete the 10.2.0 versions of the .aar files above, with their META files.

  4. Copy the 10.0.1 versions over

  5. Build and run your project.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Phoskryfes · Oct 08, 2017 at 05:52 AM 0
Share

I don't have any AAR files here but it doesn't crash nor it doesn't authenticate.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Problem with Google Play Game Services: Invalid Classname 1 Answer

Android - Error building Player: CommandInvokationFailure: Failed to re-package resources 0 Answers

Google Play Services error 0 Answers

Apk Build size increase after upgrade to unity 5 1 Answer

using GooglePlayGames; not working? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges