Exception 'Fingerprints didn't match.' when starting Android Xamarin.UITest - android

After updating my dev environment by installing some new android-sdk's and changing java versions, my xamarin.uitest project started failing to install the apk for testing.
The exception I am getting is "Fingerprints didn't match.", which based on the stack trace is being thrown by the method at
Xamarin.UITest.Shared.Android.AndroidTestServerFactory.BuildTestServer(ApkFile appApkFile, KeyStore keyStore, ArtifactFolder artifactFolder, Assembly sharedAssembly)
What do I need to do to resolve this?

The issue is regarding the dev keystore, which the uitest framework is using to sign the apk.
While I do not know the details, the solution I found was to remove the keystores from the uitest temp folder. For me, the location of this is temp directory was at C:\Users%username%\AppData\Local\Temp\uitest.
In the 'uitest' directory, there are multiple directories as shown:
What I did was removed the directories that started with 'a-', and after which was able to run the test successfully. This I assume created a new keystore.

Related

Unable to determine the workspace. You may be able to correct this by running

I try to build apk file in my tfs server. When i run build, after 5 minutes tfs server tell me that my apk file was build and status ok, byt in folder not apk file , in folder only my logs.
Run build_APK.bat
F:\Android\projects\Mrdoc\TeamBuildTypes\mobile_v3R\\build_APK.bat "\\tfb\storage\mobile v3r_1.7\"
Get last version in TFS Server...
Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'.
Enviroment initializing...
The system cannot find the path specified.
Assembling...
Deploing path:"\\tfbd\storage\mobile v3r_1.7\"
The command "F:\Android\projects\Mrdoc\TeamBuildTypes\EOSmobile_v3R\\build_APK.bat "\\tfb\storage\mobile v3r_1.7\"" exited with code 1.
I ran the command 'tf workspaces /collection:TeamProjectCollectionUrl'
and I saw all users but it did not help me.
Overall Build Process
Get the Build
Update Build Number
Run On Agent Default Agent - test1
Get the Build Directory
If Not String.IsNullOrEmpty(ConfigurationFolderPath)
Run TfsBuild for Configuration Folder
Getting sources
Labeling sources
Generating list of changesets and updating work items
Выполнена сборка $/Doc/TeamBuildTypes/mobile_v3R/TFSBuild.proj для целевых объектов CompileConfiguration.
MSBuild Log File
If CompilationStatus = Unknown
Set CompilationStatus to Succeeded
If TestStatus = Unknown
Set TestStatus to Succeeded
First if your build service was registered with network service. Give a try with changing it to a windows user with enough build permission.
Moreover, please make sure you have a workspace mapping for your build computer and for the windows account under which build agent runs.
Take a look at this similar issue: Team Build, fixing the "Unable to determine the workspace" error

Where's JUnit test results located in Gradle build for Android?

I'm trying doing to do a continuous integration via jenkins.
I'm at the publishing tests results part now and having a bit of struggle.
Recording test results
ERROR: Publisher hudson.tasks.junit.JUnitResultArchiver aborted due to exception
hudson.AbortException: No test report files were found. Configuration error?
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:116)
at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:92)
at hudson.FilePath.act(FilePath.java:981)
at hudson.FilePath.act(FilePath.java:959)
at hudson.tasks.junit.JUnitParser.parseResult(JUnitParser.java:89)
at hudson.tasks.junit.JUnitResultArchiver.parse(JUnitResultArchiver.java:121)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:138)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:74)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
at hudson.model.Build$BuildExecution.post2(Build.java:183)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
at hudson.model.Run.execute(Run.java:1784)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
It says that it cannot find any test results.
Here's path that I've set in the jenkins:
I just followed what's stated here Gradle Plugin User Guide
All test results are stored as XML files under
build/androidTest-results
So what's the real path? Thanks!
Test reports path was changed since that article was written. Now you will find you reports in <module-name>/build/outputs/reports/androidTests directory. By default Android Studio will create module with name app. In that case path to your reports will be app/build/outputs/reports/androidTests.

Error in Xamarin Studio

When I create an android application it reports the following error (formatted for readability):
C:\Program Files\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2):
Error MSB6004: The specified task executable location
"C:\Users\Rashid\AppData\Local\Android\android-sdk\\tools\zipalign.exe"
is invalid. (MSB6004) (newTest)
A search for the error ID, MSB6004, suggests that the fix for this error is to update Xarmin to at least version 3.1.223. The linked question also discusses copying files in C:\Program Files or wherever Xarmin is installed, but in theory that should not be necessary.

Failed to run aapt dump badging:AndroidManifest.xml is corrupt

I am new to android.
i get this error when i try to upload update of my app to google play.
Failed to run aapt dump badging:W/ResourceType(19538): Bad resource table: header size 0x708b or total size 0x2f2432a is larger than data size 0x1ce1c
ERROR: AndroidManifest.xml is corrupt
i tried ALMOST VERYTHING google fixes.but nothing works.
please help.
It gave me that 'uploading in debuggable mode' thiny too but i managed to fix it.
sorry about my bad english.
I went through the same problem recently (with the very similar error message) and I also had a lot of trouble to solve, but finally I got it like this:
I used the PhoneGap Builder to generate the APK (so I recommend using the same one); Remembering that to test manages the APK with the same blank key (it's the default markup);
After generating, I used Apk-Signer (https://shatter-box.com/knowledgebase/android-apk-signing-tool-apk-signer/) to generate the key (.keystore) - this package serves, too , To sign and align the application; However, for that case I used ONLY to generate the key;
Go back to the Phone Gap, in the Android options, select 'add a key ...', then select your keystore generated in APK-Signer, and activate the rebuild;
Ready! Now just download the APK, go to google play and be happy.
I ran into a similar problem not so long ago it turned out to be an issue with #+id
A similar question has been asked before and got me through my problem, I will link the post as it is very informative.
Android style Resources compile (aapt) failing : Bad resource table: header size 0xc
Hope this helps you, wish you the best of luck.
I'm new to android too, and I had the same problem, and what worked for me was as simple as :
Zipalign the apk file by a tool called "Advanced APK tool" (download it from xda forum)
then reupload apk file to store without any problem detected,
Best of luck!
Try using a latest version of aapt, from your Android SDK directory,
<Android_SDK_directory>/build-tools/<build_tools_version>/aapt

Jenkins-CI SCP Plugin cannot find files to upload

I have Jenkins-CI compiling an Android app I'm working on. Compiles it great but it will not upload the release apk via SCP. I have set the source to bin/* and it gives me the following error. Does anyone have a suggestion on what I have configured wrong? I've had it working in the past, but I forgot to get the config before I re-installed Fedora on the machine.
[SCP] Connecting to smccloud.com
ERROR: Failed to upload files
2: No such file
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2289)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1741)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1758)
at com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:1715)
at be.certipost.hudson.plugin.SCPSite.upload(SCPSite.java:188)
at be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:218)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635)
at hudson.model.Build$RunnerImpl.post2(Build.java:161)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:604)
at hudson.model.Run.run(Run.java:1400)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
Build step 'Publish artifacts to SCP Repository' changed build result to UNSTABLE
I encountered this error when I was trying to copy to a directory that didn't exist on the target machine. Create the directory(s) on the target first and this should go away and the copy work.
On the target machine you are seeing something like:
No such file or directory
when you try to navigate to the non-existent directory.
If the plugin isn't working for you can use the shell script with expect, as a post build step, to do it for you.

Categories

Resources