VS AppCenter - XCUI - Getting Failed to analyze MachO file error - visual-studio-app-center

I am creating an azure Devops pipeline for UI testing my iOS application.
I have built my project and feeding my ipa to Visual Studio AppCenter Test pipeline, I was getting the error,
Error: Failed to analyze MachO file: Unknown load command: 2147483700
I tried to run my code manually using appcenter-cli from terminal and still getting the same error. I saw this issue in GitHub and not sure how to do this workaround in devops pipeline.
Am I missing something here? Can no-one use AppCenter CLI because of this issue?

You have to build your app with xcode 11 and than it works. But this is just a workaround. Hopefully they will fix it in the near future.

Related

Appcenter iOS build fails when enabling sonarscanner

For an appcenter deployment I want to use SonarQube to analyze the code quality of the project. I have setup the appcenter-pre-build.sh and appcenter-post-build.sh scripts to install and enable Sonarscanner in the appcenter build process.
Now when I build for iOS, the build process fails, because it cannot find 2 files in the /Users/runner/work/1/.sonarqube folder on the build machine. Those files are /Users/runner/work/1/.sonarqube/conf/cs/SonarLint.xml and /Users/runner/work/1/.sonarqube/conf/4/ProjectOutFolderPath.txt.
I know for a fact that the /Users/runner/work/1/.sonarqube/conf/cs/SonarLint.xml is there, because in the logfile it says: "Writing Roslyn analyzer additional file to /Users/runner/work/1/.sonarqube/conf/cs/SonarLint.xml..." when running the appcenter-pre-build.sh script, which installs the sonarscanner.
I am installing the sonarscanner with the command: dotnet tool install --global dotnet-sonarscanner and the version that gets installed is 5.0.4.
On my SonarQube server I am running version 8.3 community edition and when the appcenter build runs, the analysis report appears in my project on my sonarqube server.
The build however fails.
Please advice on how to get the iOS builds in appcenter to succeed while sonarscanner is enabled.
Thank you in advance.
The problem is how appcenter logs the build process. From going through the logfiles, you get the impression that the build fails, because of the integration with Sonarqube.
The build failed however, because there were some context links missing in the c# code. Once this issue was found by building locally, The builds succeeded.

Flutter Integration Test run/debug configuration in Android Studio

I am trying to run/debug some integration tests on a flutter project. my tests are running fine when I run "flutter drive --target=test_driver/app.dart" on my project.
I am trying to create a Debug configuration in my Android Studio as per following steps in the StackOverflow answer-
How to automate Flutter Integration testing command?
however, when I try to run the test with this configuration I get the following error
Any pointers about how this can be resolved?
Removing Break points and Flutter clean did not yield any results
00:00 +0: Flutter Driver demo (setUpAll)
[info ] FlutterDriver: Connecting to Flutter application at http://127.0.0.1:55319/L_Bm--V4Kjg=/
[trace] FlutterDriver: Isolate found with number: 283666305
[trace] FlutterDriver: Isolate is not paused. Assuming application is ready.
00:00 +0 -1: Flutter Driver demo (setUpAll) [E]
JSON-RPC error -32601 (method not found): Method not found
package:json_rpc_2/src/client.dart 110:64 Client.sendRequest
package:json_rpc_2/src/peer.dart 68:15 Peer.sendRequest
package:vm_service_client/src/scope.dart 64:23 Scope.sendRequestRaw
Run Configuration is as follows
Checking the logs and your setup, the run config is fine and works without issues. The issue here is caused by a "Method not found" error thrown by json_rpc_2. Trace where the error is thrown from your test, and see if this could just be an unhandled Exception that causes the issue.
Another workaround here is to set up flutter drive as an External Tool, and configure created External Tool to run 'Before launch'. Note that the path set on 'Program' points to the Flutter SDK.
This works well for me, and using this approach, you won't need to set a VM_SERVICE_URL Environment for your flutter drive run config.

Gradle build error using react native

I get this error when trying to run an app on an android emulator(Android Studio) from a console window:
$ react-native run-android
Scanning folders for symlinks in C:\Users\Brian\desktop\codervets\arrive-alive\aa_app\node_modules (27726ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
Starting a Gradle Daemon (subsequent builds will be faster)
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
The SDK directory 'c:\Users\eelia001\AppData\local\android\sdk1' does not exist.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 4m 51s
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
And yet my sdk directory in android studio has the following directory:
C:\Users\Brian\AppData\Local\Android\Sdk
Has anyone else ran into this issue? If so, how do I fix it?
The error states:
The SDK directory 'c:\Users\eelia001\AppData\local\android\sdk1' does not exist.
And you say your SDK is in:
C:\Users\Brian\AppData\Local\Android\Sdk
Since those aren't the same directory, my guess is that's the problem. Are you perhaps logged in as the wrong user? You're going to want to check that ANDROID_HOME is set correctly.
So I'm not sure why it was setup the way it was, but the way to fix it is to go to Advanced System Settings → Environment variables. Thank you to #Rich Churcher for the link to a proper tutorial (it's outdated but the steps worked).

Visual Studio Doesn't Create Xamarin Bin Folder

I'm trying to build an iPad project from Visual Studio 2017 for windows, However whenever I try to debug the app I get this error
Launch failed. The app 'B2C.iPad' could not be launched on 'iPad Air
iOS 11.0'. Error: error MT0069: The app directory
'/Users/user/Library/Caches/Xamarin/mtbs/builds/B2C.iPad/acb039527d504c900b2e6c86d8d84d09/bin/iPhoneSimulator/Debug/MobiBusiness.app'
does not exist. . Please check the logs for more details.
I noticed that visual studio doesn't create bin folder on the Mac machine although it indicates the build is succeeded.
I tried building the solution without debugging and looked at the log file nothing looked suspicious and there was no error.
does anyone know what might cause this error?
Okay this is embarrassing apparently the iPad project wasn't not selected in the build configuration, so needed to select the projects from build --> Configuration Manager

I am trying to build a msbuild project for xbuild but it keeps failing

I have a vb.net project that i would like to build using travis ci but travis only runs on linux so I have to use xbuild. I have the build log here. Can anybody tell me why the build is failing with this error?
Error executing tool '/usr/bin/vbnc': ApplicationName='/usr/bin/vbnc', CommandLine='/noconfig #/tmp/tmp3b9f993d.tmp', CurrentDirectory='/home/travis/build/RX14/SWRChart/src'
The full build log is available here and the source is available here
It Seems that mono doesn't seem to support WPF so this is pointless. Oops.

Resources