ApiClient.applyEnvVariables() throws NullPointerException when CONDUCTOR_AUTH_KEY is not set
@nthmost-orkes đang làm issue này rồi.
Từ ngày 27/4/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Bug
ApiClient.applyEnvVariables() crashes with NullPointerException when connecting to a plain OSS Conductor server (no auth needed). Any user who sets only CONDUCTOR_SERVER_URL will hit this.
Tracked as a zero-to-one onboarding blocker in conductor-oss/getting-started#51
Steps to Reproduce
export CONDUCTOR_SERVER_URL=http://localhost:8080/api
# Note: no auth keys set — correct for OSS Conductor
java -cp <classpath> com.netflix.conductor.sdk.examples.helloworld.Main
Error
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException: Cannot invoke "String.trim()" because
the return value of "java.lang.System.getenv(String)" is null
at io.orkes.conductor.client.ApiClient$ApiClientBuilder.applyEnvVariables(ApiClient.java:186)
at io.orkes.conductor.client.ApiClient$ApiClientBuilder.build(ApiClient.java:175)
at io.orkes.conductor.sdk.examples.util.ClientUtil.<clinit>(ClientUtil.java:27)
Root Cause
In orkes-client/src/main/java/io/orkes/conductor/client/ApiClient.java, lines 184–196:
String conductorAuthKey = System.getenv("CONDUCTOR_AUTH_KEY");
if (conductorAuthKey == null) {
conductorAuthKey = System.getenv("CONDUCTOR_SERVER_AUTH_KEY").trim(); // ← NPE if env var is also null
}
String conductorAuthSecret = System.getenv("CONDUCTOR_AUTH_SECRET");
if (conductorAuthSecret == null) {
conductorAuthSecret = System.getenv("CONDUCTOR_SERVER_AUTH_SECRET").trim(); // ← NPE if env var is also null
}
When neither CONDUCTOR_AUTH_KEY nor CONDUCTOR_SERVER_AUTH_KEY is set (the OSS case), .trim() is called on null.
Fix
Null-check before .trim():
String conductorAuthKey = System.getenv("CONDUCTOR_AUTH_KEY");
if (conductorAuthKey == null) {
String legacyKey = System.getenv("CONDUCTOR_SERVER_AUTH_KEY");
conductorAuthKey = legacyKey != null ? legacyKey.trim() : null;
}
String conductorAuthSecret = System.getenv("CONDUCTOR_AUTH_SECRET");
if (conductorAuthSecret == null) {
String legacySecret = System.getenv("CONDUCTOR_SERVER_AUTH_SECRET");
conductorAuthSecret = legacySecret != null ? legacySecret.trim() : null;
}
Impact
This crash affects every example in the examples module that uses ClientUtil, including the recommended helloworld/Main.java. OSS users have no way to run any of these examples without auth keys, which defeats the zero-to-one experience.
Zero-to-one tracking: conductor-oss/getting-started#51
- Ngôn ngữ chính
- Java
- Star
- 12
- Fork
- 10
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
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 conductor-oss/java-sdk
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
conductor-oss/java-sdk#135 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
conductor-oss/java-sdk#133 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
conductor-oss/java-sdk#132 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
conductor-oss/java-sdk#131 ·
-
NOOP task: missing builder classĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
conductor-oss/java-sdk#130 ·
Tất cả issue của conductor-oss/java-sdk
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
redhat-developer/intellij-quarkus#1626 ·
-
Type/Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
wso2/product-integrator-mi#5061 ·
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 76/100
quarkiverse/quarkus-roq#1277 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Typos in page footerĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/logging-site#48 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/maven-surefire#3496 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày