Kavita
Kavita copied to clipboard
BUG - Unable to create User accounts
Describe the bug Further to full reset of Kavita (deletion of existing containers, including database) & update towards 0.5.4.0, user account creation returns an error 400.
Bogus email is used, no link provided.
To Reproduce Steps to reproduce the behavior:
- Go to Admin Dashboard
- Click on Invite
- Write E-mail [random letters]
- Select Roles: Download; Libraries All
- Click Invite
Expected behavior Link provided to create account without sending registration e-mail
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: OMV 5.6.26-1(Usul) / Docker 5:20.10.17~3-0~debian-buster / Portainer 2.14.0
- Browser Chrome
- Version 0.5.4.0
Additional context _kavita-kavita-1_logs (1).txt error400
I think you were the user from discord support, but I will double confirm there are no edge cases in our flow where the link doesn't show.
Yes indeed, that was me.
An additional info: I noted that if I cancel the process while it's trying to generate a link, a pending invite is created. There's however no way to obtain a new link from this pending invite.
There is a way actually. You should go to Admin Dashboard -> System -> Actions -> Download logs. Open latest log and find link by searching for e-mail you have tried to send invitation to. However this link doesn't allow to register new user. No matter what you write into forms User, Email, Password - you will get a error
400
The email does not match the registered email
even if it does. So at this moment there is no way to add new user without setting up email server. Sad...
@Entmatix that is not correct. Per my system, you can create a user by going through invite user flow. In all cases a link should appear in logs and on screen. The admin can click the link and continue the registration process.
Hence why there is a ticket to investigate inconsistencies in some users systems.
Update:
I could create an account in the following way:
- Create account with [random name] as the e-mail
- Get into the logs to retrieve the invitation e-mail
- Proceed with account creation with a pseudo different than [random name]
I could reproduce the process a couple of times, but it also failed a couple of times with the error 400 mentioned by Entmatix. As far as I could see, the variable seems to be how quick I cancel the invite (before error message is shown). If the error is showing, I cannot use the link, if it's before that, it seems to work.
Thanks for the tip @Eikfo. I created a user while error message had not appeared. Still it's just a workaround. Would be nice to have a fix for that.
See I'm not able to reproduce. I just tested on my local and dev server and everything is working correctly.
Steps:
- Invite User
- Type email (valid or not)
- Select at least one library
- Press Invite and wait
- This screen pops up. I can then use the link or the url to finish setup.
Are you guys doing anything different? Can someone please clear their logs, do the flow, then upload via (System -> Task -> Download Logs) in the UI their logs?
The logs attached are copy/pasted and not having anything important in them.
@majora2007, hope it will help.
Log - https://0x0.st/o1IJ.log Quick demo - https://0x0.st/o1Iy.mov
The mov was not available, but @Entmatix are you on the nightly by any chance? I implemented some code to help streamline this process and wondered if it would fix your issue (or at least be a solid workaround)?
https://github.com/Kareadita/Kavita/pull/1381
@majora2007 , I'm on latest image from hub.docker.com.
Sorry, I don't use public clouds or video platforms. Try this one - https://file.io/VvOyYqJJaX3k
Thanks for quick fix. I'll try it a bit later if it will be available in docker.
Okay interesting, it doesn't ever finish. I wonder what could be happening. Can you help enlighten me on the url you're accessing kavita on? Is it publicly available and hence would Kavita be trying to send an email?
Latest is stable, so you wont get this fix for some time. This is def not fixed by the current change, so I need more information. The logs don't actually show anything out of the ordinary.
@majora2007, here are the logs after:
- deleting previous logs & restarting container
- Creating user with all roles, letting run to error
- Creating user with no roles, letting run to error
- Creating user with download role, cancellation & account creation from link retrieved in the logs.
kavita_logs_07_17_2022 (1).zip
I followed the same process as what was in the movie of Entmatix, but I didn't bother with an "@bogusdomain.something" on the fake email.
@majora2007, the url is not publicly available. My scheme is:
public domain -> private ip (home lan) -> reverse proxy (nginx-proxy-manager) -> docker container
Kavita's container is able to connect anything outside including anything outside my lan.
root@nas:/kavita# dig github.com +short
140.82.121.3
root@nas:/kavita# ping github.com -c 4
PING github.com (140.82.121.4) 56(84) bytes of data.
64 bytes from lb-140-82-121-4-fra.github.com (140.82.121.4): icmp_seq=1 ttl=54 time=52.3 ms
64 bytes from lb-140-82-121-4-fra.github.com (140.82.121.4): icmp_seq=2 ttl=54 time=53.0 ms
64 bytes from lb-140-82-121-4-fra.github.com (140.82.121.4): icmp_seq=3 ttl=54 time=52.3 ms
64 bytes from lb-140-82-121-4-fra.github.com (140.82.121.4): icmp_seq=4 ttl=54 time=52.2 ms
--- github.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 52.163/52.451/53.040/0.345 ms
The above commands were executed from inside of the container.
UPD. A bit more information about url. Here how it looks like:
kavita.mydomain.xyz -> 10.33.0.2 (nas ip) -> nginx-proxy-manager -> 10.33.0.2:62002 -> docker container with published port 62002:5000
@Entmatix sorry for taking so long, can you try pinging our email service from your container?
GET https://email.kavitareader.com/api/email/test
you should get a true/false back
I'm thinking maybe there is some double NAT stuff going on and maybe and edge case is being triggered, that I can't reproduce as I have a simple reverse proxy -> kavita situation.
@majora2007
docker exec -i kavita curl https://email.kavitareader.com/api/email/test
true
docker exec -i kavita ping -c 4 email.kavitareader.com
PING email.kavitareader.com (188.114.96.0) 56(84) bytes of data.
64 bytes from 188.114.96.0 (188.114.96.0): icmp_seq=1 ttl=54 time=47.9 ms
64 bytes from 188.114.96.0 (188.114.96.0): icmp_seq=2 ttl=54 time=48.0 ms
64 bytes from 188.114.96.0 (188.114.96.0): icmp_seq=3 ttl=54 time=50.8 ms
64 bytes from 188.114.96.0 (188.114.96.0): icmp_seq=4 ttl=54 time=48.3 ms
--- email.kavitareader.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 47.899/48.738/50.760/1.173 ms
I haven't forgotten about this issue, just not sure how to proceed.
@majora2007 I'd like to help. If you need any info, ask me. I'm not an expert neither in docker nor programming, but I can perform user tests and share results.
I just confirmed with a user that was facing similar issues and the fixes I put in nightly fixed it for them. The next stable is about to release, so I would suggest trying on that (v0.5.5) and letting me know.
@majora2007 good to know, thanks!
Hi All, with v0.5.5 out, can you please let me know if this solved it for you?
Joining the conversation late, but I'm experiencing this issue on docker from 0.5.5.1
Same steps taken as listed above by other users
This issue is very elusive, I'm not sure I'll be able to fix alone. I may need to have a call with one of you and have you setup the actual dev environment to find the underlying issue and debug it via discord call. If any of you is interested, please let me know.
Hi I just tried the first time to use Kavita on my Synology under Docker and I have the exact same issue like it is described here. So I attach myself also to this discussion here
Additional Info: I changed the config so that it passes trough my reverse proxy and is accessible from the internet instead of only locally and with that I can invite someone.
I attempted rolling back versions going as far as 0.5.2 but was still experiencing the same issue (following the same steps: 1. Invite user through the UI, 2. Download logs to get the latest invite token link 3. Provide username email and Password on registration link page 4. Receive error). I wonder if this may be specific to our configurations some how.
I'm also experiencing this issue on Kavita version 0.5.5.1 Setup = Proxmox VE 7.2-3 -> Ubuntu Server 20.04 LTS (VM) -> Docker 20.10.17 -> Kavita 0.5.5.1
@majora2007 , thanks for new release, but unfortunately bug still exists in 0.5.5.1.
Hi guys, I have an auth rework planned in v0.5.7. I'm going to move this issue there. The offer still stands if anyone can run the dev build (via VS or Rider) and hop on a call with me, I will prioritize this bug. But it's been me testing over and over trying to reproduce and not having much luck.
Is anyone here on the nightly releases? I think I found a way to nail this issue down, but need some tester. Please let me know and if so, I will package a build out.
Just confirmed with a user in same boat that the root cause is correct and we were able to move ahead. For users with this issue, you will be able to invite users, but the email service might not work due to unique network connections. This will be fixed in v0.5.6 (which is coming next weekish)
Hello, I just pulled from the docker nightly release located at https://hub.docker.com/r/kizaing/kavita/tags
When creating a new instance of Kavita and inviting a new user, The email service does not work, nor does the link from the docker logs to register the account.
Upon attempted registration, i receive the error "The email does not match the registered email" despite having not changed the 'email' field on the registration form from the autofilled email address.
Does the docker nightly not reflect changes made here?