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

Unhandled error on login #21

Open
vlourme opened this issue Feb 22, 2020 · 3 comments
Open

Unhandled error on login #21

vlourme opened this issue Feb 22, 2020 · 3 comments
Labels

Comments

@vlourme
Copy link

vlourme commented Feb 22, 2020

Hi, I get this error which seems not handled and it causes a panic on the login method:

panic: runtime error: index out of range [0] with length 0

goroutine 8 [running]:
github.com/t3rm1n4l/go-mega.getMPI(0x1742e48, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/Users/vico/go/src/github.com/t3rm1n4l/go-mega/utils.go:195 +0x191
github.com/t3rm1n4l/go-mega.decryptSessionId(0x0, 0x0, 0x0, 0x0, 0xc003c53110, 0x10, 0x10, 0x0, 0x0, 0x0, ...)
	/Users/vico/go/src/github.com/t3rm1n4l/go-mega/utils.go:274 +0x15d
github.com/t3rm1n4l/go-mega.(*Mega).login(0xc0007aba40, 0xc004d59c20, 0x12, 0xc004d59c33, 0x8, 0x0, 0x0)
	/Users/vico/go/src/github.com/t3rm1n4l/go-mega/mega.go:574 +0x485
github.com/t3rm1n4l/go-mega.(*Mega).Login(0xc0007aba40, 0xc004d59c20, 0x12, 0xc004d59c33, 0x8, 0x0, 0xc0007aba40)
	/Users/vico/go/src/github.com/t3rm1n4l/go-mega/mega.go:588 +0x8c
@ncw
Copy link
Collaborator

ncw commented Feb 25, 2020

It looks like privk and csid are both empty when passed into decryptSessionId

We could put a test in for that and return an error but I don't think it would solve the problem.

How did you cause this error?

@ncw ncw added the bug label Feb 25, 2020
@vlourme
Copy link
Author

vlourme commented Feb 25, 2020

I got this error after connecting multiple times in a go routine (maybe this is caused threading?)

@ncw
Copy link
Collaborator

ncw commented Feb 26, 2020

Can you paste or show the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
@ncw @vlourme and others