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

Bug: "A user with that username already exists" with no registered users #440

Closed
narucx opened this issue Jul 4, 2023 · 3 comments · Fixed by #441
Closed

Bug: "A user with that username already exists" with no registered users #440

narucx opened this issue Jul 4, 2023 · 3 comments · Fixed by #441
Labels
bug Something isn't working

Comments

@narucx
Copy link

narucx commented Jul 4, 2023

What happened?

Version: 3.7.0 and 3.7.1

Trying to register via the register panel gets following errors:

  • on clicking continue after entering a name: "A user with that username already exists" + "POST https://x.x.x/api/user/check 403 (Forbidden)" in the console
  • in the docker logs of the zipline container: "info [server::response] POST /api/user/check -> 403"

I also get "GET https://x.x.x/api/user 401 (Unauthorized)" when loading the site

Version

latest (ghcr.io/diced/zipline or ghcr.io/diced/zipline:latest)

What browser(s) are you seeing the problem on?

Chromium-based (Chrome, Edge, Brave, Opera, mobile chrome/chromium based, etc)

Zipline Logs

2023-07-04 06:18:08,913 PM info  [database::migrations] establishing database connection
2023-07-04 06:18:08,914 PM info  [database::migrations] ensuring database exists, if not creating database - may error if no permissions
2023-07-04 06:18:09,735 PM info  [database::migrations] exiting migrations engine - database is up to date
2023-07-04 06:18:12,765 PM info  [server] listening on 0.0.0.0:3000
2023-07-04 06:18:12,765 PM info  [server] started production [email protected] server
2023-07-04 06:18:13,385 PM debug [server::invites] deleted 0 used invites
2023-07-04 06:18:13,387 PM debug [server] full size: 0
2023-07-04 06:18:13,406 PM debug [server] by user: []
2023-07-04 06:18:13,421 PM debug [server] count users: 2
2023-07-04 06:18:13,421 PM debug [server] count by user: []
2023-07-04 06:18:13,430 PM debug [server] count files: 0
2023-07-04 06:18:13,442 PM debug [server] sum views: {"_sum":{"views":null}}
2023-07-04 06:18:13,446 PM debug [server] types count: []
2023-07-04 06:18:13,447 PM debug [server] types count: []
2023-07-04 06:18:13,464 PM debug [server::stats] stats updated {"size":"0.0 B","size_num":0,"count":0,"count_by_user":[],"count_users":2,"views_count":0,"types_count":[]}
2023-07-04 06:18:26,804 PM info  [server::response] GET /auth/login?url=/dashboard -> 200
2023-07-04 06:18:26,804 PM debug [server::response] {"method":"GET","url":"/auth/login?url=/dashboard","headers":{"host":"x.x.x","x-real-ip":"x.x.x.x","x-forwarded-for":"x.x.x.x","x-forwarded-proto":"https","connection":"close","sec-ch-ua":"\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Brave\";v=\"114\"","sec-ch-ua-mobile":"?0","sec-ch-ua-platform":"\"Windows\"","dnt":"1","upgrade-insecure-requests":"1","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8","sec-gpc":"1","accept-language":"en-US,en;q=0.9","sec-fetch-site":"none","sec-fetch-mode":"navigate","sec-fetch-user":"?1","sec-fetch-dest":"document","accept-encoding":"gzip, deflate, br"}}
2023-07-04 06:18:26,966 PM info  [server::response] GET /api/user -> 401
2023-07-04 06:18:26,966 PM debug [server::response] {"method":"GET","url":"/api/user","headers":{"host":"x.x.x","x-real-ip":"x.x.x.x","x-forwarded-for":"x.x.x.x","x-forwarded-proto":"https","connection":"close","sec-ch-ua":"\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Brave\";v=\"114\"","dnt":"1","sec-ch-ua-mobile":"?0","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","sec-ch-ua-platform":"\"Windows\"","accept":"*/*","sec-gpc":"1","accept-language":"en-US,en;q=0.9","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","sec-fetch-dest":"empty","referer":"https://x.x.x/auth/login?url=/dashboard","accept-encoding":"gzip, deflate, br"}}
2023-07-04 06:18:33,927 PM debug [pages::register] request to access user registration, creating temporary invite {"id":13,"code":"XtcU","createdAt":"2023-07-04T18:18:33.921Z","expiresAt":null,"used":false,"createdById":1}
2023-07-04 06:18:35,859 PM info  [server::response] POST /api/user/check -> 403
2023-07-04 06:18:39,598 PM info  [server::response] POST /api/user/check -> 403
2023-07-04 06:18:40,500 PM info  [server::response] POST /api/user/check -> 403
2023-07-04 06:18:41,163 PM info  [server::response] POST /api/user/check -> 403

Browser Logs

GET https://x.x.x/api/user 401 (Unauthorized)
POST https://x.x.x/api/user/check 403 (Forbidden)

Additional Info

Tried the following things:

  • accessing via domain
  • accessing via ip
  • set cloudflare proxy status to: proxied
  • set cloudflare proxy status to: dns only
  • reinstalled
@narucx narucx added the bug Something isn't working label Jul 4, 2023
@github-actions github-actions bot added this to the 3.7.1 milestone Jul 4, 2023
@narucx
Copy link
Author

narucx commented Jul 7, 2023

image
temp fix: turned invites on and then it worked (shouldn't be like that)

@TacticalTechJay TacticalTechJay linked a pull request Jul 26, 2023 that will close this issue
diced pushed a commit that referenced this issue Jul 26, 2023
* fix: Compression setting works with the right files

* chore: clean up a debug log

* chore: add debug for why not webhook'd

* fix: No more temp invite when registering.

* fix: Add an error catch so server doesn't crash.

* chore: miniscule cleanup

* fix: Don't double fix dates. It was already fixed once.
@diced
Copy link
Owner

diced commented Jul 26, 2023

commit above should resolve this issue that was caused by an oversight :)

@parasiteoflife
Copy link

parasiteoflife commented May 24, 2024

I'm getting the same message but the server does return 400, no matter what I enter for the username I get "A user with that username already exists". I'm using it locally, no cloudflare.

Using an invite link doesn't trigger this, I can register with invite, without it I get the error.
I have these:

FEATURES_INVITES=true
FEATURES_USER_REGISTRATION=true

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

Successfully merging a pull request may close this issue.

3 participants