Appium - iOS - Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 - ios

I'm trying to connect Appium 1.12.1 to a physical iOS device with Automatic Server. These are the capabilities I am trying:
{
"browserName": "Safari",
"platformName": "iOS",
"platformVersion": "12.1",
"deviceName": "iPhone 6",
"automationName": "XCUITest",
"startIWDP": true,
"udid": "auto"
}
I am getting a lengthy error that starts with:
An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: "xcodebuild failed with code 65 xcodebuild error message: 2019-04-09 10:14:08.626 xcodebuild[22198:212737] Error writing xctestrun file: Error Domain=NSCocoaErrorDomain Code=4 "The folder “WebDriverAgentRunner_iphoneos12.2-arm64.xctestrun” doesn’t exist."

I had the same problem.
In "/Users/YOUR_NAME/Library/Developer/Xcode/DerivedData/" I have two folders:
WebDriverAgent-akxhdiizyykdxefsthlnfyomlaiz
WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu
And Appium tried take the folder from WebDriverAgent-akxhdiizyykdxefsthlnfyomlaiz but need WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu.
I copied from WebDriverAgent-ciegwgvxzxdrqthilmrmczmqvrgu to WebDriverAgent-akxhdiizyykdxefsthlnfyomlaiz and now all work good.

Related

An unknown server-side error occurred while processing the command. Original error: multi-disk zip files are not supported: found disk number: 8224

When I try to create appium server, i get this error
An unknown server-side error occurred while processing the command. Original error: multi-disk zip files are not supported: found disk number: 8224
Appium v1.17.1
{
"platformName": "Android",
"deviceName": "Any device name",
"app": "C:\Users\A196673\OneDrive - DEKRA SE\Desktop\apk\ApiDemos-debug.apk",
"udid": "emulator-5554",
"autmationName": "UiAutomator2"
}
i installed everything good but can not create server

Problème de configuration Appium pour iOS

I have a problem to communicate between my macmini and my iphone 7 (version 11.4) with Appium. My build is successfull on xCode and the version of Appium is the last 1.18.0-1.
My capabilities in Appium are :
{
"platformName": "iOS",
"platformVersion": "11.4",
"bundleId": "com.altran.deltadore.tydom",
"deviceName": "iPhone7",
"udid": "0afc3d4352c3f2d720a9ffca2d971b118b9a7e17",
"xcodeSigningId": "jerome.thomoux#altran.com",
"xcodeOrgId": "WUQ4U559T2",
"automation_name": "XCUITest"
}
The error message in Appium when I start the session is :
An unknown server-side error occurred while processing the command. Original error: App with bundle identifier 'com.altran.deltadore.tydom' unknown
Add one more capability as :
"app" : "Path_to_your_ipa_file";
Secondly, you have to add udid while signing the ipa build for the devices you have to use the build.

Problem In Opening Appium Inspector with calculator seesion

"deviceName": "Moto C Plus",
"udid": "ZZ2222MGJM",
"platformName": "Android",
"platformVersion": "7.0",
"appPackage": "com.google.android.calculator",
"appActivity": "com.android.calculator2.Calculator"
when click on startSession button
error :
Error
An unknown server-side error occurred while processing the command. Original error: zipAlignApk failed. Original error: Command 'C:\Users\ANIL\Desktop\android-sdk\platform-tools\zipalign.exe -f 4 C:\Users\ANIL\AppData\Local\Temp\20191017-3868-paf3kz.h4yu\appium-uiautomator2-server-debug-androidTest.apk C:\Users\ANIL\AppData\Local\Temp\20191017-3868-1e9g3nn.xgdch\appium.tmp' exited with code 3221225781. Stdout: ''; Stderr: ''
I think you need to add the automationName parameter to your desired capabilities here. Something like:
automationName: UiAutomator1
Or
automationName: UiAutomator2
You can read about the automationName parameter under the Appium docs: http://appium.io/docs/en/writing-running-appium/caps/
It basically tells Appium which device-native automation framework to use.

An unknown server-side error occurred, Bad app: ⁨/../../. App(ipa) paths need to be absolute or an URL to a compressed file

While I am running the JsonScript in the appium inspector
Environment used:
"platformName": "iOS",
"deviceName": "iPhone Simulator",
"platformVersion": "12.1",
"app": "⁨⁨/../../...ipa",
"automationName":
"XCUITest",
"noReset": true
It is not starting the appium inspector and throwing the error
An unknown server-side error occurred while processing the command.
Original error: Bad app: ⁨⁨/../../. App(ipa) paths need to be absolute
or an URL to a compressed file
The simple way is create the app folder in the project root folder. Move your filename.ipa file inside app folder. Your app path will be
"app": "/app/filename.ipa"

No 'teamID' specified and no team ID found in the archive in ionic

Working in Ionic 2, then upgrading to 3 to try to fix this error. It began when I was trying to figure out a cordova plugin. The archive doesnt appear to be signed correctly.
** ARCHIVE SUCCEEDED **
2017-10-03 14:40:10.745 xcodebuild[4293:73077] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/12/9djblkvn1_7g0_41crqy9ht00000gn/T/Omnidispatch_2017-10-03_14-40-10.744.xcdistributionlogs'.
2017-10-03 14:40:10.965 xcodebuild[4293:73077] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fa1dde9d300>: Error Domain=IDEFoundationErrorDomain Code=1 "No 'teamID' specified and no team ID found in the archive" UserInfo={NSLocalizedDescription=No 'teamID' specified and no team ID found in the archive}
error: exportArchive: No 'teamID' specified and no team ID found in the archive
Error Domain=IDEFoundationErrorDomain Code=1 "No 'teamID' specified and no team ID found in the archive" UserInfo={NSLocalizedDescription=No 'teamID' specified and no team ID found in the archive}
** EXPORT FAILED **
Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,Omnidispatch.xcarchive,-exportOptionsPlist,/Developer/omnisolutions/omni-ionic/platforms/ios/exportOptions.plist,-exportPath,/Developer/omnisolutions/omni-ionic/platforms/ios/build/device
There have been a few solutions that suggest that its not the team id, but rather a certificate error. I'm not very good with mac certificates, but they seem to be in place and I've not changed them since this broke.
I have gone into xcode a time or two and the team was not saved, I've fixed that every time I've seen it and it seems to be staying there now, but its still not changing anything when i run ionic build ios
What else can I check?
I should add, that it builds in xcode 8, but not in vscode or on the commandline as it did previously.
I faced the same issue during a ionic cordova build without signature (for
pro MDM):
ionic build ios --release --device
--buildFlag="-UseModernBuildSystem=0"
finally I smash it using a build.json at the root folder with only the developmentTeam Info filled
{
"ios": {
"debug": {
"codeSignIdentity": "Apple Development: BLa BLa (XXXXXXX)",
"provisioningProfile": "<XXXXXX-XXXXXX-XXXXX>",
"provisioningProfileFile": "embedded.mobileprovision",
"certificateFile": "blabla.p12",
"developmentTeam": "<TEAMID>"
},
"release": {
"codeSignIdentity": "",
"provisioningProfile": "",
"provisioningProfileFile": "",
"certificateFile": "",
"developmentTeam": "<TEAMID>"
}
}
}
Hope it's help you
Unfortunately I did not find a great solution for this error. I was forced to rm -rf my directory, uninstall ionic and cordova and bring it all down from git and set it up again.

Resources