Update to new version of step failing


I’m trying to update the Xcode-test from 4.6 to 5.1 (latest) but it is failing with below error

Failed to prepare the step for execution through the required toolkit (go), error: failed to build Step in directory (/var/folders/s7/9pp86dfd0v1b4rs242qck3y00000gq/T/bitrise3044033435/step_src): command `/Users/ZeeshanKhan/.bitrise/toolkits/go/inst/go/bin/go "build" "-o" "/Users/ZeeshanKhan/.bitrise/toolkits/go/cache/https___github.com_bitrise-io_bitrise-steplib.git-xcode-test-4.7"` failed, output: # golang.org/x/sys/unix
vendor/golang.org/x/sys/unix/syscall.go:83:16: undefined: unsafe.Slice
vendor/golang.org/x/sys/unix/syscall_bsd.go:248:20: undefined: unsafe.Slice
vendor/golang.org/x/sys/unix/syscall_darwin.go:94:8: undefined: unsafe.Slice
vendor/golang.org/x/sys/unix/syscall_unix.go:118:7: undefined: unsafe.Slice
vendor/golang.org/x/sys/unix/sysvshm_unix.go:33:7: undefined: unsafe.Slice
# github.com/stretchr/testify/assert
vendor/github.com/stretchr/testify/assert/assertions.go:94:23: field.IsExported undefined (type reflect.StructField has no field or method IsExported)

Step GitHub link: GitHub - bitrise-steplib/steps-xcode-test: Xcode Test step

I found a similar issue reported here but it does not provide any solution for Bitrise CLI local builds.
Similar issue: Bitrise CLI fails in `npm install` step - bitrise go toolkit

Initially I updated the version from 4.0 to 4.6 and it worked properly but now it is failing to update to the latest version.

I tried below already but did not work either

  • Uninstalling bitrise CLI and then reinstalling but it did not help.
  • Deleting the cache from /Users/MacBook/.bitrise/toolkits/go/cache/
  • Deleting the /var/folders/s7/9pp86dfd0v1b4rs242qck3y00000gq/T/bitrise3044033435/step_src with all bitrise folder
  • I tried looking into the all .go files but I did not find anything solid to fix the issue.

It is working in the cloud though but that is not the solution I’m looking for.

Please let me know if there is a way to clear the cache.

Thank you

If I understand this right, it happens on local machine.
Can you check Golang version with go version and update to a recent version (1.20 or 1.21)?
See available releases here: All releases - The Go Programming Language. Golang is a requirement of Bitrise CLI at the moment.

Thanks for the reply.

I wonder how was working with version 4.6 and only failing with 4.7 and above.
Installing latest version of go helped and 5.1 started working.
Thank you