Skip to content

Provide better error reporting around UnsatisfiedLinkError #5149

Description

@jonpryor

Context: xamarin/Xamarin.Forms#12218

"Sometimes," an app launch crashes with an UnsatisfiedLinkError, e.g.

java.lang.UnsatisfiedLinkError
  at java.lang.Runtime.loadLibrary0 (Runtime.java:1067)
  at java.lang.Runtime.loadLibrary0 (Runtime.java:1007)
  at java.lang.System.loadLibrary (System.java:1667)
  at mono.MonoPackageManager.LoadApplication (Unknown Source:195)
  at mono.MonoRuntimeProvider.attachInfo (Unknown Source:41)

Part of what's irksome about these crashes is we don't know why they happen. Historically, the most probable cause is that "something went wrong" around the App installation, and e.g. libmonodroid.so wasn't extracted from the .apk (out of disk space?).

Feature request: update MonoPackageManager.LoadApplication() to catch UnsatifisedLinkError (and others), and do some "diagnostics" so that we can get a better understanding of how it's failing.

  • What library is being loaded?
  • Can we probe the filesystem to see if it exists?
  • Any other "sanity checks"?

Then, with said diagnostic information, can we:

  1. "Somehow ensure" that we can send this diagnostic information to the Google Play Console?
  2. Provide a more "actionable" error message to the user? Perhaps simply deleting & reinstalling the app would be sufficient?

I suspect (2) will need to wait until after we have (1).

Metadata

Metadata

Labels

enhancementProposed change to current functionality.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions