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 nil, not map[string]interface {} #4

Closed
gr2m opened this issue Jun 19, 2024 · 4 comments · Fixed by #5
Closed

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

gr2m opened this issue Jun 19, 2024 · 4 comments · Fixed by #5

Comments

@gr2m
Copy link

gr2m commented Jun 19, 2024

Hey 👋

I tried using your extension today, but unfortunately am getting this error:

gh pairing-with gr2m
panic: interface conversion: interface {} is nil, not map[string]interface {}

goroutine 1 [running]:
main.cli()
        github.com/schustafa/gh-pairing-with/main.go:105 +0x5b8
main.main()
        github.com/schustafa/gh-pairing-with/main.go:48 +0x7c

Let me know if there is anyway I can help to debug

@gr2m
Copy link
Author

gr2m commented Jun 19, 2024

Ohh it worked after running

gh auth refresh --scopes user:email,read:user

Yay!

Maybe the error message could be improved?

@schustafa
Copy link
Owner

Thanks for this report! The next release should be a bit more friendly when this comes up.

@gr2m
Copy link
Author

gr2m commented Jun 20, 2024

Maybe it would be worth checking the user's scopes? You can send a request to GET / and read out the x-oauth-scopes response header, that way you can fail with confidence and tell exactly what scopes are set for the current token and what scopes are missing

@schustafa
Copy link
Owner

Good thinking, @gr2m; I created #6 to remind me (or anybody!) to take a look at that.

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

Successfully merging a pull request may close this issue.

2 participants