Unable to start application on this device: an unknown server-side (Windows)


#41


I am getting this same error both in record and spy. I have tried all of these suggested fixes, and no change. While it says it is starting application, it actually loads to the login page on the app on my actual device before it gives the error. Thanks for any help!


#42

Hi @Sheri_Ochoa1,

This sounds like an issue with the Desired Capability settings for appWaitActivity or appWaitPackage:

https://appium.io/docs/en/writing-running-appium/caps/#android-only

It looks like the app you’re testing might be using 2 different packages, and Appium doesn’t know which one to start.

You can set the Desired Capabilities settings to tell Katalon Studio (and the underlying Appium) how to launch an app.

  1. You can edit the settings by going to Project->Settings and then expanding Desired Capabilities->Mobile->Android.
  2. Choose the emulator or device you’re going to test on from the Device Name dropdown.
  3. Click the Add button to add a new appWaitPackage property of type String. Set the Value to com.smartmobile.pawtree, com.tradeweb.mainSDK which should work to capture both of the packages in your application.
  4. Hit Enter (not doing so will erase the text field)
  5. Add a new property for appWaitActivity of type String and Value *.MainActivity.
  6. Hit Enter
  7. Click the Apply button
  8. Click the OK button
  9. Try to Spy Mobile again

Hope this helps,

Chris


My Android app jumps over the start page when I use record mobile
#43

Chris, I did what you said, here are the results.


This is at the point when it brings up the login page to the app on my device, right before the error screen.

This is the error.


#44


#45

Update: I logged into the app on my device first, then I was able to proceed. I was able to do Object Spy, and Record Test. When I tried to run the test however, the app uninstalled on my phone.


#46

Hi @Sheri_Ochoa1,

There is an option for reinstalling the app each time you start the application that you can change to false.

If you look at your test, you should see a function for startApplication('APPLICATION_FILE', true), the second parameter is what tells the app to reinstall. If you set that parameter to false, it will keep the app installed between tests.

Hope this helps,

Chris


#47

Thank you! Any idea why the app won’t start on the login page?


#48

Hi @Sheri_Ochoa1,

I think the problem you’re seeing is because the login form and the main app have 2 different package names - likely, the login form is from a third party. When the test starts, Katalon/Appium are expecting a certain package and activity, and if it doesn’t find it, you get an error like you’re seeing.

I thought the settings I recommended for appWaitPackage would have allowed for both packages, but that doesn’t look like it’s working. I think you could try a couple of alternatives:

  1. Set appWaitPackage to * - a wildcard might allow Appium to run with any package
  2. Set appWaitPackage just to com.smartmobile.pawtree
  3. Set appWaitPackage just to com.tradeweb.mainSDK

You can also try setting appWaitActivity just to MainActivity (without the *.)

Hopefully one of these options will get it to work for you with the login screen.

– Chris


#49

Hi
I’ve just run into this ‘unable to start app’ error.
I’ve installed all components, although Appium was too much hassle to install via NPM (certain components kept failing) so I installed Appium Desktop - this is 1.10.0.
After reading previous notes above, I also changed Project -> Settings -> Desired Capabilities:
Name = appWaitActivity
Type = String
Value = *

My details and log follow - help would be appreciated:

**OS **(Windows 10)
Katalon Studio Version (5.10.1)

Environment (for Mobile testing)

  • Appium version ( Desktop 1.10.0):
  • Mobile platform/version under test( Android 7):
  • Real device or emulator/simulator ( Real Motorola G4):

Expected Behavior -

TC01 Verify Correct Alarm Message will complete

Actual Behavior -

Test Cases/TC01_Verify Correct Alarm Message FAILED.
Reason:
com.kms.katalon.core.exception.StepFailedException: Unable to start app at: ‘C:\Users\dbown\Katalon Studio\Dan Test\androidapp\APIDemos.apk’ (Root cause: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET
Build info: version: ‘3.7.1’, revision: ‘8a0099a’, time: ‘2017-11-06T21:07:36.161Z’
System info: host: ‘CS738579’, ip: ‘172.24.120.33’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: driver.version: SwipeableAndroidDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: read ECONNRESET
at JWProxy.command (C:\Program Files (x86)\Appium\resources\app\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:236:13))
at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.stepFailed(MobileKeywordMain.groovy:40)
at com.kms.katalon.core.mobile.keyword.internal.MobileKeywordMain.runKeyword(MobileKeywordMain.groovy:23)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.startApplication(StartApplicationKeyword.groovy:51)
at com.kms.katalon.core.mobile.keyword.builtin.StartApplicationKeyword.execute(StartApplicationKeyword.groovy:40)
at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords.startApplication(MobileBuiltInKeywords.groovy:74)
at com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords$startApplication.call(Unknown Source)
at TC01_Verify Correct Alarm Message.run(TC01_Verify Correct Alarm Message:25)
at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)
at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)
at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)
at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)
at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)
at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)
at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)
at TempTestCase1550183420536.run(TempTestCase1550183420536.groovy:22)


#50

Hi @Dan_Bown,

Katalon Studio 5.10.x only supports Appium 1.8.1 (or 1.8.2-beta if you’re adventurous). Can you try downgrading to that version to see if you have better luck?

– Chris


#51

Hi @Chris_Trevarthen
have now downgraded to Appium 1.8.1 but get an error that suggests I still have an Appium problem.
(it’r error referenced here by someone else: java.lang.ClassCastException: java.util.HashMap cannot be cast to org.openqa.selenium.WebElement ie error includes “java.lang.ClassCastException: java.util.HashMap cannot be cast to org.openqa.selenium.WebElement)”) .

I downloaded Appium Desktop 1.8.1 - this is what it says in Control panel and ‘About Appium’.
If I actually click ‘Appium’ to start that application though, I see a screen offering option ‘Start Server 1.9.1’.
Can anyone tell me whether Server is supposed to have a different version number or is this an Appium version control mistake?
Regards
Dan


#52

Hi @Dan_Bown,

I was getting that same error as well on a Mac when installing different versions of Appium. It’s due to an incompatible version of one of the underlying Appium libraries, probably java-client.

I ended up uninstalling all the previous versions I could find on my machine as well as Katalon Studio and any versions of NodeJS. I then reinstalled NodeJS 9.2.0 (you might still be able to run a newer version than this), Katalon Studio 5.10.1, and Appium 1.8.1 (I’m using npm, not the Appium Desktop version).

It seems like scorching the earth, but I needed to be sure I got rid of any of the old references to the incompatible library versions.

Hope this helps,

Chris


#53

Hi @Chris_Trevarthen
I uninstalled absolutely everything (referencing https://stackoverflow.com/questions/20711240/how-to-completely-remove-node-js-from-windows).
Do I actually need Node.js by the way? I’m not using NPM itself, since the install route for npm install -g appium@1.8.1 doesn’t work on that or any other version of Appium.
I do have Node.js (Node = v10.15.1) anyway, but just wonder (I haven’t tried without Node).
I have tried versions of Appium-Desktop (https://github.com/appium/appium-desktop/releases). Is Desktop version appropriate? Tried v1.82, v1.81 and v1.71. Even tried an old installer I had saved, from 2015.
If I look at ‘Appium’ on GitHub rather than ‘Appium-Desktop’ I only get option of source code rather than executable.
I hope I won’t have to start reinstalling JRE as well!

Thanks for assistance
Dan


#54

Hi @Dan_Bown,

Appium (at least the one that I have installed through npm) is a node module, so I don’t think it would run without NodeJS (although the Appium Desktop version may install NodeJS for you, I’m not as familiar with the desktop version).

I don’t think you’ll have to install a different JRE (I’m using 1.8.0_45).

My worry about the Appium Desktop version is whether the underlying Appium node package matches the version of the Desktop app; you might be installing Desktop version 1.8.1 but it might not include version 1.8.1 of the node package if they’re not keeping them in sync.

I know you mentioned previously that you couldn’t install Appium via the npm command. Would you be able to share the error/problems you’re seeing?

– Chris


#55

Hi @Chris_Trevarthen

I’m unsure how to install ‘Appium’ from source code, since that seems the only option in Git repository, whereas the Desktop version includes an exe download (excluding NPM).

I’m unable to use NPM to download Appium (npm install -g appium@1.8.1) due to ChromeDriver failure:
_info Chromedriver Install Downloading https://chromedriver.storage.googleapis.com/2.38/chromedriver_win32.zip
RequestError: Error: connect ECONNREFUSED 172.217.23.16:443).

I edited NPM config to include proxy settings, both http and https.
I also at one time used an alternative chromedriver url (npm config set chromedriver_cdnurl=http://npm.taobao.org/mirrors/chromedriver).

I also tried downloading chromedriver from the web and then pointing npm config at it (npm install chromedriver --chromedriver_filepath=C:\Users\dbown\AppData\Roaming\Chromedriver/chromedriver_win32.zip
npm config set chromedriver_filepath=C:\Users\dbown\AppData\Roaming\Chromedriver/chromedriver_win32.zip

The error I get (full details) from npm install -g appium@1.8.1 is:
info Chromedriver Install Installing Chromedriver version ‘2.38’ for platform ‘win’ and architecture ‘32’
info Chromedriver Install Opening temp file to write chromedriver_win32 to…
info Chromedriver Install Downloading https://chromedriver.storage.googleapis.com/2.38/chromedriver_win32.zip
RequestError: Error: connect ECONNREFUSED 172.217.23.16:443
at new RequestError (C:\Users\dbown\AppData\Roaming\npm\node_modules\appium\node_modules\request-promise-core\lib\errors.js:14:15)
at Request.plumbing.callback (C:\Users\dbown\AppData\Roaming\npm\node_modules\appium\node_modules\request-promise-core\lib\plumbing.js:87:29)
at Request.RP$callback [as _callback] (C:\Users\dbown\AppData\Roaming\npm\node_modules\appium\node_modules\request-promise-core\lib\plumbing.js:46:31)
at self.callback (C:\Users\dbown\AppData\Roaming\npm\node_modules\appium\node_modules\request\request.js:185:22)
at Request.emit (events.js:189:13)
at Request.onRequestError (C:\Users\dbown\AppData\Roaming\npm\node_modules\appium\node_modules\request\request.js:877:8)
at ClientRequest.emit (events.js:189:13)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:189:13)
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules\appium\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! appium-chromedriver@4.0.0 install: node install-npm.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the appium-chromedriver@4.0.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Any further pointers gratefully received - I am a bit stuck!


#56

Hi @Dan_Bown,

One quick thing that you could try before giving up on the npm route (I know you definitely tried a lot of things!) is to disable strict SSL checking for npm:

npm config set strict-ssl false

I’ll look at some other things, but I thought this might be a quick thing to try.

– Chris


#57

Hi @Dan_Bown,

I was looking at the Appium Desktop versions and it looks like the versions of he Desktop app are not in sync with the underlying server. So if you want to use Appium server 1.8.1 (which is what Katalon Studio 5.10.1 requires) you’ll need to actually install Appium Desktop 1.6.3. You can find the download here:

Hope this helps,

Chris


#58

Hi @Chris_Trevarthen

wow!!! Thank you so much for your continued support, I now have Katalon working - scripts running and recording. V 1.6.3 is the relevant version of Desktop. The filepath for Appium in my case is ‘C:\Program Files (x86)\Appium\resources\app\node_modules\appium’.

Thank you again,
Dan


#59

That’s great news! Glad you got it working.

– Chris


#60

Hi I am getting this error while start recording in Ubuntu


Please resolve it fast.