Forum Xamarin Xamarin Test Cloud (Read Only)

Why can I not test my Android app on a MAC

I have a UI test which starts an installed app (on android & ios simulator) and runs tests.

These are run nightly on a MAC MINI.
But for some time now, the test can no longer start the app on the android emulator.
I cannot pin point when exactly this initially failed but lately we have updated a lot of software ie: xamarin, xcode, ios high sierra etc...

The following code is run to start the app:

            return ConfigureApp
                    .Android
                    .InstalledApp(Android.App.InstalledApp)
                    .PreferIdeSettings()
                    .EnableLocalScreenshots()
                    .WaitTimes(new WaitTimes())
                    .StartApp(ClearAppData);

The only error I get in the test result is "TestFixtureSetUp failed in TestInitialFeature".
If I look in the device log I get the following:

11-28 14:26:56.591: D/AndroidRuntime(32579): >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
    11-28 14:26:56.592: D/AndroidRuntime(32579): CheckJNI is ON
    11-28 14:26:56.606: D/ICU(32579): No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
    11-28 14:26:56.634: E/memtrack(32579): Couldn't load memtrack module (No such file or directory)
    11-28 14:26:56.634: E/android.os.Debug(32579): failed to load memtrack module: -2
    11-28 14:26:56.634: I/Radio-JNI(32579): register_android_hardware_Radio DONE
    11-28 14:26:56.643: D/AndroidRuntime(32579): Calling main entry com.android.commands.pm.Pm
    11-28 14:26:56.678: I/art(32579): System.exit called, status: 0
    11-28 14:26:56.678: I/AndroidRuntime(32579): VM exiting with result code 0.
    11-28 14:26:56.833: D/AndroidRuntime(32589): >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
    11-28 14:26:56.834: D/AndroidRuntime(32589): CheckJNI is ON
    11-28 14:26:56.856: D/ICU(32589): No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
    11-28 14:26:56.880: E/memtrack(32589): Couldn't load memtrack module (No such file or directory)
    11-28 14:26:56.880: E/android.os.Debug(32589): failed to load memtrack module: -2
    11-28 14:26:56.881: I/Radio-JNI(32589): register_android_hardware_Radio DONE
    11-28 14:26:56.887: D/AndroidRuntime(32589): Calling main entry com.android.commands.pm.Pm
    11-28 14:26:56.919: I/art(32589): System.exit called, status: 0
    11-28 14:26:56.920: I/AndroidRuntime(32589): VM exiting with result code 0.
    11-28 14:26:57.151: D/AndroidRuntime(32601): >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
    11-28 14:26:57.152: D/AndroidRuntime(32601): CheckJNI is ON
    11-28 14:26:57.162: D/ICU(32601): No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
    11-28 14:26:57.185: E/memtrack(32601): Couldn't load memtrack module (No such file or directory)
    11-28 14:26:57.185: E/android.os.Debug(32601): failed to load memtrack module: -2
    11-28 14:26:57.186: I/Radio-JNI(32601): register_android_hardware_Radio DONE
    11-28 14:26:57.193: D/AndroidRuntime(32601): Calling main entry com.android.commands.pm.Pm
    11-28 14:26:57.214: I/art(32601): System.exit called, status: 0
    11-28 14:26:57.214: I/AndroidRuntime(32601): VM exiting with result code 0.
    11-28 14:26:57.377: D/AndroidRuntime(32611): >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
    11-28 14:26:57.378: D/AndroidRuntime(32611): CheckJNI is ON
    11-28 14:26:57.393: D/ICU(32611): No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
    11-28 14:26:57.417: E/memtrack(32611): Couldn't load memtrack module (No such file or directory)
    11-28 14:26:57.417: E/android.os.Debug(32611): failed to load memtrack module: -2
    11-28 14:26:57.418: I/Radio-JNI(32611): register_android_hardware_Radio DONE
    11-28 14:26:57.427: D/AndroidRuntime(32611): Calling main entry com.android.commands.am.Am
    11-28 14:26:57.435: I/ActivityManager(1596): START u0 {flg=0x10000000 cmp=com.myapp.test/sh.calaba.instrumentationbackend.StatusReporterActivity (has extras)} from uid 0 on display 0
    11-28 14:26:57.451: D/AndroidRuntime(32611): Shutting down VM
    11-28 14:26:57.462: I/System.out(3549): Failure file: /data/user/0/com.myapp.test/files/calabash_failure.out
    11-28 14:26:57.462: I/System.out(3549): Finished file: /data/user/0/com.myapp.test/files/calabash_finished.out
    11-28 14:26:57.462: I/System.out(3549): method: clear
    11-28 14:26:57.507: D/gralloc_ranchu(1227): gralloc_alloc: Creating ashmem region of size 3932160
    11-28 14:26:57.588: D/gralloc_ranchu(1227): gralloc_alloc: Creating ashmem region of size 3932160
    11-28 14:26:57.818: I/WindowManager(1596): Screenshot max retries 4 of Token{c580353 ActivityRecord{7392742 u0 com.myapp.test/sh.calaba.instrumentationbackend.StatusReporterActivity t178 f}} appWin=Window{86de4f2 u0 Starting com.myapp.test} drawState=3
    11-28 14:26:57.862: W/InputMethodManagerService(1596): Window already focused, ignoring focus gain of: [email protected] attribute=null, token = [email protected]
    11-28 14:26:57.922: D/AndroidRuntime(32620): >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
    11-28 14:26:57.930: D/AndroidRuntime(32620): CheckJNI is ON
    11-28 14:26:57.943: D/ICU(32620): No timezone override file found: /data/misc/zoneinfo/current/icu/icu_tzdata.dat
    11-28 14:26:57.966: E/memtrack(32620): Couldn't load memtrack module (No such file or directory)
    11-28 14:26:57.966: E/android.os.Debug(32620): failed to load memtrack module: -2
    11-28 14:26:57.967: I/Radio-JNI(32620): register_android_hardware_Radio DONE
    11-28 14:26:57.983: D/AndroidRuntime(32620): Calling main entry com.android.commands.am.Am
    11-28 14:26:57.996: W/ActivityManager(1596): Permission Denial: starting instrumentation ComponentInfo{com.myapp.test/sh.calaba.instrumentationbackend.ClearAppData2} from pid=32620, uid=32620 not allowed because package com.myapp.test does not have a signature matching the target com.myapp
    11-28 14:26:57.998: I/art(32620): System.exit called, status: 1
    11-28 14:26:57.998: I/AndroidRuntime(32620): VM exiting with result code 1.
    11-28 14:27:00.020: D/EGL_emulation(1751): eglMakeCurrent: 0xad929b80: ver 2 0 (tinfo 0xacb6ddc0)
    11-28 14:27:00.075: D/hwcomposer(1227): hw_composer sent 499 syncs in 60s

The test works correctly on a PC. But does not work on 2 MACs. Previously is did.
Does anyone have any idea how to solve this? or what has caused this problem?

Thanks.

Answers

  • bnofferbnoffer DEMember ✭✭
    edited November 2017

    I am having the same issue. The cause seems to be this exception:

    29-11-2017 15:29:11.400 +01:00 - 68810 - AdbArguments: '-s emulator-5554 shell am instrument my.app.bundle.test/sh.calaba.instrumentationbackend.ClearAppData2'.
    29-11-2017 15:29:12.049 +01:00 - 69459 - Finished with exit code 1 in 645 ms.
    java.lang.SecurityException: Permission Denial: starting instrumentation ComponentInfo{my.app.bundle.test/sh.calaba.instrumentationbackend.ClearAppData2} from pid=5259, uid=5259 not allowed because package my.app.bundle.test does not have a signature matching the target my.app.bundle
    

    Which points to a issue related to the keystore, but I provided tho proper keystore and credentials in the ConfigureApp statement.

  • AnthonyMehallelAnthonyMehallel USMember ✭✭✭

    Hi @BastianNoffer ,

    In commande line, liste your package : adb shell 'pm list packages -f'

    Uninstall all package my.app.bundle.test / my.app.bundle in commande line :

    • adb uninstall my.app.bundle.test
    • adb uninstall my.app.bundle

    To finish, Run UI Test.
    Anthony

  • SeanConlonSeanConlon USMember ✭✭

    Hi @AnthonyMehallel

    I just tried your suggestion but it has not solved the problem. I presume your suggestion is the same as uninstalling the app from the emulator - which I had already tried.
    Thanks.

  • bnofferbnoffer DEMember ✭✭

    Thanks @AnthonyMehallel ,

    this has solved it!

  • AnthonyMehallelAnthonyMehallel USMember ✭✭✭

    Great ! I think when you run lot of ui test, a package has been uninstalled incorrectly

  • SeanConlonSeanConlon USMember ✭✭

    I created a new emulator. The error occurs with this also.

Sign In or Register to comment.