• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android Google Play Services Extension crash (details inside)

G

Guy_Typing

Guest
Hey guys, I just purchased the GMS2 mobile platform module and am in the process of migrating my GMS1.4 projects.

Currently I am dealing with getting the cloud saving to work right, as on startup of the game on the mobile device the game is currently crashing. Google play lets me know that the issue is as follows

Code:
java.lang.IllegalStateException

com.companyname_removed.gamename_removed.GooglePlayServicesExtension$1.doInBackground
So it appears that the issue is with the google play services extension java code. I'm aware of how to access this code and change it if need be, however I'm pretty basic with Java code and am wondering if anyone out there with superior knowledge can help me.

I appreciate you taking the time to read this and appreciate the help, thanks!
 
G

Guy_Typing

Guest
Update: After some more testing I can say with confidence the problem is the cloud_synchronise() function, as that is when it crashes. Anyone else have this function working on GMS2?
 

rwkay

GameMaker Staff
GameMaker Dev.
Have you filed a bug with an example project that illustrates the problem???

Russell
 

rwkay

GameMaker Staff
GameMaker Dev.
Can you PM me the bug or ticket number so I can chase to see what is happening?

Russell
 
K

KatoneVi

Guest
This log looks handy! I'm sure Guy_Typing and I are running into this issue right here!
This issue occurs for both cloud_sync and cloud_save

E/AndroidRuntime(12394): Caused by: java.lang.IllegalStateException: Must include Drive.SCOPE_APPFOLDER to use snapshots!

=============================================
Full Log
=============================================
I/yoyo (12394): Method found, attempting to invoke onGSCloudSync

I/yoyo (12394): onGSCloudSync called with id=3

E/AndroidRuntime(12394): FATAL EXCEPTION: AsyncTask #3

E/AndroidRuntime(12394): Process: com.my.game, PID: 12394

E/AndroidRuntime(12394): java.lang.RuntimeException: An error occured while executing doInBackground()

E/AndroidRuntime(12394): at android.os.AsyncTask$3.done(AsyncTask.java:300)

E/AndroidRuntime(12394): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)

E/AndroidRuntime(12394): at java.util.concurrent.FutureTask.setException(FutureTask.java:222)

E/AndroidRuntime(12394): at java.util.concurrent.FutureTask.run(FutureTask.java:242)

E/AndroidRuntime(12394): at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)

E/AndroidRuntime(12394): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)

E/AndroidRuntime(12394): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)

E/AndroidRuntime(12394): at java.lang.Thread.run(Thread.java:818)

E/AndroidRuntime(12394): Caused by: java.lang.IllegalStateException: Must include Drive.SCOPE_APPFOLDER to use snapshots!

E/AndroidRuntime(12394): at android.os.Parcel.readException(Parcel.java:1548)

E/AndroidRuntime(12394): at android.os.Parcel.readException(Parcel.java:1493)

E/AndroidRuntime(12394): at com.google.android.gms.games.internal.IGamesService$Stub$Proxy.zza(Unknown Source)

E/AndroidRuntime(12394): at com.google.android.gms.games.internal.GamesClientImpl.zza(Unknown Source)

E/AndroidRuntime(12394): at com.google.android.gms.games.internal.api.SnapshotsImpl$2.zza(Unknown Source)

E/AndroidRuntime(12394): at com.google.android.gms.games.internal.api.SnapshotsImpl$2.zza(Unknown Source)

E/AndroidRuntime(12394): at com.google.android.gms.internal.zzqc$zza.zzb(Unknown Source)

E/AndroidRuntime(12394): at com.google.android.gms.internal.zzqm.zzf(Unknown Source)

E/AndroidRuntime(12394): at com.google.android.gms.internal.zzqm.zzd(Unknown Source)

E/AndroidRuntime(12394): at com.google.android.gms.internal.zzqr.zzd(Unknown Source)

E/AndroidRuntime(12394): at com.google.android.gms.internal.zzqp.zzd(Unknown Source)

E/AndroidRuntime(12394): at com.google.android.gms.games.internal.api.SnapshotsImpl.open(Unknown Source)

E/AndroidRuntime(12394): at com.google.android.gms.games.internal.api.SnapshotsImpl.open(Unknown Source)

E/AndroidRuntime(12394): at com.my.game.GooglePlayServicesExtension$1.doInBackground(GooglePlayServicesExtension.java:704)

E/AndroidRuntime(12394): at com.my.game.GooglePlayServicesExtension$1.doInBackground(GooglePlayServicesExtension.java:700)

E/AndroidRuntime(12394): at android.os.AsyncTask$2.call(AsyncTask.java:288)

E/AndroidRuntime(12394): at java.util.concurrent.FutureTask.run(FutureTask.java:237)

E/AndroidRuntime(12394): ... 4 more

I/yoyo (12394): onPause

I/yoyo (12394): Pausing the Runner

I/yoyo (12394): vsync timeout...

I/yoyo (12394): Setting vis flags to 5894

I/yoyo (12394): onWindowFocusChanged(false|false)

I/yoyo (12394): Setting vis flags to 5894

I/yoyo (12394): Setting vis flags to 5894

I/yoyo (12394): Setting vis flags to 5894

I/yoyo (12394): onStop

I/yoyo (12394): googleplayservices extension onStop called

I/yoyo (12394): onDestroy

I/yoyo (12394): BILLING: Failing to unbind service Attempt to invoke virtual method 'void android.content.Context.unbindService(android.content.ServiceConnection)' on a null object reference

I/AndroidRuntime(12394): VM exiting with result code 0, cleanup skipped.
 
Last edited by a moderator:
F

forsamori

Guest
We released an updated version of the Google Play Services extension yesterday (for both GM: S and GMS2). Can you please update it and give this a shot again and post here how you get on?
 
G

Guy_Typing

Guest
We released an updated version of the Google Play Services extension yesterday (for both GM: S and GMS2). Can you please update it and give this a shot again and post here how you get on?
@forsamori Yes, I've been testing the google play services extension today. I'm the one who filed the bug report and am OP here as well. It seems that the update does not fix this as it still crashes on the cloud sync function unfortunately.
 
K

KatoneVi

Guest
We released an updated version of the Google Play Services extension yesterday (for both GM: S and GMS2). Can you please update it and give this a shot again and post here how you get on?
You guys updated the Google Play Services yesterday?!! WOW!! I'm impressed! =) I'll try it when I get home from work. Very excited to see the update. Saw the update and am super super excited!

-Added Rewarded Ads
-Updated extension to Google Play Services API 11.8 (November 2017)

I'm hyped! Can't wait to get home and play this with new stuff! PERFECT TIMING! I have the whole weekend to play! (I really hope it works!!)

The OP said it still doesn't work. I pasted the log file above. The error message was:

E/AndroidRuntime(12394): Caused by: java.lang.IllegalStateException: Must include Drive.SCOPE_APPFOLDER to use snapshots!"

Can you confirm that the SCOPE_APPFOLDER is included?? The developer.google page stated to do this as well:
https://developers.google.com/games/services/android/savedgames

Thanks!
Katone

Edit: Still doesn't work with the latest Firebase Admob........ oh well..... that sucks...
 
Last edited by a moderator:
G

Guy_Typing

Guest
@KatoneVi the updated extension I downloaded already had the code injected into the android manifest:
Code:
<meta-data android:value="true" android:name="YYGoogleCloudSavingEnabled" />
So I didn't need to do it.
 
K

KatoneVi

Guest
It works on my end now... but I'm not sure why....... Will perform testing on my end and get back to you guys if I find anything...
Thanks.
 
K

KatoneVi

Guest
@KatoneVi the updated extension I downloaded already had the code injected into the android manifest:
Code:
<meta-data android:value="true" android:name="YYGoogleCloudSavingEnabled" />
So I didn't need to do it.
I suggested this above. Did you configure your Google Drive Api?
https://console.developers.google.com/apis/library/drive.googleapis.com

You just need to add a proper "Open Url" on the bottom and some icons. Those are required.
It is either the May 17 2018 update OR this. One of these fixed it for me.
Try configuring the google drive api... and maybe wait 24 hours to see if that changes.
 
G

Guy_Typing

Guest
I suggested this above. Did you configure your Google Drive Api?
https://console.developers.google.com/apis/library/drive.googleapis.com

You just need to add a proper "Open Url" on the bottom and some icons. Those are required.
It is either the May 17 2018 update OR this. One of these fixed it for me.
Try configuring the google drive api... and maybe wait 24 hours to see if that changes.
@KatoneVi The Google Drive API is enabled, however, for reasons I don't understand, when I make changes to the settings, I can't save them. There is the save button at the bottom but I am unable to click it. When I do click it, nothing happens, it's a dead button for me.

@rwkay and @forsamori, is this true? Is this a necessary setting to adjust in order to get the GMS2 extension working? I have not come across this in any of the documentation.

@KatoneVi, again, I'm not sure this is necessary considering I had the cloud sync functionality working just fine on GMS1.4
 
Top