iOS: Appium says application file must end in .zip .ipa .apk

1,765 views
Skip to first unread message

jj9...@att.com

unread,
Jun 9, 2014, 5:25:58 PM6/9/14
to appium-...@googlegroups.com
I am trying to migrate to Appium 1.1 and when using the application to run tests I keep getting the error that it is not recognizing the .app file. Do I now have to point appium to an .ipa for my iOS application? How can I get it to work the same way it did for 0.18.0?

Here is the error I am getting:


debug: Appium request initiated at /wd/hub/session

debug: Request received with params: {"desiredCapabilities":{"automationName":"selendroid","platform":"Mac","app":"/private/tmp/MyApp.dst/Applications/MyApp.app","simulator":true,"browserName":"iOS","timeHack":false,"variation":"Regular","locale":"en_GB","CFBundleName":"MyApp.app","device":"ipad","language":"en","SIMULATOR":true,"version":"6.1"}}

info: No appActivity desired capability or server param. Parsing from apk.

error: Using local app, but didn't end in .zip, .ipa or .apk
error: Failed to start an Appium session, err was: Error: Bad app: /private/tmp/MyApp.dst/Applications/MyApp.app. 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. cause: Error: Using local app, but didn't end in .zip, .ipa or .apk

info: No appPackage desired capability or server param. Parsing from apk.
info: Got configuration error, not starting session
info: Cleaning up appium session

info: Error: Bad app: /private/tmp/MyApp.dst/Applications/MyApp.app. 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. cause: Error: Using local app, but didn't end in .zip, .ipa or .apk
    at null.<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/android-common.js:57:13)
    at Device.configureLocalApp (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/device.js:85:5)
    at Device.configureApp (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/device.js:56:10)
    at androidCommon.configureApp (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/android-common.js:72:35)
    at androidCommon.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/devices/android/android-common.js:38:10)
    at Appium.configure (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:268:15)
    at Appium.start (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/appium.js:102:10)
    at exports.createSession (/Applications/Appium.app/Contents/Resources/node_modules/appium/lib/server/controller.js:155:16)
    at callbacks (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:164:37)
    at param (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:138:11)
info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Bad app: /private/tmp/MyApp.dst/Applications/MyApp.app. 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. cause: Error: Using local app, but didn't end in .zip, .ipa or .apk)","origValue":"Bad app: /private/tmp/MyApp.dst/Applications/MyApp.app. 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. cause: Error: Using local app, but didn't end in .zip, .ipa or .apk"},"sessionId":null}
POST /wd/hub/session 500 13ms - 678b


Thanks,

Jasmine

Isaac Murchie

unread,
Jun 9, 2014, 5:29:57 PM6/9/14
to jj9...@att.com, appium-...@googlegroups.com
Do not set 'automationName' to 'selendroid'. That is for Android of a certain stripe. Either delete 'automationName' altogether, or use 'appium'.


--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/d/optout.

Lukshica Dhayaparan

unread,
Jun 11, 2014, 6:23:10 AM6/11/14
to appium-...@googlegroups.com
Im getting the same error on android as well :(
But I didnt set the 'automationName'. Please help me 
Thanks in advance 

Isaac Murchie

unread,
Jun 13, 2014, 6:18:16 PM6/13/14
to Lukshica Dhayaparan, appium-...@googlegroups.com
What are the capabilities you're sending?


--

Lukshica Dhayaparan

unread,
Jun 16, 2014, 12:52:54 AM6/16/14
to Isaac Murchie, appium-...@googlegroups.com
  Sorry for the delay , I am seding the following ones 

              capabilities.setCapability("device", "Android");
capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
capabilities.setCapability(CapabilityType.VERSION, "4.4.2");
capabilities.setCapability(CapabilityType.PLATFORM, "Android");
capabilities = DesiredCapabilities.android();
capabilities.setCapability("app", app.getAbsolutePath());
capabilities.setCapability("app-package", "src.com.st.accounts");
capabilities.setCapability("app-activity", ".AddAccount");


Anton Sidtsga

unread,
Jun 17, 2014, 5:17:59 AM6/17/14
to appium-...@googlegroups.com
Have the same issue.

Have one project that successfully runs on windows, but had no lack to run it under mac cause of this error.

вторник, 10 июня 2014 г., 0:25:58 UTC+3 пользователь jj9...@att.com написал:

Isaac Murchie

unread,
Jun 17, 2014, 11:46:04 AM6/17/14
to Lukshica Dhayaparan, appium-...@googlegroups.com
First, the four lines at the beginning are not doing anything, since you're re-initializing the capabilities object on the fifth line.

Second, what is the value of `app.getAbsolutePath()`? Send the Appium server logs so we can see what the server is getting and working with.

Thanks.

Xiaoxuan Jin

unread,
Jun 19, 2014, 7:33:23 PM6/19/14
to appium-...@googlegroups.com, luks...@gmail.com
Hi,
I'm having issue with running tests against Chrome browser on android device. I was able to do so with the previous appium server 1.0.0.3 with just default value set. 
However, with the latest one 1.1, with all values set to default, I get the following error:
> ERROR: debug: Request received with params: {"desiredCapabilities":{"platform":null,"app":"chrome","browserName":null,"device":"Android","version":null}}
> ERROR: error: Using local app, but didn't end in .zip, .ipa or .apk
> info: Got configuration error, not starting session
> ERROR: error: Failed to start an Appium session, err was: Error: Bad app: ...\Appium1.x\node_modules\appium\chrome. 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. cause: Error: Using local app, but didn't end in .zip, .ipa or .apk
> info: Error: Bad app: ...\Appium1.x\node_modules\appium\chrome. 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. cause: Error: Using local app, but didn't end in .zip, .ipa or .apk
>     at null.<anonymous> (...\Appium1.x\node_modules\appium\lib\devices\android\android-common.js:57:13)
>     at Device.configureLocalApp (...\Appium1.x\node_modules\appium\lib\devices\device.js:85:5)
>     at Device.configureApp (...\Appium1.x\node_modules\appium\lib\devices\device.js:56:10)
>     at androidCommon.configureApp (...\Appium1.x\node_modules\appium\lib\devices\android\android-common.js:72:35)
>     at androidCommon.configure (...\Appium1.x\node_modules\appium\lib\devices\android\android-common.js:38:10)
>     at Appium.configure (...\Appium1.x\node_modules\appium\lib\appium.js:268:15)
>     at Appium.start (...\Appium1.x\node_modules\appium\lib\appium.js:102:10)
>     at exports.createSession (...\Appium1.x\node_modules\appium\lib\server\controller.js:155:16)
>     at callbacks (...\Appium1.x\node_modules\appium\node_modules\express\lib\router\index.js:164:37)
>     at param (...\Appium1.x\node_modules\appium\node_modules\express\lib\router\index.js:138:11)
> info: Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Bad app: <computer path>\\Appium1.x\\node_modules\\appium\\chrome. 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. cause: Error: Using local app, but didn't end in .zip, .ipa or .apk)","origValue":"Bad app: <computer path>\\Appium1.x\\node_modules\\appium\\chrome. 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. cause: Error: Using local app, but didn't end in .zip, .ipa or .apk"},"sessionId":null}

As you can see, the capabilities are  {"desiredCapabilities":{"platform":null,"app":"chrome","browserName":null,"device":"Android","version":null}}, which worked fine for the 1.0.0.3 version. Can you let me know what is changed, and if I need to update anything on my end to make the tests work again? Thanks.

From the code, we set the capabilities

Isaac Murchie

unread,
Jun 20, 2014, 12:36:49 PM6/20/14
to Xiaoxuan Jin, appium-...@googlegroups.com, Lukshica Dhayaparan


Reply all
Reply to author
Forward
0 new messages