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

[ERROR] interface conversion: interface {} is nil, not map[string]interface {} #14

Closed
alexandreteles opened this issue Jan 17, 2022 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@alexandreteles
Copy link

  • Version: git (source)
  • Built with: go, as in:
$ git clone https://github.com/ByteDream/crunchyroll-go
$ cd crunchyroll-go/cmd/crunchyroll-go/
$ go build -o crunchy
$ sudo cp crunchy /usr/local/bin
  • OS: Ubuntu 20.04

  • Go: go1.17.6 linux/arm64

  • Platform: ARM64

  • What happens:

When running `crunchy login user passwd the binary throws the error:

=> interface conversion: interface {} is nil, not map[string]interface {}

@bytedream
Copy link
Member

bytedream commented Jan 17, 2022

I do not own any 64 bit arm processor to check / reproduce this, but on armv8 and amd64 it works fine. Could you paste the full error output (since the error can have multiple causes)? To do this, use the -v flag while executing the command

@alexandreteles
Copy link
Author

alexandreteles commented Jan 24, 2022

Building from 1c42e52:

ubuntu@srv:~/crunchyroll-go/cmd/crunchyroll-go$ ./crunchy login user passwd -v
[debug] Executing `login` command with 2 arg(s)
[debug] Logging in via credentials
[err] interface conversion: interface {} is nil, not map[string]interface {}
[debug] goroutine 1 [running]:
runtime/debug.Stack()
        /usr/local/go/src/runtime/debug/stack.go:24 +0x88
github.com/ByteDream/crunchyroll-go/cmd/crunchyroll-go/cmd.Execute.func1()
        /home/ubuntu/crunchyroll-go/cmd/crunchyroll-go/cmd/root.go:57 +0x134
panic({0x3455a0, 0x40004d21e0})
        /usr/local/go/src/runtime/panic.go:1038 +0x224
github.com/ByteDream/crunchyroll-go.LoginWithCredentials({0xfffffca6b6a3, 0x12}, {0xfffffca6b6b6, 0x7}, {0x0, 0x0}, 0x655d20)
        /home/ubuntu/crunchyroll-go/crunchyroll.go:70 +0x5b8
github.com/ByteDream/crunchyroll-go/cmd/crunchyroll-go/cmd.loginCredentials({0xfffffca6b6a3, 0x12}, {0xfffffca6b6b6, 0x7})
        /home/ubuntu/crunchyroll-go/cmd/crunchyroll-go/cmd/login.go:34 +0xb8
github.com/ByteDream/crunchyroll-go/cmd/crunchyroll-go/cmd.glob..func2(0x650860, {0x40000a3110, 0x2, 0x3})
        /home/ubuntu/crunchyroll-go/cmd/crunchyroll-go/cmd/login.go:22 +0xac
github.com/spf13/cobra.(*Command).execute(0x650860, {0x40000a30e0, 0x3, 0x3})
        /home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:856 +0x678
github.com/spf13/cobra.(*Command).ExecuteC(0x650360)
        /home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:974 +0x424
github.com/spf13/cobra.(*Command).Execute(...)
        /home/ubuntu/go/pkg/mod/github.com/spf13/cobra@v1.2.1/command.go:902
github.com/ByteDream/crunchyroll-go/cmd/crunchyroll-go/cmd.Execute()
        /home/ubuntu/crunchyroll-go/cmd/crunchyroll-go/cmd/root.go:61 +0x60
main.main()
        /home/ubuntu/crunchyroll-go/cmd/crunchyroll-go/main.go:10 +0x20

It can be a pain for you to do so, but you can get an always free 4 cores + 24GB RAM ARM64 instance from Oracle Cloud for testing. I'm not sure how to properly debug this to provide more information as I've never touched any Go code, but let me know if there's anything else I could do to provide the necessary logs and such.

Thank you!

EDIT: the same error happens when trying to login using a session id.

@bytedream
Copy link
Member

Does the same thing happen if you use a pre-compiled binary from the release?

@alexandreteles
Copy link
Author

Those wouldn't work as they are built only against AMD64:

ubuntu@srv:~$ file crunchy-v1.2.4_linux
crunchy-v1.2.4_linux: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, Go BuildID=QjT9KUa6DUJV1H8hZgq5/PXtNnZ6zPCboolZhdHpn/k02lxOGr3YUIeLti9E3I/cZggxkeRffe-0fNrsEpT, stripped

I suppose I could run it using qemu, but the performance would suffer a fair bit. Is there any other information I could provide to help solve this bug?

@bytedream
Copy link
Member

bytedream commented Jan 27, 2022

Oh lol forgot that.
I cannot track down the error, the build works on all of my machines (multiple architectures). But as far as I can see, the error happens because a new session cannot be started. Could you execute curl https://api.crunchyroll.com/start_session.0.json?version=1.0&access_token=LNDJgOit5yaRIWN&device_type=com.crunchyroll.windows.desktop&device_id=Az2srGnChW65fuxYz2Xxl1GcZQgtGgI on the machine where the error happens and post the output here?
(this url is called from the program, so it might be the error source)

@zinkfrog
Copy link

zinkfrog commented Mar 7, 2022

I had the same error. I use a VPN. Changing my connection cleared the error for me.

@bytedream bytedream added bug Something isn't working help wanted Extra attention is needed cli labels Apr 12, 2022
@bytedream
Copy link
Member

Closing due inactivity and no further information provision

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

No branches or pull requests

3 participants