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 []uint8, not int64 #2349
Comments
I am seeing this same issue adding any type of external authentication. |
Thanks your feedback! But I can't reproduce this locally, can you provide more details on steps? |
@xiegeo mysql 5.5.46 |
Here's a way to reproduce this using docker. Install from docker official debian:latest with port 3000 exposed if needed, so you can access it from your host machine enter that container's shell and run:
Now browse that address (for me it was localhost:3000) install as usual (I disabled self-registration and created an user), mysql password is change_me go to /admin/auths add a new source, eg pam with some dummy data as soon as you click add, panic will occur |
Thanks @Ingramz , not talking adding PAM first, the way you compile Gogs does not support PAM anyway... |
@unknwon I did it like that on purpose, because the issue isn't related to PAM directly. |
@Ingramz does add a dummy LDAP auth source panic too? |
@unknwon yes. Adding any auth source does that. |
OK... can you dump the database table |
Added LDAP this time.
|
Thanks. Suppose you're using the it would be very helpful if you can add a line right after this line: fmt.Println(*val) Then recompile and restart Gogs. |
I'm getting |
Thanks. Though I don't know why it gets |
Also |
OK... seems to be a bigger problem. What if you use compiled binary (not compile by yourself)? |
originally I tried packages from https://packager.io/gh/pkgr/gogs, these had the same problem. |
By |
|
Hi @Ingramz , can you help test |
@unknwon I tried and that won't work for 2 reasons. Any idea as to why it gives a different type for different systems on that interface, perhaps an issue with ORM? |
Actually I don't know why MySQL driver could return different type in different system... I believe it supposed to be in a unified format. Yeah, maybe it's ORM's problem. |
Just pushed another fix to |
@unknwon now seems to be working. I added also a trace for |
@Ingramz great... quite hard to trace the original bug location. |
Only difference I can see is that in stack trace. https://www.diffchecker.com/ldcgb7fr - this is what is done differently. I have very little experience with go and xorm, so I'll just leave it here. The current solution is good enough to work around the problem. |
Very helpful! I think the driver may behave differently for |
Close as fixed. |
this is redis process data error , get key is interface type but your process is []int8 case |
After adding PAM as an authentication method, I am immediately greeted with a blank page and following panic.
Installed from source with pam tag using this guide. Using Debian 8 if that matters.
The text was updated successfully, but these errors were encountered: