Description:
the command scw instance server-type list zone=fr-par-3 crashes on zone=fr-par-3 and pl-waw-1 with runtime error: invalid memory address or nil pointer dereference even if the json reponse is returned.
How to reproduce:
Run scw instance server-type list zone=fr-par-3
Command attempted
scw -D instance server-type list zone=fr-par-3
client: using request logger
client: using sdk version v1.0.0-beta.36.0.20260306130343-cfb58d20e951
client: using request logger
client: using sdk version v1.0.0-beta.36.0.20260306130343-cfb58d20e951
client: using request logger
client: using sdk version v1.0.0-beta.36.0.20260306130343-cfb58d20e951
creating GET request on https://api.scaleway.com/product-catalog/v2alpha1/public-catalog/products?page=1&product_types=instance&zone=fr-par-3
---------- Scaleway SDK REQUEST 1 (b8e10e00) : ----------
GET /product-catalog/v2alpha1/public-catalog/products?page=1&product_types=instance&zone=fr-par-3 HTTP/1.1
Host: api.scaleway.com
User-Agent: scaleway-sdk-go/v1.0.0-beta.36.0.20260306130343-cfb58d20e951 (go1.26.1; windows; amd64) scaleway-cli/2.53.0
X-Auth-Token: 3d54527c-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Accept-Encoding: gzip
---------------------------------------------------------
---------- Scaleway SDK RESPONSE 1 (b8e10e00) : ----------
HTTP/1.1 200 OK
Content-Length: 40203
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'
Content-Type: application/json
Date: Wed, 25 Mar 2026 10:14:05 GMT
Server: Scaleway API Gateway (fr-par-3;edge02)
Strict-Transport-Security: max-age=63072000
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Request-Id: 1c14e6d7-c9bc-490f-8500-07a9a1d3170d
{"products":[{"sku":"/compute/pop2_2c_8g/run_fr-par-3","service_category":"Compute","product_category":"Instance","product":"POP2-2C-8G","variant":"POP2-2C-8G - fr-par-3","description":"POP2-2C-8G - fr-par-3 (0.1103€ per hour)","locality":{"zone":"fr-par-3"},"price":{"retail_price":{"currency_code":"EUR","units":0,"nanos":110300000}},"properties":{"hardware":{"cpu":{"description":"AMD EPYC™ 7543 (2.8 GHz), x64, vCPUs: 2","arch":"x64","type":"AMD EPYC™ 7543 (2.8 GHz)","virtual":{"count":2},"threads":2},"ram":{"description":"8 GiB","size":8589934592,"type":""},"storage":{"description":"Block","total":0},"network":{"description":"Internal: 400 Mb/s,
....
Expected Behavior
No crash
Actual Behavior
Crashes when running scw instance server-type list zone=fr-par-3 with the error runtime error: invalid memory address or nil pointer dereference,
it works well with fr-par-1 and fr-par-2, also with non valid zone number 👍
$ scw instance server-type list zone=fr-par-4
Not Found
$ scw instance server-type list zone=fr-par-5
Unknown zone in path
More info
$ scw instance server-type list zone=fr-par-3
---------------------------------------------------------------------------------------
An error occurred, we are sorry, please consider opening a ticket on github using: 'scw feedback bug'
Give us as many details as possible so we can reproduce the error and fix it.
---------------------------------------------------------------------------------------
runtime error: invalid memory address or nil pointer dereference
stacktrace from panic:
goroutine 1 [running]:
runtime/debug.Stack()
/opt/hostedtoolcache/go/1.26.1/x64/src/runtime/debug/stack.go:26 +0x5e
main.cleanup(0x182207a8a00)
/home/runner/work/scaleway-cli/scaleway-cli/cmd/scw/main.go:44 +0xc5
panic({0x7ff75d089ea0?, 0x7ff75e8bbb50?})
/opt/hostedtoolcache/go/1.26.1/x64/src/runtime/panic.go:860 +0x13a
github.com/scaleway/scaleway-cli/v2/internal/namespaces/instance/v1.GetCommands.(*Command).Override.serverTypeListBuilder.func17({0x7ff75d522f78, 0x18220721740}, {0x7ff75cf33da0, 0x18220a4fd00})
/home/runner/work/scaleway-cli/scaleway-cli/internal/namespaces/instance/v1/custom_server_type.go:161 +0x683
github.com/scaleway/scaleway-cli/v2/core.run.func1({0x7ff75d522f78?, 0x18220721740?}, {0x7ff75cf33da0?, 0x18220a4fd00?})
/home/runner/work/scaleway-cli/scaleway-cli/core/cobra_utils.go:214 +0x32
github.com/scaleway/scaleway-cli/v2/core.sdkStdTypeInterceptor({0x7ff75d522f78, 0x18220721740}, {0x7ff75cf33da0?, 0x18220a4fd00?}, 0x18220a6b378?)
/home/runner/work/scaleway-cli/scaleway-cli/core/command_interceptor.go:150 +0x2f
github.com/scaleway/scaleway-cli/v2/core.run.CombineCommandInterceptor.func3.1({0x7ff75d522f78?, 0x18220721740?}, {0x0?, 0x0?})
/home/runner/work/scaleway-cli/scaleway-cli/core/command_interceptor.go:34 +0x2e
github.com/scaleway/scaleway-cli/v2/core.sdkStdErrorInterceptor({0x7ff75d522f78?, 0x18220721740?}, {0x7ff75cf33da0?, 0x18220a4fd00?}, 0x10?)
/home/runner/work/scaleway-cli/scaleway-cli/core/command_interceptor.go:49 +0x46
github.com/scaleway/scaleway-cli/v2/core.run.CombineCommandInterceptor.func3({0x7ff75d522f78, 0x18220721740}, {0x7ff75cf33da0, 0x18220a4fd00}, 0x182205cfab0)
/home/runner/work/scaleway-cli/scaleway-cli/core/command_interceptor.go:30 +0xb9
github.com/scaleway/scaleway-cli/v2/core.run({0x7ff75d522f78, 0x18220721740}, 0x182201ee308, 0x1822085cb00, {0x1822039fbd0, 0x1, 0x1})
/home/runner/work/scaleway-cli/scaleway-cli/core/cobra_utils.go:210 +0x3c4
github.com/scaleway/scaleway-cli/v2/core.(*cobraBuilder).hydrateCobra.cobraRun.func3(0x182201ee308, {0x1822039fbd0, 0x1, 0x1})
/home/runner/work/scaleway-cli/scaleway-cli/core/cobra_utils.go:61 +0x354
github.com/spf13/cobra.(*Command).execute(0x182201ee308, {0x1822039fb90, 0x1, 0x1})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1015 +0xb14
github.com/spf13/cobra.(*Command).ExecuteC(0x18220434908)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1148 +0x465
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.10.2/command.go:1071
github.com/scaleway/scaleway-cli/v2/core.Bootstrap(0x18220a6be58)
/home/runner/work/scaleway-cli/scaleway-cli/core/bootstrap.go:280 +0x125d
main.mainNoExit()
/home/runner/work/scaleway-cli/scaleway-cli/cmd/scw/main.go:86 +0x3da
main.main()
/home/runner/work/scaleway-cli/scaleway-cli/cmd/scw/main.go:67 +0x13
runtime error: invalid memory address or nil pointer dereference
$ scw instance server-type list zone=fr-par-4
Not Found
$ scw instance server-type list zone=fr-par-5
Unknown zone in path
Version
Version 2.53.0
BuildDate 2026-03-11T15:41:05Z
GoVersion go1.26.1
GitBranch HEAD
GitCommit f865d4c
GoArch amd64
GoOS windows
UserAgentPrefix scaleway-cli
Same behavior with the container image scaleway/cli:v2.53.0
Description:
the command
scw instance server-type list zone=fr-par-3crashes on zone=fr-par-3 and pl-waw-1 withruntime error: invalid memory address or nil pointer dereferenceeven if the json reponse is returned.How to reproduce:
Run
scw instance server-type list zone=fr-par-3Command attempted
Expected Behavior
No crash
Actual Behavior
Crashes when running
scw instance server-type list zone=fr-par-3with the errorruntime error: invalid memory address or nil pointer dereference,it works well with
fr-par-1andfr-par-2, also with non valid zone number 👍More info
Version
Version 2.53.0
BuildDate 2026-03-11T15:41:05Z
GoVersion go1.26.1
GitBranch HEAD
GitCommit f865d4c
GoArch amd64
GoOS windows
UserAgentPrefix scaleway-cli
Same behavior with the container image scaleway/cli:v2.53.0