appium / java-client

Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol
Apache License 2.0
1.18k stars 752 forks source link

Not able to start appium server programatically #1684

Closed RSM-SBA closed 2 years ago

RSM-SBA commented 2 years ago

Description

I'm linking a problem which was posted in the appium server git. For me it looked like that changes within the appium2.0beta@28 release broke the starting of the server with the java-client version 8.0.0

As the downgrading to 7.0.0 is not an option due to the spring vulnerability, it would be nice if someone could have a look, if the java-client has to adept the changes withing the latest appium 2.0 beta

https://github.com/appium/appium/issues/16753

Environment

Details

Please provide more details, if necessary.

2022-04-08 08:24:35:798 - [Appium] Attempting to load plugin images...
2022-04-08 08:24:35:800 - [debug] [Appium] Requiring plugin at /Users/jenkins/HomeOfQA/workspace/RMA-iOS-Versions/uitesting/.appium/node_modules/@appium/images-plugin
2022-04-08 08:24:37:030 - [Appium] Welcome to Appium v2.0.0-beta.28 (REV 28603c381745d77b6e6efb8b70e8de870638eb29)
2022-04-08 08:24:37:032 - [Appium] Non-default server args:
2022-04-08 08:24:37:034 - [Appium] { address: '127.0.0.1',
2022-04-08 08:24:37:034 - [Appium]   allowInsecure: [ 'adb_shell' ],
2022-04-08 08:24:37:035 - [Appium]   localTimezone: true,
2022-04-08 08:24:37:035 - [Appium]   logTimestamp: true,
2022-04-08 08:24:37:035 - [Appium]   port: 4727,
2022-04-08 08:24:37:035 - [Appium]   usePlugins: [ 'images' ] }
2022-04-08 08:24:37:035 - [Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
2022-04-08 08:24:37:035 - [Appium] { 'appium:noReset': 'false' }
2022-04-08 08:24:37:036 - [Appium] Attempting to load driver xcuitest...
2022-04-08 08:24:37:038 - [debug] [Appium] Requiring driver at /Users/jenkins/HomeOfQA/workspace/RMA-iOS-Versions/uitesting/.appium/node_modules/appium-xcuitest-driver
2022-04-08 08:24:38:485 - [Appium] Appium REST http interface listener started on 127.0.0.1:4727
2022-04-08 08:24:38:486 - [Appium] Available drivers:
2022-04-08 08:24:38:486 - [Appium]   - xcuitest@4.3.5 (automationName 'XCUITest')
2022-04-08 08:24:38:486 - [Appium] Available plugins:
2022-04-08 08:24:38:486 - [Appium]   - images@1.2.4 (ACTIVE)
2022-04-08 08:24:38:498 - [HTTP] --> GET /status
2022-04-08 08:24:38:498 - [HTTP] {}
2022-04-08 08:24:38:499 - [debug] [AppiumDriver@1229] Calling AppiumDriver.getStatus() with args: []
2022-04-08 08:24:38:523 - [debug] [AppiumDriver@1229] Encountered internal error running command: Error: The session with id 'undefined' does not exist
2022-04-08 08:24:38:523 - [debug] [AppiumDriver@1229]     at AppiumDriver.executeCommand (/Users/jenkins/HomeOfQA/workspace/RMA-iOS-Versions/uitesting/node_modules/appium/lib/appium.js:549:15)
2022-04-08 08:24:38:523 - [debug] [AppiumDriver@1229]     at processTicksAndRejections (internal/process/task_queues.js:95:5)
2022-04-08 08:24:38:523 - [debug] [AppiumDriver@1229]     at asyncHandler (/Users/jenkins/HomeOfQA/workspace/RMA-iOS-Versions/uitesting/node_modules/@appium/base-driver/lib/protocol/protocol.js:313:19)
2022-04-08 08:24:38:540 - [HTTP] <-- GET /status 500 41 ms - 716
mykola-mokhnach commented 2 years ago

not sure how this is related to java client. It is obviously a server bug

RSM-SBA commented 2 years ago

someone mentioned this in the linked issue thread

This issue is in latest jar (Version: 8.0.0). I have downgraded client version to 7.0.0 and every thing working fine. With latest jar i think issue with fetching node.js executable and use it in the process to create appium session

https://github.com/appium/appium/issues/16753#issuecomment-1096665689

mykola-mokhnach commented 2 years ago

I don't observe any java client exceptions in that issue report. Do you experience any issues finding main appium executable locally?

RSM-SBA commented 2 years ago

I also thought it is an server issue, and I don't see such exceptions, but I was not sure because it was mentioned that client version 7 is working

mykola-mokhnach commented 2 years ago

It's not possible to fix anything without having clear logs/exception traces

RSM-SBA commented 2 years ago

fixed with appium server version 2.0beta@30