MFen
MFen

Reputation: 31

Google Play Services Unity3d Plugin

I had previously implemented the Google play services plugin for Unity3d and everything was working perfectly, I was changing the project name and updating the developer console to go from a testing project to the actual game, that's when everything broke. I know that the app ID needs to match and I followed all of the directions again but it seems I have done something wrong and cannot find out where the problem lies.

Unity3d and Android SDK have both been updated since this Plugin came out and I also want to verify it is still working as Google play services had several chan![enter image description here][1]ges.

Below is my logcat when the errors happen. As of right now I am limiting it to just trying to log in and that is when the app shuts down and fails.

--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
E/gpop.InstalledAppsGrid( 2351): Hidden list size 77
E/gpop.InstalledAppsGrid( 2351): Hidden list size 77
E/KeyMappingDownloader( 2351): No keymapping for com.DPGaming.Evolution
E/SQLiteDatabase( 2885): close() was never explicitly called on database '/data/data/com.google.android.gms/databases/metrics.db' 
E/SQLiteDatabase( 2885): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1943)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1007)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:986)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1051)
E/SQLiteDatabase( 2885):    at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:779)
E/SQLiteDatabase( 2885):    at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:221)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:157)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:231)
E/SQLiteDatabase( 2885):    at fyc.d(SourceFile:96)
E/SQLiteDatabase( 2885):    at fyc.a(SourceFile:220)
E/SQLiteDatabase( 2885):    at com.google.android.gms.googlehelp.service.ClearHelpHistoryIntentService.onHandleIntent(SourceFile:47)
E/SQLiteDatabase( 2885):    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/SQLiteDatabase( 2885):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/SQLiteDatabase( 2885):    at android.os.Looper.loop(Looper.java:137)
E/SQLiteDatabase( 2885):    at android.os.HandlerThread.run(HandlerThread.java:60)
E/System  ( 2885): Uncaught exception thrown by finalizer
E/System  ( 2885): java.lang.IllegalStateException: Don't have database lock!
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.verifyLockOwner(SQLiteDatabase.java:2090)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase$1.entryRemoved(SQLiteDatabase.java:2182)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase$1.entryRemoved(SQLiteDatabase.java:2178)
E/System  ( 2885):  at android.util.LruCache.trimToSize(LruCache.java:197)
E/System  ( 2885):  at android.util.LruCache.evictAll(LruCache.java:285)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.deallocCachedSqlStatements(SQLiteDatabase.java:2143)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.closeClosable(SQLiteDatabase.java:1126)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.finalize(SQLiteDatabase.java:1914)
E/System  ( 2885):  at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:182)
E/System  ( 2885):  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)
E/System  ( 2885):  at java.lang.Thread.run(Thread.java:856)
E/SQLiteDatabase( 2885): close() was never explicitly called on database '/data/data/com.google.android.gms/databases/help_responses.db' 
E/SQLiteDatabase( 2885): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1943)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1007)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:986)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1051)
E/SQLiteDatabase( 2885):    at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:779)
E/SQLiteDatabase( 2885):    at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:221)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:157)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:231)
E/SQLiteDatabase( 2885):    at fxy.c(SourceFile:122)
E/SQLiteDatabase( 2885):    at fxy.b(SourceFile:506)
E/SQLiteDatabase( 2885):    at com.google.android.gms.googlehelp.service.ClearHelpHistoryIntentService.onHandleIntent(SourceFile:48)
E/SQLiteDatabase( 2885):    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/SQLiteDatabase( 2885):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/SQLiteDatabase( 2885):    at android.os.Looper.loop(Looper.java:137)
E/SQLiteDatabase( 2885):    at android.os.HandlerThread.run(HandlerThread.java:60)
E/System  ( 2885): Uncaught exception thrown by finalizer
E/System  ( 2885): java.lang.IllegalStateException: Don't have database lock!
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.verifyLockOwner(SQLiteDatabase.java:2090)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase$1.entryRemoved(SQLiteDatabase.java:2182)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase$1.entryRemoved(SQLiteDatabase.java:2178)
E/System  ( 2885):  at android.util.LruCache.trimToSize(LruCache.java:197)
E/System  ( 2885):  at android.util.LruCache.evictAll(LruCache.java:285)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.deallocCachedSqlStatements(SQLiteDatabase.java:2143)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.closeClosable(SQLiteDatabase.java:1126)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.finalize(SQLiteDatabase.java:1914)
E/System  ( 2885):  at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:182)
E/System  ( 2885):  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)
E/System  ( 2885):  at java.lang.Thread.run(Thread.java:856)
E/SQLiteDatabase( 2885): close() was never explicitly called on database '/data/data/com.google.android.gms/databases/history_query.db' 
E/SQLiteDatabase( 2885): android.database.sqlite.DatabaseObjectNotClosedException: Application did not close the cursor or database object that was opened here
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1943)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1007)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:986)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1051)
E/SQLiteDatabase( 2885):    at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:779)
E/SQLiteDatabase( 2885):    at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:221)
E/SQLiteDatabase( 2885):    at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:157)
E/SQLiteDatabase( 2885):    at fzm.a(SourceFile:92)
E/SQLiteDatabase( 2885):    at com.google.android.gms.googlehelp.service.ClearHelpHistoryIntentService.onHandleIntent(SourceFile:49)
E/SQLiteDatabase( 2885):    at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
E/SQLiteDatabase( 2885):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/SQLiteDatabase( 2885):    at android.os.Looper.loop(Looper.java:137)
E/SQLiteDatabase( 2885):    at android.os.HandlerThread.run(HandlerThread.java:60)
E/System  ( 2885): Uncaught exception thrown by finalizer
E/System  ( 2885): java.lang.IllegalStateException: Don't have database lock!
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.verifyLockOwner(SQLiteDatabase.java:2090)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase$1.entryRemoved(SQLiteDatabase.java:2182)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase$1.entryRemoved(SQLiteDatabase.java:2178)
E/System  ( 2885):  at android.util.LruCache.trimToSize(LruCache.java:197)
E/System  ( 2885):  at android.util.LruCache.evictAll(LruCache.java:285)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.deallocCachedSqlStatements(SQLiteDatabase.java:2143)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.closeClosable(SQLiteDatabase.java:1126)
E/System  ( 2885):  at android.database.sqlite.SQLiteDatabase.finalize(SQLiteDatabase.java:1914)
E/System  ( 2885):  at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:182)
E/System  ( 2885):  at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)
E/System  ( 2885):  at java.lang.Thread.run(Thread.java:856)
E/InputDispatcher( 2155): Motion event has invalid pointer count 0; value must be between 1 and 16.
E/InputDispatcher( 2155): Motion event has invalid pointer count 0; value must be between 1 and 16.
E/Constants( 2351): Getting new oem
E/Constants( 2351): product.oem not found
E/Constants( 2351): Getting new oem
E/Constants( 2351): product.oem not found
E/Constants( 2351): Getting new oem
E/Constants( 2351): product.oem not found
E/Sensor-AccelerometerUI( 2377): java.io.IOException: Connection refused
E/PGA     ( 4346): :::::::: PgaUtilsEnumToStr: invalid e 0x30e2
E/dalvikvm( 4346): Could not find class 'org.onepf.oms.appstore.TStoreRequestCallback', referenced from method org.onepf.oms.appstore.TStoreBillingService.launchPurchaseFlow
E/InputDispatcher( 2155): Motion event has invalid pointer count 0; value must be between 1 and 16.
E/NativeActivity( 4346): channel 'b321ddb0 com.DPGaming.Evolution/com.unity3d.player.UnityPlayerNativeActivity (client)' ~ Failed to receive dispatch signal.  status=-11
E/InputDispatcher( 2155): Motion event has invalid pointer count 0; value must be between 1 and 16.
E/NativeActivity( 4346): channel 'b321ddb0 com.DPGaming.Evolution/com.unity3d.player.UnityPlayerNativeActivity (client)' ~ Failed to receive dispatch signal.  status=-11
E/InputDispatcher( 2155): Motion event has invalid pointer count 0; value must be between 1 and 16.
E/NativeActivity( 4346): channel 'b321ddb0 com.DPGaming.Evolution/com.unity3d.player.UnityPlayerNativeActivity (client)' ~ Failed to receive dispatch signal.  status=-11
E/InputDispatcher( 2155): Motion event has invalid pointer count 0; value must be between 1 and 16.
E/NativeActivity( 4346): channel 'b321ddb0 com.DPGaming.Evolution/com.unity3d.player.UnityPlayerNativeActivity (client)' ~ Failed to receive dispatch signal.  status=-11
E/InputDispatcher( 2155): Motion event has invalid pointer count 0; value must be between 1 and 16.
E/NativeActivity( 4346): channel 'b321ddb0 com.DPGaming.Evolution/com.unity3d.player.UnityPlayerNativeActivity (client)' ~ Failed to receive dispatch signal.  status=-11
E/InputDispatcher( 2155): Motion event has invalid pointer count 0; value must be between 1 and 16.
E/NativeActivity( 4346): channel 'b321ddb0 com.DPGaming.Evolution/com.unity3d.player.UnityPlayerNativeActivity (client)' ~ Failed to receive dispatch signal.  status=-11
E/dalvikvm( 4346): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.showErrorDialogFragment
E/dalvikvm( 4346): Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.showErrorDialogFragment
E/libEGL  ( 4346): call to OpenGL ES API with no current context (logged once per thread)

E/dalvikvm( 4409): Could not find class 'org.onepf.oms.appstore.TStoreRequestCallback', referenced from method org.onepf.oms.appstore.TStoreBillingService.launchPurchaseFlow 

Another LogCat with more output and debugging I've located what looks to be the area of the problem however I have no idea where to start to fix it. The below Logs happen immediately after the Social.localUser.Authenticate

*******************************LOGCAT*************************
I/SystemUpdateService( 5243): cancelUpdate (empty URL)

W/System.err( 4501): Error: /data/data/libqemu_wl.user.txt: open failed: ENOENT (No such file or directory)

I/ActivityManager( 4501): package `com.android.providers.downloads` whitelisting status = false

I/dalvikvm( 5725): Could not find method android.view.View.getDisplay, referenced from method com.google.android.gms.games.internal.PopupManager$PopupManagerHCMR1.h

W/dalvikvm( 5725): VFY: unable to resolve virtual method 800: Landroid/view/View;.getDisplay ()Landroid/view/Display;

D/dalvikvm( 5725): VFY: replacing opcode 0x6e at 0x0009

I/dalvikvm( 5725): Could not find method android.view.ViewTreeObserver.removeOnGlobalLayoutListener, referenced from method com.google.android.gms.games.internal.PopupManager$PopupManagerHCMR1.g

W/dalvikvm( 5725): VFY: unable to resolve virtual method 845: Landroid/view/ViewTreeObserver;.removeOnGlobalLayoutListener (Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V

D/dalvikvm( 5725): VFY: replacing opcode 0x6e at 0x0037

W/PopupManager( 5725): You have not specified a View to use as content view for popups. Falling back to the Activity content view which may not work properly in future versions of the API. Use setViewForPopups() to set your content view.

Upvotes: 1

Views: 2302

Answers (2)

MFen
MFen

Reputation: 31

OK So I have fixed whatever issue was causing it to crash, below is what I changed:

Step One: Created entirely new project and completed developer console, published just a simple button to login. It works. I now know that my Unity3d, Android APK and Developer Console procedures are all correct.

Step Two: Go to project I am trying to get working and create a new scene, again only adding a login button. It works. So I now now that my Project is fine, something to do with the code.

Step Three: I commented out all code and objects and slowly added back one by one.. this was painful. But I located the source of the problem, the issue was that a new player when trying to load from the cloud had no data stored and thus the data array returned was uninitialized, I was accounting for this by doing an if(data.length > 0) however this causes a crash anyways, so a simple try and catch and just use the data returned as if assuming its correct works great.

Upvotes: 2

DMTishler
DMTishler

Reputation: 509

You mentioned changing the project's name, did this include the package name? I would suggest taking a look at the Android Manifest perhaps in case the activity manager is trying to call the wrong package/activity.

Upvotes: 0

Related Questions