'Bad App' error randomly, with correct path and valid ipa file

When running many tests, one after the other, on the same device, I will receive a number of ‘Bad App’ errors, like so:

org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Bad app: /Users/mynamehere/Desktop/companyapp.ipa. App paths need to be absolute, or relative to the appium server install dir, or a URL to compressed file, or a special app name. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 16 milliseconds

However, the path to the app is correct - and the app is a valid ipa file which is successfully installed and tested during other test runs.

Note that I do use the full reset option, so the app is uninstalled and reinstalled between runs. Some tests will work, others will not - it seems random.

I set the capability like so:

capabilities.setCapability(“app”, “/Users/mynamehere/Desktop/companyapp.ipa”);

The path is absolute, and is correct.

Additionally, if I try and host the app in dropbox to try and see if that avoids this issue, I get the following error:

[Error: Could not extract Info.plist from application: Plist file doesn’t exist: ‘/var/folders/jr/ysjpvrn973d7ptdm4pm6hxsh0000gn/T/2016413-1519-1g3vfsl/appium-app.app/Info.plist’]
[iOS] Could not set the bundleId from app.
[MJSONWP] Encountered internal error running command: Error: Could not extract Info.plist from application: Plist file doesn’t exist: ‘/var/folders/jr/ysjpvrn973d7ptdm4pm6hxsh0000gn/T/2016413-1519-1g3vfsl/appium-app.app/Info.plist’
at Object.wrappedLogger.errorAndThrow (lib/logger.js:60:13)
at extractPlist$ (lib/extract.js:14:9)
at tryCatch (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
at run (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:104:47)
at /usr/local/lib/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.promise.js:115:28
at flush (/usr/local/lib/node_modules/appium/node_modules/babel-runtime/node_modules/core-js/library/modules/$.microtask.js:19:5)
at doNTCallback0 (node.js:430:9)
at process._tickCallback (node.js:359:13)
[HTTP] ← POST /wd/hub/session 500 6319 ms - 307

Even though it is the same app file I can run in individual tests. I can also use this same dropbox location to load the app for using Testdroid and receive no errors.

The device in question runs iOS 9.3.1, my machine has Xcode 7.2, Max OSX El Capitan, Appium 1.5.2.

Does anyone know how to properly load the app from a URL? Will this even prevent the ‘bad app’ error when running locally? This is making it difficult to debug tests before doing cloud runs, as I need to run the suite on a somewhat regular basis before a cloud-based run.

1 Like

I have the same issue(
Anybody help us!

Hi,

Copy the exact path of the file from Get Info with app name.ipa

This will solve the issue :slight_smile:

Hi Santhosh,

As per above, the app path is correct and absolute, and Appium will use the same path and fail sometimes, but work other times during the same run of a suite. So copying the path will do nothing to resolve this issue, as the app path is not actually the problem.

Please also note, this error ONLY occurs on Appium 1.5.2. It does NOT occur on lower versions, such as 1.4.13.

I am getting the exact same error. Has this been addressed in the most current version of appium?

MonkeysPaw - I do not believe it has. Try an older version - I know of 1.4.13 to be working

I’m running into SessionNotFound exceptions in 1.4.13, which prompted me to jump to 1.5.x. :\

I am facing same issue. Does anyone have solution for this?