GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [google-auth-library-java] NullPointerException when APPDATA environment variable is unset on Windows in GoogleAuthUtils.getWellKnownCredentialsFile · Issue #12565 · googleapis/google-cloud-java

[google-auth-library-java] NullPointerException when APPDATA environment variable is unset on Windows in GoogleAuthUtils.getWellKnownCredentialsFile #12565

New issue
Copy link
New issue
Copy link
Closed
Closed
[google-auth-library-java] NullPointerException when APPDATA environment variable is unset on Windows in GoogleAuthUtils.getWellKnownCredentialsFile#12565
#13669 (+2)
Copy link
Labels
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.

Description

@nbayati
nbayati
opened on Mar 31, 2026
Issue body actions

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.

Activity

  1. chingor13
    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
  2. chingor13
    transferred this issue fromgoogleapis/google-auth-library-javaon Apr 1, 2026
  3. blakeli0
    added
    auth
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Apr 14, 2026
  4. lqiu96
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    priority: p3Desirable enhancement or fix. May not be included in next release.
    and removed
    priority: p2Moderately-important priority. Fix may not be included in next release.
    on Apr 22, 2026
  5. anishesg commented on Apr 25, 2026

    @anishesg
    anishesg
    on Apr 25, 2026
    More actions

    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.

  6. westarle
    added 9 commits that reference this issue on Jun 15, 2026

    fix(auth): handle missing APPDATA on Windows gracefully

    This issue will close once commit bd0a18e is merged into the 'main' branch.
    bd0a18e

    fix(auth): handle missing APPDATA on Windows gracefully

    This issue will close once commit 80f34d1 is merged into the 'main' branch.
    80f34d1

    fix(auth): handle missing APPDATA on Windows gracefully

    This issue will close once commit d16f348 is merged into the 'main' branch.
    d16f348

    fix(auth): handle missing APPDATA on Windows gracefully

    This issue will close once commit 623bd98 is merged into the 'main' branch.
    623bd98

    fix(auth): handle missing APPDATA on Windows gracefully

    This issue will close once commit 8bdd44a is merged into the 'main' branch.
    8bdd44a

    fix(auth): handle missing APPDATA on Windows gracefully

    This issue will close once commit 4a787a0 is merged into the 'main' branch.
    4a787a0

    fix(auth): handle missing APPDATA on Windows gracefully

    This issue will close once commit 1fcbaa2 is merged into the 'main' branch.
    1fcbaa2

    fix(auth): handle missing APPDATA on Windows gracefully

    This issue will close once commit ee4c6d3 is merged into the 'main' branch.
    ee4c6d3

    fix(auth): handle missing APPDATA on Windows gracefully

    This issue will close once commit bd5a886 is merged into the 'main' branch.
    bd5a886
  7. westarle
    closed this as completedin #13471on Jun 17, 2026
  8. westarle
    added a commit that references this issue on Jun 17, 2026

    fix(auth): handle missing APPDATA on Windows gracefully (#13471)

    This issue will close once commit 77e84a9 is merged into the 'main' branch.
    77e84a9
  9. lqiu96
    added 2 commits that reference this issue on Jun 30, 2026

    fix(auth): handle missing APPDATA on Windows gracefully (#13471)

    This issue will close once commit 5b49f07 is merged into the 'main' branch.
    5b49f07

    chore(main): release 1.88.0 (#13669)

    This issue will close once commit 73c9a03 is merged into the 'main' branch.
    73c9a03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    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.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.