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

panic: interface conversion: interface {} is string, not map[string]interface {} #19

Open
gummy789j opened this issue Feb 26, 2024 · 1 comment

Comments

@gummy789j
Copy link

Anyone encounter the problem like this ?

anchor-go --src=./internal/wrapper/solanaclient/.json-instruction/drift_v2.json  --dst=./internal/wrapper/solanaclient/generated
[+] Generating client from IDL: ./internal/wrapper/solanaclient/.json-instruction/drift_v2.json
panic: interface conversion: interface {} is string, not map[string]interface {}

goroutine 1 [running]:
main.(*IdlEnumFields).UnmarshalJSON(0x1400049b810, {0x1400035c666, 0x22, 0x1379a})
        /Users/steven/go/pkg/mod/github.com/gagliardetto/[email protected]/idl.go:472 +0x21c
encoding/json.(*decodeState).array(0x1400014f568, {0x10104d660?, 0x14000456f28?, 0x137bf?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:507 +0x3ec
encoding/json.(*decodeState).value(0x1400014f568, {0x10104d660?, 0x14000456f28?, 0x6?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:364 +0x70
encoding/json.(*decodeState).object(0x1400014f568, {0x101087fc0?, 0x14000456f00?, 0x100b34a04?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:775 +0xb34
encoding/json.(*decodeState).value(0x1400014f568, {0x101087fc0?, 0x14000456f00?, 0x1?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:374 +0x40
encoding/json.(*decodeState).array(0x1400014f568, {0x1010602a0?, 0x140004770a8?, 0x137fd?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:562 +0x588
encoding/json.(*decodeState).value(0x1400014f568, {0x1010602a0?, 0x140004770a8?, 0x8?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:364 +0x70
encoding/json.(*decodeState).object(0x1400014f568, {0x1010882c0?, 0x14000477090?, 0x1382e?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:775 +0xb34
encoding/json.(*decodeState).value(0x1400014f568, {0x1010882c0?, 0x14000477090?, 0x4?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:374 +0x40
encoding/json.(*decodeState).object(0x1400014f568, {0x1010795a0?, 0x14000477080?, 0x100b34a04?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:775 +0xb34
encoding/json.(*decodeState).value(0x1400014f568, {0x1010795a0?, 0x14000477080?, 0x1b?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:374 +0x40
encoding/json.(*decodeState).array(0x1400014f568, {0x101052a00?, 0x1400024c230?, 0x3fddd?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:562 +0x588
encoding/json.(*decodeState).value(0x1400014f568, {0x101052a00?, 0x1400024c230?, 0x5?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:364 +0x70
encoding/json.(*decodeState).object(0x1400014f568, {0x10104d600?, 0x1400024c1c0?, 0x100b44edc?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:775 +0xb34
encoding/json.(*decodeState).value(0x1400014f568, {0x10104d600?, 0x1400024c1c0?, 0x100b44b90?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:374 +0x40
encoding/json.(*decodeState).unmarshal(0x1400014f568, {0x10104d600?, 0x1400024c1c0?})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/decode.go:181 +0x184
encoding/json.(*Decoder).Decode(0x1400014f540, {0x10104d600, 0x1400024c1c0})
        /opt/homebrew/Cellar/[email protected]/1.20.10/libexec/src/encoding/json/stream.go:73 +0x130
main.main()
        /Users/steven/go/pkg/mod/github.com/gagliardetto/[email protected]/main.go:100 +0x754
@SC4RECOIN
Copy link

saaaame

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

2 participants