bug: Can't start Appium server through code - getting 'npm' executable is not found when even though npm is there
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- java
- Bereich
- mobile-dev, testing-qa
Rechercherichtung
Beginnen Sie mit AppiumServiceBuilder und AppiumDriverLocalService unter Verwendung der bereitgestellten macOS-Pfade und konzentrieren Sie sich darauf, wie die npm-Executable und PATH vor dem Start aufgelöst werden. Reproduzieren Sie den Fehler mit dem Minimalbeispiel und überprüfen Sie, dass der lokale Appium-Server erfolgreich startet und unter 127.0.0.1:4723/status antwortet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Do I have the most recent component updates?
- I use the most recent available driver/plugin and server versions
Is the component officially supported by the Appium team?
- I have verified the component repository is present under the Appium organization in GitHub
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
I wanted to upgrade from Appium 1.x to Appium 2.x+ but have been facing an issue when trying to run the appium server from the code. I get this error before it times out: [Appium] 'npm' executable is not found neither in the process working folder (/Users/[user]/Projects/povio-automated-qa) nor in any folders specified in the PATH environment variable (/usr/bin:/bin:/usr/sbin:/sbin). After Timeout I get this:
[The local appium server has not been started, Reason: Timed out waiting for [http://127.0.0.1:4723/status] to be available
after 20003 ms, Consider increasing the server startup timeout value (currently 20000ms), Node.js executable path:
/usr/local/bin/node, Arguments: [/opt/homebrew/bin/appium, --port, 4723, --address, 127.0.0.1, --log,
/Users/[user]/Projects/povio-automated-qa/target/resources/appium_server_logs1, --session-override], Output: [Appium]
'npm' executable is not found neither in the process working folder (/Users/mmeholli/Projects/povio-automated-qa) nor in any
folders specified in the PATH environment variable (/usr/bin:/bin:/usr/sbin:/sbin)
]
I have tried increasing the timeout, upgrading and downgrading appium, selenium, java, node, and have checked environmental variables for any potential fix, but nothing works.
This is the current code that I'm working with:
AppiumServiceBuilder appiumServiceBuilder = new AppiumServiceBuilder();
appiumServiceBuilder.usingPort(PORT)
.withIPAddress("127.0.0.1")
.withAppiumJS(new File("/opt/homebrew/bin/appium"))
.usingDriverExecutable(new File("/usr/local/bin/npm"))
.withArgument(GeneralServerFlag.SESSION_OVERRIDE)
.withLogFile(new File(System.getProperty("user.dir") + "/target/resources/appium_server_logs" + Thread.currentThread().getId()));
service = AppiumDriverLocalService.buildService(appiumServiceBuilder);
service.start();
I am using:
Appium 2.0.1
java-client 8.6.0
Selenium 4.9.1
Expected Behavior
I am expecting the appium server to start from the code
Minimal Reproducible Example
AppiumServiceBuilder appiumServiceBuilder = new AppiumServiceBuilder();
appiumServiceBuilder.usingPort(PORT)
.withIPAddress("127.0.0.1")
.withAppiumJS(new File("/opt/homebrew/bin/appium"))
.usingDriverExecutable(new File("/usr/local/bin/npm"))
.withArgument(GeneralServerFlag.SESSION_OVERRIDE)
.withLogFile(new File(System.getProperty("user.dir") + "/target/resources/appium_server_logs" + Thread.currentThread().getId()));
service = AppiumDriverLocalService.buildService(appiumServiceBuilder);
service.start();
Environment
- Operating system: Mac OS Ventura 13.3.1
- Appium server version (output of
appium --version): 2.0.1 - Appium driver(s) and their version(s):
- [email protected] [installed (npm)]
- [email protected] [installed (npm)]
- [email protected] [installed (npm)]
- [email protected] [installed (npm)]
- [email protected] [installed (npm)]
- Appium plugin(s) and their version(s):
- [email protected] [installed (npm)]
- [email protected] [installed (npm)]
- [email protected] [installed (npm)]
- Node.js version (output of
node --version): v20.8.0 npmversion (output ofnpm --version): 10.1.0- Last component(s) version which did not exhibit the problem:
- Platform and version under test:
- Real device or emulator/simulator:
Link to Appium Logs
No response
Further Information
No response
- Vorherrschende Sprache
- Java
- Sterne
- 1.3k
- Forks
- 755
- Ø Merge
- 5 T. 14 Std.
- Gemergte PRs (30 T.)
- 8
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus appium/java-client
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
appium/java-client#2426 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 50/100
appium/java-client#2372 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
appium/java-client#2368 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 30/100
appium/java-client#2341 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
appium/java-client#2323 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in appium/java-client
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
oracle/javavscode#652 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
OpenAPITools/openapi-generator#25014 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
AloisSeckar/demos-java#380 ·