question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MPConfig.java and MixpanelApi.java | Fatal Exception: java.lang.RuntimeException Unable to create application: Package manager has died Raw Text

See original GitHub issue

Fatal Exception: java.lang.RuntimeException: Unable to create application com.example.MyApplication: java.lang.RuntimeException: Package manager has died at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4594) at android.app.ActivityThread.access$1600(ActivityThread.java:154) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1382) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5292) 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 java.lang.RuntimeException: Package manager has died at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:279) at com.mixpanel.android.mpmetrics.f.b(MPConfig.java:437) at com.mixpanel.android.mpmetrics.f.a(MPConfig.java:116) at com.mixpanel.android.mpmetrics.g.<init>(MixpanelAPI.java:196) at com.mixpanel.android.mpmetrics.g.a(MixpanelAPI.java:336) at com.example.b.a(MixpanelManager.java:30) at com.example.MyApplication.onCreate(MyApplication.java:140) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4591) at android.app.ActivityThread.access$1600(ActivityThread.java:154) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1382) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5292) 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.TransactionTooLargeException at android.os.BinderProxy.transactNative(Binder.java) at android.os.BinderProxy.transact(Binder.java:496) at android.content.pm.IPackageManager$Stub$Proxy.getApplicationInfo(IPackageManager.java:2059) at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:270) at com.mixpanel.android.mpmetrics.f.b(MPConfig.java:437) at com.mixpanel.android.mpmetrics.f.a(MPConfig.java:116) at com.mixpanel.android.mpmetrics.g.<init>(MixpanelAPI.java:196) at com.mixpanel.android.mpmetrics.g.a(MixpanelAPI.java:336) at com.practo.pel.android.b.a(MixpanelManager.java:30) at com.practo.pel.android.c.a(PelTracker.java:42) at com.example.a.a.a(PelManager.kt:43) at com.example.MyApplication.onCreate(MyApplication.java:140) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4591) at android.app.ActivityThread.access$1600(ActivityThread.java:154) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1382) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5292) 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)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
pateditcommented, Jan 18, 2018

Hey @1jpgodara @GauthierChan ! It seems that the ApplicationInfo object that is returned after calling getApplicationInfo() is too large and can’t be serialized (see this line).

In order to correctly set-up the SDK we need all the app meta-data info and I believe that its bundle is just too large to serialize. Typically, Android can handle ~1MB per transaction but really depends on the device.

Some questions:

  • In what part of the app lifecycle are you guys initializing the library? What other operations are happening at the same time?
  • How many <meta-data> tags do you have in your AndroidManifest.xml?
  • Are you running any services / background threads?
0reactions
1jpgodaracommented, Mar 30, 2018
  • In total we have 6-7 <meta-data> tags and we have 2 <meta-data> tags for MPConfig
<meta-data
            android:name="com.mixpanel.android.MPConfig.FlushInterval"
            android:value="value"/>
<meta-data
            android:name="com.mixpanel.android.MPConfig.EnableDebugLogging"
            android:value="value"/>
  • We do the initialization in onCreate() of the application.
  • Sometimes, yeah we run 1 or 2 background threads/services parallelly.
  • Besides 1 or 2 background tasks (even that’s not happening always) nothing is happening in parallel to initialization of Mixpanel.

And from last one month, I haven’t seen this issue in my app so ✌️

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.RuntimeException: Package manager has died
This receiver is automatically added to your application's manifest file via manifest merge. If necessary it can be manually declared via: ...
Read more >
Package manager has died while checking permission
A DeadObjectException can occur if two Android processes are communicating with each other and one of them dies while transferring data to ...
Read more >
paste.evervolv.com/view/raw/fc45d222
SubSettings (has extras)} from pid 1680 W/PackageManager( 402): Package named ... Rebuild removed 8 windows but added 7 W/WindowManager( 402): java.lang.
Read more >
axios | Yarn - Package Manager
Note: Capturing FormData upload progress is currently not currently supported in node.js environments. ⚠️ Warning It is recommended to disable redirects by ...
Read more >
Analytics changelog - Stambia.org
Package Manager Editor - List of processes in build history and in synchronize ... multi-configuration deliveries when Analytics is running under Java 11....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found