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.

Crash in [@ java.lang.NullPointerException: Attempt to read from field 'java.lang.String android.content.pm.PackageItemInfo.packageName' on a null object reference]

See original GitHub issue

Steps to reproduce

Visit baidu.com

Device information

  • Android device: Xiaomi Redmi Note 8 Pro
  • Fenix version: Nightly 200922 06:07

5f64d0db-e220-4052-b70e-9fe643ddd0b9 java.lang.NullPointerException: Attempt to read from field ‘java.lang.String android.content.pm.PackageItemInfo.packageName’ on a null object reference

java.lang.NullPointerException: Attempt to read from field 'java.lang.String android.content.pm.PackageItemInfo.packageName' on a null object reference
	at android.os.Parcel.createException(Parcel.java:2080)
	at android.os.Parcel.readException(Parcel.java:2042)
	at android.os.Parcel.readException(Parcel.java:1990)
	at android.app.IActivityTaskManager$Stub$Proxy.startActivity(IActivityTaskManager.java:3973)
	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1714)
	at android.app.Activity.startActivityForResult(Activity.java:5258)
	at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:6)
	at android.app.Activity.startActivityForResult(Activity.java:5216)
	at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:3)
	at android.app.Activity.startActivity(Activity.java:5587)
	at android.app.Activity.startActivity(Activity.java:5555)
	at mozilla.components.feature.app.links.AppLinksUseCases$OpenAppLinkRedirect.invoke(AppLinksUseCases.kt:4)
	at mozilla.components.feature.app.links.AppLinksUseCases$OpenAppLinkRedirect.invoke$default(AppLinksUseCases.kt:1)
	at mozilla.components.feature.app.links.AppLinksFeature$observer$1$onLaunchIntentRequest$doOpenApp$1.invoke(AppLinksFeature.kt:1)
	at mozilla.components.feature.app.links.AppLinksFeature$observer$1.onLaunchIntentRequest(AppLinksFeature.kt:10)
	at mozilla.components.browser.session.-$$LambdaGroup$ks$_UjHvIoGPBlrnpLBhPWojiLCNo4.invoke(com.android.tools.r8.jetbrains.kotlin-style lambda group:6)
	at mozilla.components.support.base.observer.ObserverRegistry.notifyObservers(ObserverRegistry.kt:4)
	at mozilla.components.browser.session.Session.notifyObservers(Unknown Source:7)
	at mozilla.components.browser.session.Session$$special$$inlined$observable$9.afterChange(Delegates.kt:2)
	at kotlin.properties.ObservableProperty.setValue(ObservableProperty.kt:4)
	at mozilla.components.browser.session.Session.setLaunchIntentMetadata(Unknown Source:13)
	at mozilla.components.browser.session.engine.EngineObserver.onLaunchIntentRequest(EngineObserver.kt:1)
	at mozilla.components.browser.engine.gecko.-$$LambdaGroup$ks$5d9qHqYqF66uxPoGlnXx4EfR-Tw.invoke(com.android.tools.r8.jetbrains.kotlin-style lambda group:34)
	at mozilla.components.support.base.observer.ObserverRegistry.notifyObservers(ObserverRegistry.kt:4)
	at mozilla.components.concept.engine.EngineSession.notifyObservers(Unknown Source:7)
	at mozilla.components.browser.engine.gecko.GeckoEngineSession$createNavigationDelegate$1.maybeInterceptRequest(GeckoEngineSession.kt:13)
	at mozilla.components.browser.engine.gecko.GeckoEngineSession$createNavigationDelegate$1.onSubframeLoadRequest(GeckoEngineSession.kt:3)
	at org.mozilla.geckoview.GeckoSession$Window$1.run(GeckoSession.java:8)
	at android.os.Handler.handleCallback(Handler.java:914)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:227)
	at android.app.ActivityThread.main(ActivityThread.java:7591)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:995)
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.wm.ActivityStackSupervisorInjector.resolveXSpaceIntent(ActivityStackSupervisorInjector.java:108)
	at com.android.server.wm.ActivityStarter.startActivityMayWait(ActivityStarter.java:1292)
	at com.android.server.wm.ActivityStarter.execute(ActivityStarter.java:515)
	at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1107)
	at com.android.server.wm.ActivityTaskManagerService.startActivityAsUser(ActivityTaskManagerService.java:1076)

┆Issue is synchronized with this Jira Task

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
longmoon77commented, Nov 17, 2020

@rocketsroger Another serious problem that still exists and has not been addressed for a long time needs to be fixed by developers. #16357

1reaction
longmoon77commented, Nov 17, 2020

Looks like this issue occurs in some Xiaomi, Redmi and TCL devices. Not a lot of crash reports but when it happens to a device Fenix crashes a lot. There’s nothing we can do to avoid the NullPointerException, but I can put in a workaround so we continue to load the URL.

The issue is too old. The crash had been fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

java.lang.NullPointerException: Attempt to read from field ' ...
My understanding is that the dataSnapshot is NULL. You should make sure that this variable is not null by lunching your code in...
Read more >
Attempt to read from field ''java.lang.String android. ...
NullPointerException : Attempt to read from field 'java.lang.String android.accounts.Account.name' on a null object reference at android.os.Parcel.
Read more >
java.lang.NullPointerException: Attempt to read from field 'com ...
android.material.bottomnavigation.BottomNavigationView uh.g0.F' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.
Read more >
Attempt to read from field 'java.lang.String org.fdroid ... - GitLab
fdroid.fdroid.data.App.packageName' on a null object reference. java.lang.NullPointerException: Attempt ...
Read more >
PackageManager
java.lang.Object. ↳, android.content.pm.PackageManager ... String, int, int) only: This application should be considered, until the point where the user ...
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