bug: Can't start Appium server through code - getting 'npm' executable is not found when even though npm is there
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- mobile-dev, testing-qa
Hướng nghiên cứu
Bắt đầu với AppiumServiceBuilder và AppiumDriverLocalService bằng cách sử dụng các đường dẫn macOS được cung cấp, tập trung vào cách tệp thực thi npm và PATH được phân giải trước khi khởi động. Tái hiện lỗi bằng ví dụ tối thiểu và xác minh rằng máy chủ Appium cục bộ khởi động thành công và phản hồi tại 127.0.0.1:4723/status.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Java
- Star
- 1.3k
- Fork
- 755
- Merge trung bình
- 5 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 8
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của appium/java-client
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
appium/java-client#2426 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
appium/java-client#2372 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
appium/java-client#2368 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 30/100
appium/java-client#2341 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
appium/java-client#2323 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của appium/java-client
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
OpenAPITools/openapi-generator#25014 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openhab/openhab-core#5847 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
apache/parquet-java#3820 ·
Maintainer thường phản hồi trong vòng 1 ngày