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

Themekit Goroutine error #1019

Open
jobyjoseph opened this issue Nov 22, 2024 · 0 comments
Open

Themekit Goroutine error #1019

jobyjoseph opened this issue Nov 22, 2024 · 0 comments

Comments

@jobyjoseph
Copy link

Describe the bug

When running themekit, I am getting this error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x145c8f2]

goroutine 1 [running]:
github.com/Shopify/themekit/src/httpify.(*HTTPClient).doWithRetry(0xc0000868c0, 0xc0000e2300, 0x0, 0x0, 0x1, 0xc0000bb270, 0x0)
	/Users/andyw8/src/github.com/Shopify/themekit/src/httpify/client.go:130 +0x102
github.com/Shopify/themekit/src/httpify.(*HTTPClient).do(0xc0000868c0, 0x1577561, 0x3, 0x1579839, 0xa, 0x0, 0x0, 0x0, 0x0, 0xc000028eaf, ...)
	/Users/andyw8/src/github.com/Shopify/themekit/src/httpify/client.go:105 +0x5d1
github.com/Shopify/themekit/src/httpify.(*HTTPClient).Get(0xc0000868c0, 0x1579839, 0xa, 0x0, 0x3c, 0x19dd860, 0xd)
	/Users/andyw8/src/github.com/Shopify/themekit/src/httpify/client.go:70 +0x6d
github.com/Shopify/themekit/src/shopify.Client.GetShop(0xc00002c072, 0xc, 0xc00018a2c0, 0x3c, 0x19dd860, 0xd, 0xd, 0xc0000bb210, 0x1, 0x1, ...)
	/Users/andyw8/src/github.com/Shopify/themekit/src/shopify/theme_client.go:128 +0x88
github.com/Shopify/themekit/src/cmdutil.createCtx(0x159c400, 0xc000082360, 0x0, 0x0, 0xc000027392, 0x26, 0xc00002c072, 0xc, 0xc000028eaf, 0x19, ...)
	/Users/andyw8/src/github.com/Shopify/themekit/src/cmdutil/util.go:96 +0xec
github.com/Shopify/themekit/src/cmdutil.generateContexts(0x159c400, 0xc000114680, 0xc000164500, 0x3a, 0x0, 0x0, 0xc000110ad0, 0x1, 0x1, 0x205f80277, ...)
	/Users/andyw8/src/github.com/Shopify/themekit/src/cmdutil/util.go:218 +0x495
github.com/Shopify/themekit/src/cmdutil.forEachClient(0x159c400, 0xc000164500, 0x3a, 0x0, 0x0, 0xc000110ad0, 0x1, 0x1, 0x205f80277, 0xb, ...)
	/Users/andyw8/src/github.com/Shopify/themekit/src/cmdutil/util.go:281 +0xed
github.com/Shopify/themekit/src/cmdutil.ForEachClient(...)
	/Users/andyw8/src/github.com/Shopify/themekit/src/cmdutil/util.go:276
github.com/Shopify/themekit/cmd.glob..func2(0x19d7700, 0xc0001092b0, 0x0, 0xd, 0x0, 0x0)
	/Users/andyw8/src/github.com/Shopify/themekit/cmd/deploy.go:49 +0xe0
github.com/spf13/cobra.(*Command).execute(0x19d7700, 0xc000109110, 0xd, 0xd, 0x19d7700, 0xc000109110)
	/Users/andyw8/go/pkg/mod/github.com/spf13/[email protected]/command.go:762 +0x465
github.com/spf13/cobra.(*Command).ExecuteC(0x19d6b20, 0x13, 0x0, 0x0)
	/Users/andyw8/go/pkg/mod/github.com/spf13/[email protected]/command.go:852 +0x2ec
github.com/spf13/cobra.(*Command).Execute(...)
	/Users/andyw8/go/pkg/mod/github.com/spf13/[email protected]/command.go:800
main.main()
	/Users/andyw8/src/github.com/Shopify/themekit/cmd/theme/main.go:29 +0x61

(Use `node --trace-uncaught ...` to show where the exception was thrown)
error Command failed with exit code 1.                                         
error Command failed with exit code 1.  

To Reproduce

Not sure. Things were working smoothly. All of a sudden, I started seeing the error. Since it is client code, I cannot share the exact code.

Expected behavior

Shopify theme needs to connect to the server and enable preview.

Environment

Information Value
OS version Sonoma 14.5
Themekit version 1.1.6
Editor VS Code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant