You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[google-auth-library-java] NullPointerException when APPDATA environment variable is unset on Windows in GoogleAuthUtils.getWellKnownCredentialsFile #12565
authpriority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
In GoogleAuthUtils.getWellKnownCredentialsFile, when the OS is detected as Windows and the CLOUDSDK_CONFIG environment variable is not set, the code attempts to resolve the gcloud configuration directory using the APPDATA environment variable. If the APPDATA environment variable is missing, provider.getEnv("APPDATA") returns null.
Passing null to the new File(String) constructor instantly throws a raw NullPointerException. This causes the library to crash with an unhelpful stack overflow or server runtime crash, instead of failing gracefully with a FileNotFoundException or IOException.
changed the title [-]NullPointerException when APPDATA environment variable is unset on Windows in GoogleAuthUtils.getWellKnownCredentialsFile[/-][+][google-auth-library-java] NullPointerException when APPDATA environment variable is unset on Windows in GoogleAuthUtils.getWellKnownCredentialsFile[/+]on Apr 1, 2026
Fix in #12913. Adds a null/empty/blank check for APPDATA before building the credentials path, and throws a descriptive error instead of an opaque NPE.
authpriority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
Activity
[-]NullPointerException when APPDATA environment variable is unset on Windows in GoogleAuthUtils.getWellKnownCredentialsFile[/-][+][google-auth-library-java] NullPointerException when APPDATA environment variable is unset on Windows in GoogleAuthUtils.getWellKnownCredentialsFile[/+]anishesg commentedon Apr 25, 2026
Fix in #12913. Adds a null/empty/blank check for APPDATA before building the credentials path, and throws a descriptive error instead of an opaque NPE.
fix(auth): handle missing APPDATA on Windows gracefully
fix(auth): handle missing APPDATA on Windows gracefully
fix(auth): handle missing APPDATA on Windows gracefully
fix(auth): handle missing APPDATA on Windows gracefully
fix(auth): handle missing APPDATA on Windows gracefully
fix(auth): handle missing APPDATA on Windows gracefully
fix(auth): handle missing APPDATA on Windows gracefully
fix(auth): handle missing APPDATA on Windows gracefully
fix(auth): handle missing APPDATA on Windows gracefully
fix(auth): handle missing APPDATA on Windows gracefully (#13471)
fix(auth): handle missing APPDATA on Windows gracefully (#13471)
chore(main): release 1.88.0 (#13669)