bug: Can't start Appium server through code - getting 'npm' executable is not found when even though npm is there
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 35/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- java
- Domínio
- mobile-dev, testing-qa
Direção de pesquisa
Comece com AppiumServiceBuilder e AppiumDriverLocalService usando os caminhos macOS fornecidos, concentrando-se em como o executável npm e PATH são resolvidos antes da inicialização. Reproduza a falha com o exemplo mínimo e verifique se o servidor Appium local é iniciado com sucesso e responde em 127.0.0.1:4723/status.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Java
- Estrelas
- 1.3k
- Forks
- 755
- Merge médio
- 5d 14h
- PRs com merge (30d)
- 8
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de appium/java-client
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
appium/java-client#2426 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 50/100
appium/java-client#2372 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 30/100
appium/java-client#2368 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 30/100
appium/java-client#2341 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 15/100
appium/java-client#2323 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de appium/java-client
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
OpenAPITools/openapi-generator#25014 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
AloisSeckar/demos-java#380 ·
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
openhab/openhab-core#5847 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
appsmithorg/appsmith#42297 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100