Skip to content

x/pkgsite/cmd/pkgsite: invalid env set #70581

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
vkml opened this issue Nov 26, 2024 · 4 comments
Closed

x/pkgsite/cmd/pkgsite: invalid env set #70581

vkml opened this issue Nov 26, 2024 · 4 comments
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite

Comments

@vkml
Copy link

vkml commented Nov 26, 2024

What is the URL of the page with the issue?

any module URL

What is your user agent?

Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Screenshot

No response

What did you do?

Ran the pkgsite command to run the server. Exact used command syntax: pkgsite -http=":7000"

What did you see happen?

On Windows, running the command for the local repository starts the server but fails and hands indefinitely when attempting to follow the module tree. During server init the following error is displayed:
Error: loading packages from stdlib: err: fork/exec E:\LANG\Go\bin\go.exe: The parameter is incorrect.: stderr:

The godoc command works fine on the same local project.

What did you expect to see?

Local project documentation.

@vkml vkml added the pkgsite label Nov 26, 2024
@gopherbot gopherbot added this to the Unreleased milestone Nov 26, 2024
@vkml
Copy link
Author

vkml commented Nov 26, 2024

Found the possible reason for the following error:

Error: loading packages from stdlib: err: fork/exec E:\LANG\Go\bin\go.exe: The parameter is incorrect.: stderr:

Internal go list ... command call fails due to function NewGoPackagesStdlibModuleGetter(...) sets a malformed env variable. It tries to append env strings slice with "GOROOT=" and abs, which results in 2 separate slice elements, but the intended behavior would be "GOROOT=" + abs to set GOROOT.

@seankhliao seankhliao changed the title x/pkgsite: command pkgsite server hangs when run on a local project x/pkgsite/cmd/pkgsite: invalid env set Nov 26, 2024
@ansaba ansaba added help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. labels Dec 3, 2024
@findleyr
Copy link
Member

CC @matloob

@findleyr findleyr modified the milestones: Unreleased, pkgsite/backlog Dec 12, 2024
@matloob
Copy link
Contributor

matloob commented Dec 16, 2024

This was fixed by https://go.dev/cl/635675.

@matloob matloob closed this as completed Dec 16, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. pkgsite
Projects
None yet
Development

No branches or pull requests

6 participants