Athens: Fix running the athens proxy on windows

Created on 20 Aug 2018  路  5Comments  路  Source: gomods/athens

This is a placeholder, Jeremy will fill in the stacktraces and error messages.

bug proxy

Most helpful comment

@marpio I need all the help that I can get! 馃槉

All 5 comments

There are two issues kind of interleaved here. Here is the overall stack trace when running in a non-administrative PowerShell session.

PS C:\Users\jerem\go\src\github.com\gomods\athens> go run .\cmd\proxy\
INFO[0000] Starting application at 127.0.0.1:3000
ERRO[0001] exit status 1 : go: creating work dir: mkdir C:\WINDOWS\go-build184515607: Access is denied.
  http-method=GET http-path=/github.com/athens-artifacts/no-tags/@v/v0.0.0-20180803171426-1a540c5d67ab.info http-url=/github.com/athens-artifacts/no-tags/@v/v0.0.0-20180803171426-1a540c5d67ab.info kind="Internal Server Error" module=github.com/athens-artifacts/no-tags operation=download.versionInfoHandler ops="[download.versionInfoHandler protocol.Info protocol.fillCache goget.Version goGetFetcher.Fetch module.getSources]" version=v0.0.0-20180803171426-1a540c5d67ab
handler: GET /github.com/athens-artifacts/no-tags/@v/v0.0.0-20180803171426-1a540c5d67ab.info [500]

The first error:

 exit status 1 : go: creating work dir: mkdir C:\WINDOWS\go-build184515607: Access is denied.

This goes away when running an administrative PowerShell session. Not sure if we want to require someone to run it as an admin?

Second one actually causes an issue when trying to build and use the proxy:

PS C:\Users\jerem\projects\walkthrough> go run .
go: finding github.com/athens-artifacts/samplelib v1.0.0
go: github.com/athens-artifacts/[email protected]: unexpected status (http://127.0.0.1:3000/github.com/athens-artifacts/samplelib/@v/v1.0.0.info): 500 Internal Server Error
go: error loading module requirements

I'm currently working on #429 so it's related. I can take this one if neither you @carolynvs or @jeremyrickard started to work on this or want to do it.

@marpio I need all the help that I can get! 馃槉

Got this error msg:

time="2018-08-21T11:33:53+02:00" level=error msg="exit status 1 : go1.11rc1: failed to get home directory: can't find us
er home directory; %USERPROFILE% is empty\n" http-method=GET http-path=/github.com/athens-artifacts/no-tags/@v/v0.0.0-20
180803171426-1a540c5d67ab.info http-url=/github.com/athens-artifacts/no-tags/@v/v0.0.0-20180803171426-1a540c5d67ab.info
kind="Internal Server Error" module=github.com/athens-artifacts/no-tags operation=download.versionInfoHandler ops="[down
load.versionInfoHandler protocol.Info protocol.fillCache goget.Version goGetFetcher.Fetch module.getSources]" version=v0
.0.0-20180803171426-1a540c5d67ab

USERPROFILE env var is not empty though...

So the problem is missing env vars we are (not) passing here:
https://github.com/gomods/athens/blob/c0635b748ca7fa788b43835d8db2f48351f7ec0c/pkg/module/go_get_fetcher.go#L97
I'll submit a PR later today.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

robjloranger picture robjloranger  路  4Comments

arschles picture arschles  路  4Comments

robjloranger picture robjloranger  路  3Comments

leitzler picture leitzler  路  3Comments

chriscoffee picture chriscoffee  路  4Comments