bug: Can't start Appium server through code - getting 'npm' executable is not found when even though npm is there
Los mantenedores suelen responder en 5 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- java
- Área
- mobile-dev, testing-qa
Línea de trabajo
Comienza con AppiumServiceBuilder y AppiumDriverLocalService utilizando las rutas de macOS proporcionadas, centrándote en cómo se resuelven el ejecutable de npm y PATH antes del inicio. Reproduce el fallo con el ejemplo mínimo y verifica que el servidor local de Appium se inicia correctamente y responde en 127.0.0.1:4723/status.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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
- Lenguaje dominante
- Java
- Estrellas
- 1.3k
- Forks
- 755
- Merge medio
- 5 d 14 h
- PR fusionados (30 d)
- 8
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de appium/java-client
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
appium/java-client#2426 ·
Los mantenedores suelen responder en 5 días
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 50/100
appium/java-client#2372 ·
Los mantenedores suelen responder en 5 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
appium/java-client#2368 ·
Los mantenedores suelen responder en 5 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 30/100
appium/java-client#2341 · 1 comentario ·
Los mantenedores suelen responder en 5 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
appium/java-client#2323 ·
Los mantenedores suelen responder en 5 días
Todos los issues de appium/java-client
Issues similares
-
ScyllaDB Manual: 3 broken linksAbiertolink-check link-check:manual
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 91/100
open-telemetry/opentelemetry-java#8870 ·
Los mantenedores suelen responder en 1 día
-
P2 testing
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
-
enhancement javascript
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
area/core kind/bug status/triage team/core-shared
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día