microsoft / microsoft/go

os/user TestGroupIds failure "The user name could not be found" on Windows 10 AAD machine

Open
#108 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
431
Forks
44
Avg merge
21h 18m
Merged PRs (30d)
30

Description

When I try to run the tests on Windows on my work machine, I get this error:

--- FAIL: TestGroupIds (0.00s)
    user_test.go:144: &{Uid:[...] Gid:[...] Username:NORTHAMERICA\dagood Name:Davis Goodin HomeDir:C:\Users\dagood}.GroupIds(): The user name could not be found.
FAIL
FAIL    os/user 1.819s

Someone else hit this in 2018, and it ended up seeming to be a configuration issue on their machine. Another machine also using AAD worked: https://github.com/golang/go/issues/26041. It doesn't look like they were able to figure out the underlying issue.

To check for AAD: https://stackoverflow.com/a/51852296

C:\Users\dagood>dsregcmd /status

+----------------------------------------------------------------------+
| Device State                                                         |
+----------------------------------------------------------------------+

             AzureAdJoined : YES
          EnterpriseJoined : NO
              DomainJoined : NO
               Device Name : dagood-3
[...]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the failing TestGroupIds case at user_test.go:144 in the os/user package and compare the Windows Azure AD environment described here with issue #26041. Run the test on an AzureAdJoined, non-domain-joined Windows machine and inspect the dsregcmd /status output. Done means identifying a reproducible cause and a verified resolution or documenting why the failure is configuration-specific.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.