Bug 34268 - UnsatisfiedLinkError when application is re-installed from the play store on Android M
Summary: UnsatisfiedLinkError when application is re-installed from the play store on ...
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 5.2
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2015-09-25 02:14 UTC by Jared Kells
Modified: 2017-08-23 20:57 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Jared Kells 2015-09-25 02:14:26 UTC
Android M has a new feature "Auto Backup and Restore for Apps" which is on my default. You can read about it here: https://developer.android.com/preview/backup/index.html

When our application is installed on an Android M device from the Play Store and the app has been installed previously then it crashes on the first run with an UnsatisfiedLinkError. You need to have the app installed for about 24 hours on an Android M device for a backup to be pushed to Google Drive.

Subsequent runs of the app don't crash and if the backup feature is disabled then the app doesn't crash on the first run.

Here is the stacktrace:

09-25 15:49:08.799: I/ActivityManager(779): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.mycompany.myapp cmp=com.mycompany.myapp/md5a6a861cd5eb82c902b7c41a37354aa91.SplashActivity} from uid 10021 on display 0
09-25 15:49:08.919: E/art(6453): No implementation found for void mono.android.Runtime.register(java.lang.String, java.lang.Class, java.lang.String) (tried Java_mono_android_Runtime_register and Java_mono_android_Runtime_register__Ljava_lang_String_2Ljava_lang_Class_2Ljava_lang_String_2)
09-25 15:49:08.922: D/AndroidRuntime(6453): Shutting down VM
09-25 15:49:08.926: E/AndroidRuntime(6453): FATAL EXCEPTION: main
09-25 15:49:08.926: E/AndroidRuntime(6453): Process: com.mycompany.myapp, PID: 6453
09-25 15:49:08.926: E/AndroidRuntime(6453): java.lang.UnsatisfiedLinkError: No implementation found for void mono.android.Runtime.register(java.lang.String, java.lang.Class, java.lang.String) (tried Java_mono_android_Runtime_register and Java_mono_android_Runtime_register__Ljava_lang_String_2Ljava_lang_Class_2Ljava_lang_String_2)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at mono.android.Runtime.register(Native Method)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at md52236513766101a179cb66b507777967d.MyCompanyActivity.<clinit>(MyCompanyActivity.java:19)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at java.lang.Class.newInstance(Native Method)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at android.app.Instrumentation.newActivity(Instrumentation.java:1067)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2317)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at android.app.ActivityThread.-wrap11(ActivityThread.java)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at android.os.Handler.dispatchMessage(Handler.java:102)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at android.os.Looper.loop(Looper.java:148)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at android.app.ActivityThread.main(ActivityThread.java:5417)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at java.lang.reflect.Method.invoke(Native Method)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
09-25 15:49:08.926: E/AndroidRuntime(6453): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
09-25 15:49:08.931: E/Surface(24540): getSlotFromBufferLocked: unknown buffer: 0x9174b760
09-25 15:49:08.931: D/OpenGLRenderer(24540): endAllStagingAnimators on 0x99c2e080 (LayerDrawable) with handle 0xb444ed30
09-25 15:49:08.932: W/ActivityManager(779):   Force finishing activity com.mycompany.myapp/md5a6a861cd5eb82c902b7c41a37354aa91.SplashActivity
09-25 15:49:08.966: W/ActivityManager(779):   Force finishing activity com.android.vending/com.google.android.finsky.activities.MainActivity
Comment 1 Jared Kells 2015-09-25 02:32:26 UTC
Here are some steps to reproduce the crash, they will work on any Xamarin application on the Play store, I will use the Xamarin Evolve 2016 app as an example.

1. Ensure you're running the latest Android M developer preview

2. Ensure automatic restore is enabled under Settings -> Backup & reset ( it is on by default )

3. Install the Xamarin Evolve app from the Play Store: https://play.google.com/store/apps/details?id=com.xamarin.xamarinevolve

4. Launch the app.

5. Trigger a backup using adb so you don't need to wait 24 hours:
* adb shell bmgr run
* adb shell bmgr fullbackup com.xamarin.xamarinevolve

6. Wait a minute so your sure the backup went through.

7. Uninstall the app

8. Re-install the app from the Play Store

9. CRASH
Comment 2 Jared Kells 2015-09-25 02:32:56 UTC
Here are some steps to reproduce the crash, they will work on any Xamarin application on the Play store, I will use the Xamarin Evolve 2016 app as an example.

1. Ensure you're running the latest Android M developer preview

2. Ensure automatic restore is enabled under Settings -> Backup & reset ( it is on by default )

3. Install the Xamarin Evolve app from the Play Store: https://play.google.com/store/apps/details?id=com.xamarin.xamarinevolve

4. Launch the app.

5. Trigger a backup using adb so you don't need to wait 24 hours:
* adb shell bmgr run
* adb shell bmgr fullbackup com.xamarin.xamarinevolve

6. Wait a minute so your sure the backup went through.

7. Uninstall the app

8. Re-install the app from the Play Store

9. CRASH
Comment 3 softlion 2017-03-07 14:33:44 UTC
Any news from this bug ?

Just stumbled upon it on Android 7.1, but in a different scenario:
- debug mode on an android device (Samsung S3) running android 7.1
- the app starts fine with a login screen. Login does work. But it won't open the next screen.

The crash occurs after the login screen, when an android service is started.
Comment 4 Adam Hartley [MSFT] 2017-06-28 14:54:48 UTC
Thank you for taking the time to submit the bug. We are unable to reproduce this issue using the steps outlined above (Test device Nexus 6 with Android 7.1).

If this is happening in your own project, please attach a reproduction to the bug by starting with a clean Xamarin.Android project and adding just the code necessary to demonstrate the issue. 

Thanks!
Comment 5 Cody Beyer (MSFT) 2017-08-23 20:57:19 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!