Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Creating a GameServices object. #884

Closed
shreychowdhary opened this issue Dec 23, 2015 · 18 comments
Closed

Error Creating a GameServices object. #884

shreychowdhary opened this issue Dec 23, 2015 · 18 comments

Comments

@shreychowdhary
Copy link

@shreychowdhary shreychowdhary commented Dec 23, 2015

12-23 13:09:53.369 26779 26797 I Unity : InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK
12-23 13:09:53.369 26779 26797 I Unity : at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Build (GooglePlayGames.Native.PInvoke.PlatformConfiguration configRef) [0x0002d] in J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\PInvo
ke\GameServicesBuilder.cs:186
12-23 13:09:53.369 26779 26797 I Unity : at GooglePlayGames.Native.NativeClient.InitializeGameServices () [0x000a6] in J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:189
12-23 13:09:53.369 26779 26797 I Unity : at GooglePlayGames.Native.NativeClient.Authenticate (System.Action1 callback, Boolean silent) [0x00099] in J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:128 12-23 13:09:53.369 26779 26797 I Unity : at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action1 callback, Boolean silent) [0x00026] in J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:305
12-23 13:09:53.369 26779 26797 I Unity : at GooglePlayGames.PlayGamesPlatform.Authenticate (System.Action`1 callback) [0x00000] in J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:275

@claywilkinson
Copy link
Contributor

@claywilkinson claywilkinson commented Dec 23, 2015

This message: InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK usually means that the Android SDK is too old. You should update the Google Play services, Google Repository, Android Support Library, and Android Support Repository components. Then run the Google Play Games plugin setup again for your project to copy over the updated files.

You can get to the SDK manager from Unity via Window > Google Play Games > Downloads > Google Play Games SDK (Android).

@shreychowdhary
Copy link
Author

@shreychowdhary shreychowdhary commented Dec 23, 2015

All of these packages are already up to date and it still doesn't work

@claywilkinson
Copy link
Contributor

@claywilkinson claywilkinson commented Dec 23, 2015

Earlier in the log it will list the problem, can you share that part or the log?

@shreychowdhary
Copy link
Author

@shreychowdhary shreychowdhary commented Dec 23, 2015

Here is some more of the log
[Play Games Plugin DLL] 12/23/15 17:18:22 -05:00 DEBUG: Creating platform-specific Play Games client.
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
GooglePlayGames.OurUtils.Logger:d(String) (at J:\FlyBy\Assets\GooglePlayGames\OurUtils\Logger.cs:58)
GooglePlayGames.PlayGamesPlatform:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:300) GooglePlayGames.PlayGamesPlatform:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:275)
GooglePlayGames.PlayGamesLocalUser:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesLocalUser.cs:48) GameManager:SignIn() (at J:\FlyBy\Assets\Scripts\GameManager.cs:129) UnityEngine.Events.InvokableCall:Invoke(Object[]) UnityEngine.Events.InvokableCallList:Invoke(Object[]) UnityEngine.Events.UnityEventBase:Invoke(Object[]) UnityEngine.Events.UnityEvent:Invoke() UnityEngine.UI.Button:Press() (at C:\buildslave\unity\bui [Play Games Plugin DLL] 12/23/15 17:18:22 -05:00 DEBUG: Creating Android IPlayGamesClient Client UnityEngine.Debug:Internal_Log(Int32, String, Object) UnityEngine.Debug:Log(Object) GooglePlayGames.OurUtils.Logger:d(String) (at J:\FlyBy\Assets\GooglePlayGames\OurUtils\Logger.cs:58) GooglePlayGames.PlayGamesClientFactory:GetPlatformPlayGamesClient(PlayGamesClientConfiguration) (at J:\FlyBy\Assets\GooglePlayGames\Platforms\PlayGamesClientFactory.cs:34) GooglePlayGames.PlayGamesPlatform:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:301)
GooglePlayGames.PlayGamesPlatform:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:275) GooglePlayGames.PlayGamesLocalUser:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesLocalUser.cs:48)
GameManager:SignIn() (at J:\FlyBy\Assets\Scripts\GameManager.cs:129)
UnityEngine.Events.InvokableCall:Invoke(Object[])
UnityEngine.Events.InvokableCallLi
Building GPG services, implicitly attempts silent auth
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:Log(Object)
GooglePlayGames.Native.NativeClient:InitializeGameServices() (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:187)
GooglePlayGames.Native.NativeClient:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:128) GooglePlayGames.PlayGamesPlatform:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:305)
GooglePlayGames.PlayGamesPlatform:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:275) GooglePlayGames.PlayGamesLocalUser:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesLocalUser.cs:48)
GameManager:SignIn() (at J:\FlyBy\Assets\Scripts\GameManager.cs:129)
UnityEngine.Events.InvokableCall:Invoke(Object[])
UnityEngine.Events.InvokableCallList:Invoke(Object[])
UnityEngine.Events.
InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK
at GooglePlayGames.Native.PInvoke.GameServicesBuilder.Build (GooglePlayGames.Native.PInvoke.PlatformConfiguration configRef) [0x0002d] in J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\PInvo

@claywilkinson
Copy link
Contributor

@claywilkinson claywilkinson commented Dec 23, 2015

That's the right section, but can you not filter the log and share the raw logcat?

@shreychowdhary
Copy link
Author

@shreychowdhary shreychowdhary commented Dec 23, 2015

Here the problem is it can't register one of the Java classes
Unity : Building GPG services, implicitly attempts silent auth
Unity : UnityEngine.Debug:Internal_Log(Int32, String, Object)
Unity : UnityEngine.Debug:Log(Object)
Unity : GooglePlayGames.Native.NativeClient:InitializeGameServices() (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\Nativ
Unity : GooglePlayGames.Native.NativeClient:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Nativ Unity : GooglePlayGames.PlayGamesPlatform:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\P
Unity : GooglePlayGames.PlayGamesPlatform:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesP Unity : GooglePlayGames.PlayGamesLocalUser:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGames
Unity : GameManager:SignIn() (at J:\FlyBy\Assets\Scripts\GameManager.cs:129)
Unity : UnityEngine.Events.InvokableCall:Invoke(Object[])
Unity : UnityEngine.Events.InvokableCallList:Invoke(Object[])
Unity : UnityEngine.Events.
GamesNativeSDK: Could not register one or more required Java classes.
Unity : InvalidOperationException: There was an error creating a GameServices object. Check for log errors from GamesNativeSDK

@claywilkinson
Copy link
Contributor

@claywilkinson claywilkinson commented Dec 23, 2015

Yep, that's it. If you look at the whole log, the class not being loaded will be listed. Then the aar or jar file for that class needs to be added to the project. I think the error comes out pretty early when the process is starting...

@shreychowdhary
Copy link
Author

@shreychowdhary shreychowdhary commented Dec 23, 2015

"GamesNativeSDK: Can't register class com/google/android/gms/appstate/AppStateManager: an exception occurred." Is the the class that isn't being loaded and if so how would I add it to the project. Thanks so much for your help so far.
GamesUnitySDK: Performing Android initialization of the GPG SDK
GamesNativeSDK: Can't register class com/google/android/gms/appstate/AppStateManager: an exception occurred.
Unity : Building GPG services, implicitly attempts silent auth
Unity : UnityEngine.Debug:Internal_Log(Int32, String, Object)
Unity : UnityEngine.Debug:Log(Object)
Unity : GooglePlayGames.Native.NativeClient:InitializeGameServices() (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:187)
Unity : GooglePlayGames.Native.NativeClient:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\Platforms\Native\NativeClient.cs:128) Unity : GooglePlayGames.PlayGamesPlatform:Authenticate(Action1, Boolean) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:305)
Unity : GooglePlayGames.PlayGamesPlatform:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesPlatform.cs:275) Unity : GooglePlayGames.PlayGamesLocalUser:Authenticate(Action1) (at J:\FlyBy\Assets\GooglePlayGames\ISocialPlatform\PlayGamesLocalUser.cs:48)
Unity : GameManager:SignIn() (at J:\FlyBy\Assets\Scripts\GameManager.cs:129)
Unity : UnityEngine.Events.InvokableCall:Invoke(Object[])
Unity : UnityEngine.Events.InvokableCallList:Invoke(Object[])
Unity : UnityEngine.Events.
GamesNativeSDK: Could not register one or more required Java classes.

@shreychowdhary
Copy link
Author

@shreychowdhary shreychowdhary commented Dec 24, 2015

I was able to fix it thanks

@claywilkinson
Copy link
Contributor

@claywilkinson claywilkinson commented Dec 24, 2015

Great! The class com/google/android/gms/appstate/AppStateManager was removed from the Android SDK, this means there was an old gpg.so (The Game services C++ SDK). Did you remove an old one or update the plugin?

@shreychowdhary
Copy link
Author

@shreychowdhary shreychowdhary commented Dec 27, 2015

I'm sorry for taking so long to respond. I completely reinstalled the
plugin. I suspect that when I updated earlier, I left traces of the old
plugin. Thanks for your work on the plugin.

On Wed, Dec 23, 2015 at 11:02 PM, Clayton Wilkinson <
notifications@github.com> wrote:

Great! The class com/google/android/gms/appstate/AppStateManager was
removed from the Android SDK, this means there was an old gpg.so (The Game
services C++ SDK). Did you remove an old one or update the plugin?


Reply to this email directly or view it on GitHub
#884 (comment)
.

@claywilkinson
Copy link
Contributor

@claywilkinson claywilkinson commented Jan 4, 2016

Great! glad you got it working.

@tnbao91
Copy link

@tnbao91 tnbao91 commented Jan 21, 2016

I have a same problem. Can you show me how to fix it ?

@felipecaldas
Copy link

@felipecaldas felipecaldas commented Aug 3, 2016

Yeah, same problem here. Currently on version 8.4.0 but when I upgrade to 9.4.0 I get DEX error... Guess I need to keep trying!

@felipecaldas
Copy link

@felipecaldas felipecaldas commented Aug 4, 2016

Yeah, it's working now. Had to delete AdMob and GPlay and reimport everything back again...

@haseebahmad109
Copy link

@haseebahmad109 haseebahmad109 commented Sep 28, 2016

I am facing the same issue after updating to the latest build, can you please guide me how to resolve this error ?

@AlcantaraRW
Copy link

@AlcantaraRW AlcantaraRW commented Oct 4, 2016

Same problem here... I'm using the latest build (0.9.34).

@qbit86
Copy link
Contributor

@qbit86 qbit86 commented Oct 5, 2016

Similar issue. Either DEX build error, or run-time failure depending on which versions of play-services-*.aar used.

@AlcantaraRW Connected issue: #1382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
7 participants
You can’t perform that action at this time.