Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

AssertionError [ERR_ASSERTION]: a path argument must be provided #169

Closed
2 of 5 tasks
Hunter-Thompson opened this issue Nov 21, 2021 · 2 comments
Closed
2 of 5 tasks
Labels
bug Something isn't working

Comments

@Hunter-Thompson
Copy link

Hunter-Thompson commented Nov 21, 2021

Description:
While running setup-go, it fails to set the GOPATH

Action version:
v2

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:
v1.7

Repro steps:
https://github.com/Hunter-Thompson/gojen/runs/4276146794?check_suite_focus=true

Expected behavior:
My go build command to run.

Actual behavior:

Error log:

 Setup go stable version spec 1.7
Attempting to download 1.7...
matching 1.7...
Not found in manifest.  Falling back to download directly from Go
Install from dist
Acquiring go1.7.6 from https://storage.googleapis.com/golang/go1.7.6.linux-amd64.tar.gz
Extracting Go...
/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/a2859f92-5cf0-4750-8a1e-85b46144016f -f /home/runner/work/_temp/b124ab7e-e40a-421f-99ce-13f9035024bf
Successfully extracted go to /home/runner/work/_temp/a2859f92-5cf0-4750-8a1e-85b46144016f
Adding to the cache ...
Successfully cached go to /opt/hostedtoolcache/go/1.7.6/x64
Added go to the path
(node:1563) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: a path argument must be provided
    at Object.<anonymous> (/home/runner/work/_actions/actions/setup-go/v2/dist/index.js:4752:18)
    at Generator.next (<anonymous>)
    at /home/runner/work/_actions/actions/setup-go/v2/dist/index.js:4692:71
    at new Promise (<anonymous>)
    at module.exports.672.__awaiter (/home/runner/work/_actions/actions/setup-go/v2/dist/index.js:4688:12)
    at Object.mkdirP (/home/runner/work/_actions/actions/setup-go/v2/dist/index.js:4751:12)
    at Object.<anonymous> (/home/runner/work/_actions/actions/setup-go/v2/dist/index.js:204:22)
    at Generator.next (<anonymous>)
    at /home/runner/work/_actions/actions/setup-go/v2/dist/index.js:57:71
    at new Promise (<anonymous>)
(node:1563) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:1563) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Successfully setup go version 1.7
go version go1.7.6 linux/amd64
@Hunter-Thompson Hunter-Thompson added bug Something isn't working needs triage labels Nov 21, 2021
@Hunter-Thompson
Copy link
Author

Turns out staying awake for 20h does bad things, I was using go version 1.7 instead of 1.17.

@tamird
Copy link

tamird commented Jan 10, 2022

Why was this closed? This looks like a valid bug report. I see the same error when using go1.7 and lower. See for instance https://github.com/petermattis/goid/runs/4763366306?check_suite_focus=true#step:3:19.

Run actions/setup-go@v2
  with:
    go-version: 1.7
    stable: true
    token: ***
Setup go stable version spec 1.7
Attempting to download 1.7...
matching 1.7...
Not found in manifest.  Falling back to download directly from Go
Install from dist
Acquiring go1.7.6 from https://storage.googleapis.com/golang/go1.7.6.linux-amd64.tar.gz
Extracting Go...
/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/e7673e9a-46ac-434b-94a7-b14d4d4089d2 -f /home/runner/work/_temp/143f60b9-a8f9-4f4a-9af4-0df088c1c063
Successfully extracted go to /home/runner/work/_temp/e7673e9a-46ac-434b-94a7-b14d4d4089d2
Adding to the cache ...
Successfully cached go to /opt/hostedtoolcache/go/1.7.6/x64
Added go to the path
Successfully setup go version 1.7
(node:1581) UnhandledPromiseRejectionWarning: AssertionError [ERR_ASSERTION]: a path argument must be provided
    at Object.<anonymous> (/home/runner/work/_actions/actions/setup-go/v2/dist/index.js:4752:18)
    at Generator.next (<anonymous>)
    at /home/runner/work/_actions/actions/setup-go/v2/dist/index.js:4692:71
    at new Promise (<anonymous>)
    at module.exports.672.__awaiter (/home/runner/work/_actions/actions/setup-go/v2/dist/index.js:4688:12)
    at Object.mkdirP (/home/runner/work/_actions/actions/setup-go/v2/dist/index.js:4751:12)
    at Object.<anonymous> (/home/runner/work/_actions/actions/setup-go/v2/dist/index.js:204:22)
    at Generator.next (<anonymous>)
    at /home/runner/work/_actions/actions/setup-go/v2/dist/index.js:57:71
    at new Promise (<anonymous>)
(node:1581) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:1581) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
go version go1.7.6 linux/amd64

go env
  GOARCH="amd64"
  GOBIN=""
  GOEXE=""
  GOHOSTARCH="amd64"
  GOHOSTOS="linux"
  GOOS="linux"
  GOPATH=""
  GORACE=""
  GOROOT="/opt/hostedtoolcache/go/1.7.6/x64"
  GOTOOLDIR="/opt/hostedtoolcache/go/1.7.6/x64/pkg/tool/linux_amd64"
  CC="gcc"
  GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build709831434=/tmp/go-build -gno-record-gcc-switches"
  CXX="g++"
  CGO_ENABLED="1"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants