isGooglePlayServicesAvailable causes TransactionTooLargeException in Android 5 - android

I have a crash reported by Fabric that during the check for the availability of Google Play Services that on Android 5 devices a crash can occur, particularly in OnePlus, Sony and Zuk devices.
I do not explicitly call this code directly and seems to be invoked by Google's own code.
According to other posts the exeption is thrown when the Parcel is too large, however since I do not control the process, my own code is not responsible for creating the Parcel.
I have checked the release notes for Google Play Services and other posts for no avail. Any suggestions are welcome.
Fatal Exception: java.lang.RuntimeException: Package manager has died
at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:112)
at com.google.android.gms.common.zzo.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.common.zze.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.common.GoogleApiAvailability.getInstance(Unknown Source)
at com.google.android.gms.common.api.internal.zzbr.connect(Unknown Source)
at com.google.android.gms.common.api.internal.zzbp.zzb(Unknown Source)
at com.google.android.gms.common.api.internal.zzbp.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
Caused by android.os.TransactionTooLargeException
at android.os.BinderProxy.transactNative(Binder.java)
at android.os.BinderProxy.transact(Binder.java:496)
at android.content.pm.IPackageManager$Stub$Proxy.getPackageInfo(IPackageManager.java:1876)
at android.app.ApplicationPackageManager.getPackageInfo(ApplicationPackageManager.java:107)
at com.google.android.gms.common.zzo.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.common.zze.isGooglePlayServicesAvailable(Unknown Source)
at com.google.android.gms.common.GoogleApiAvailability.getInstance(Unknown Source)
at com.google.android.gms.common.api.internal.zzbr.connect(Unknown Source)
at com.google.android.gms.common.api.internal.zzbp.zzb(Unknown Source)
at com.google.android.gms.common.api.internal.zzbp.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)

According to official Android documentation, the key to avoiding TransactionTooLargeException is to
keep all transactions relatively small. Try to minimize the amount of
memory needed to create a Parcel for the arguments and the return
value of the remote procedure call. Avoid transferring huge arrays of
strings or large bitmaps. If possible, try to break up big requests
into smaller pieces.

Related

Error when testing new versions of Google Fit samples,

Error when testing new versions of Google Fit Samples,
Process: com.google.android.gms.fit.samples.basicrecordingapi, PID: 22949
java.lang.NullPointerException: Attempt to invoke virtual method 'android.accounts.Account com.google.android.gms.auth.api.signin.GoogleSignInAccount.getAccount()' on a null object reference
at com.google.android.gms.common.api.GoogleApi.zzagd(Unknown Source)
at com.google.android.gms.common.api.GoogleApi.zza(Unknown Source)
at com.google.android.gms.common.api.internal.zzbr.<init>(Unknown Source)
at com.google.android.gms.common.api.internal.zzbp.zzb(Unknown Source)
at com.google.android.gms.common.api.internal.zzbp.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:158)
at android.os.HandlerThread.run(HandlerThread.java:61)
the methods have changed and I have noticed that since then, my application that uses the old methods does not register the data for DataTypes TYPE_ACTIVITY_SEGMENT, TYPE_STEP_COUNT_DELTA and sometimes TYPE_HEART_RATE_BPM. What is the solution?

DeadObjectException with stacktrace pointing to : android.app.ApplicationPackageManager.getPackageInstaller

I'm seeing in crash being reported in crashlytics which has this stack trace which has no mention of my app code.
I have seen DeadObjectException with com.google.android.gms and there, the crash was triggered when removing listeners.
Also, everytime my app starts, I get the installer for logging purposes, i.e.
packageManager.getInstallerPackageName(my-package-name)
There is no callback associated with this call.
Crash is observed mainly on Lollipop and Kitkat, though few Marshmallow and Nougat users have experienced it too.
Has anyone experienced something similar?
Fatal Exception: java.lang.RuntimeException: android.os.DeadObjectException
at android.app.ApplicationPackageManager.getPackageInstaller(ApplicationPackageManager.java:1632)
at com.google.android.gms.common.zze.zzl(Unknown Source)
at com.google.android.gms.common.GoogleApiAvailability.getInstance(Unknown Source:8000)
at com.google.android.gms.internal.zzpy.zzc(Unknown Source:24000)
at com.google.android.gms.internal.zzpv.begin(Unknown Source)
at com.google.android.gms.internal.zzqa.zzc(Unknown Source)
at com.google.android.gms.internal.zzpp.onConnectionSuspended(Unknown Source)
at com.google.android.gms.common.internal.zzk$1.onConnectionSuspended(Unknown Source)
at com.google.android.gms.common.internal.zzd$zzd.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5438)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
Caused by android.os.DeadObjectException
at android.os.BinderProxy.transactNative(Binder.java)
at android.os.BinderProxy.transact(Binder.java:496)
at android.content.pm.IPackageManager$Stub$Proxy.getPackageInstaller(IPackageManager.java:4229)
at android.app.ApplicationPackageManager.getPackageInstaller(ApplicationPackageManager.java:1629)
at com.google.android.gms.common.zze.zzl(Unknown Source)
at com.google.android.gms.common.GoogleApiAvailability.getInstance(Unknown Source:8000)
at com.google.android.gms.internal.zzpy.zzc(Unknown Source:24000)
at com.google.android.gms.internal.zzpv.begin(Unknown Source)
at com.google.android.gms.internal.zzqa.zzc(Unknown Source)
at com.google.android.gms.internal.zzpp.onConnectionSuspended(Unknown Source)
at com.google.android.gms.common.internal.zzk$1.onConnectionSuspended(Unknown Source)
at com.google.android.gms.common.internal.zzd$zzd.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5438)
at java.lang.reflect.Method.invoke(Method.java)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
Here are the Fabric crashlytics reason for this exception.
DeadObjectExceptions are usually a symptom of a problem occurring somewhere else (likely in a remote process). Even though this exception may be safe to catch, it's worth looking for problems in related services.
This error could mean one of two things:
1) There is a bug (which caused a crash) in an associated process.
2) The other process was killed by the OS.
Source: Fabric crashlytics report.
Resources: Here & Here

Application crash using Google maps during map fragment view creation

It happens when SupportMapFragment is used, specifically when transaction commited. It started to happen recently on specific device (maybe after update of google play services, couldn't trace it).
Crashes are consistent through all previous app version that was already tested and there was no changes in used libs versions or build tools.
Environment details:
Device LG G3 D855
Google play services lib version 8.4.0
Google play services on device version 9.6.83
Android version 5.0
Build tools version "23.0.2"
Crash stack trace:
E/AndroidRuntime: FATAL EXCEPTION: main java.lang.NullPointerException: Attempt to get length of null array
at maps.G.a.a(Unknown Source)
at maps.V.N.a(Unknown Source)
at maps.D.e.a(Unknown Source)
at maps.D.p.a(Unknown Source)
at maps.ad.ae.a(Unknown Source)
at maps.ad.t.a(Unknown Source)
at maps.ad.M.a(Unknown Source)
at ul.onTransact(:com.google.android.gms.DynamiteModulesB:107)
at android.os.Binder.transact(Binder.java:380)
at com.google.android.gms.maps.internal.IMapFragmentDelegate$zza$zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment$zza.onCreateView(Unknown Source)
at com.google.android.gms.dynamic.zza$4.zzb(Unknown Source)
at com.google.android.gms.dynamic.zza.zza(Unknown Source)
at com.google.android.gms.dynamic.zza.onCreateView(Unknown Source)
at com.google.android.gms.maps.SupportMapFragment.onCreateView(Unknown Source
at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:517)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5274)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
Has anyone else witnessed this? If so, were you able to solve it?
In addition to the info provided in the link, I'm using the MultiDex library which I know sometimes causes weird behaviors.
Due to NDA cannot provide any application specific information.
<activity android:name="com.bison.activities.YourActivity"
android:hardwareAccelerated="true"
>
<intent-filter>
<action
android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
Try adding this to you activity in manifest.
If it helps study the hardware acceleration in google documentation

Unexplained IncompatibleClassChangeError In Stable Released App Caused by GoogleMaps

I have just received this strange crash report from a user in my Google Play Developer Console.
The app is stable at the moment and this is the first time I have seen this crash. It has been in release for 3/4 months now. The device was a Galaxy S5 running Android Version 5.0.
My initial thoughts is Google Play Services has updated causing issues. Any better offers?
java.lang.IncompatibleClassChangeError: Class 'java.lang.reflect.ArtMethod' does not implement interface 'android.os.Parcelable$Creator' in call to 'java.lang.Object android.os.Parcelable$Creator.createFromParcel(android.os.Parcel)' (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)
at com.google.android.gms.common.internal.safeparcel.SafeParcelReader.createParcelable(SafeParcelReader.java:227)
at com.google.android.gms.maps.GoogleMapOptionsCreator.createFromParcel(GoogleMapOptionsCreator.java:93)
at com.google.android.gms.maps.internal.ICreator$Stub.onTransact(ICreator.java:74)
at android.os.Binder.transact(Binder.java:380)
at com.google.android.gms.maps.internal.ah.a(SourceFile:204)
at com.google.android.gms.maps.internal.CreatorImpl.a(SourceFile:110)
at com.google.android.gms.maps.internal.ag.onTransact(SourceFile:79)
at android.os.Binder.transact(Binder.java:380)
at com.google.android.gms.maps.internal.am.a(Unknown Source)
at com.google.android.gms.maps.l.f(Unknown Source)
at com.google.android.gms.maps.l.a(Unknown Source)
at com.google.android.gms.a.b.a(Unknown Source)
at com.google.android.gms.a.b.a(Unknown Source)
at com.google.android.gms.maps.MapView.a(Unknown Source)
at com.myapp.c.d.onActivityCreated(Unknown Source)
at android.support.v4.app.Fragment.performActivityCreated(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.BackStackRecord.run(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(Unknown Source)
at android.support.v4.app.FragmentActivity.onStart(Unknown Source)
at com.myapp.Activity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1234)
at android.app.Activity.performStart(Activity.java:6258)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2621)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2725)
at android.app.ActivityThread.access$900(ActivityThread.java:172)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:5834)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)
ADDITION Have just found this thread which is about other people experiencing the same crash on Samsung devices.
This was related to issue 8314. This issue has now been fixed via both a Firmware update from Samsung and also an update to Google Play Services.
If this helped you, please mark this as the correct answer.

Android GCM SSLException

I'm planning to use GCM features for an Android app. I setup the proper Android app and the backend service deployed on localhost.
Everyting was fine and the notifications were displayed on my testing device. Next I tried to deploy the service on a different server with a real IP. Now I'm getting this strange error when I try to push the notification from the server side and I don't know how to fix it. Does anyone have a solution?
javax.net.ssl.SSLException: Server key
at com.sun.net.ssl.internal.ssl.Handshaker.throwSSLException(Unknown Source)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(Unknown Source)
at com.google.android.gcm.server.Sender.post(Sender.java:479)
at com.google.android.gcm.server.Sender.post(Sender.java:458)
at com.google.android.gcm.server.Sender.sendNoRetry(Sender.java:170)
at com.google.android.gcm.server.Sender.send(Sender.java:121)
at com.gebs.floatmanagement.web.servlet.MapGenerator.sendAndroidNotification(Unknown Source)
at com.gebs.floatmanagement.web.servlet.MapGenerator.processRequest(Unknown Source)
at com.gebs.floatmanagement.web.servlet.MapGenerator.doPost(Unknown Source)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:774)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:896)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.spec.InvalidKeySpecException: does not support java.security.spec.ECPublicKeySpec
at com.certicom.ecc.jcae.ECKeyFactorySpi.engineGeneratePublic(Unknown Source)
at java.security.KeyFactory.generatePublic(Unknown Source)
at com.sun.net.ssl.internal.ssl.HandshakeMessage$ECDH_ServerKeyExchange.(Unknown Source)
... 35 more
I have deployed on my server some applications that override some SSL features and because of those the error has raised. Removing the services or migrating the app backend service on another server solved my problems.

Categories

Resources