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

Login/Register broken? #304

Closed
gerroon opened this issue Jan 21, 2019 · 19 comments

Comments

@gerroon
Copy link

commented Jan 21, 2019

HI

I just did docker compose, I open the page try to register with clock, it says invalid answer, it is not invalid I put the right time values there.

So I do text captcha, it pretends it does but when I try to login with the so called registered user name, nothing happens, after answering the captcha.

I do not get what is going here :( Is there a default admin that I can login and add myself?

I do not have a Google account so I cant use that.

Btw I do not care about Youtube account specific stuff, I just want to be able to customize the ui according to my login.

@knightfallx66

This comment has been minimized.

Copy link

commented Jan 21, 2019

I'm having this exact same issue with the latest build.

@sunnythaper

This comment has been minimized.

Copy link

commented Jan 21, 2019

Having the exact same issue as well. Also in my logs I keep seeing "Index out of bounds" over and over again. Not sure if the two are related.

@omarroth

This comment has been minimized.

Copy link
Owner

commented Jan 21, 2019

Issue appears to be the currently undocumented domain: option in config.yml.

When the domain is set, it makes sure that the login cookies issued by Invidious match that domain and any subdomains, so the problem is likely that the client does not send cookies on subsequent requests. The default is now in the config.yml with 5cb57fb.

There appear to potentially be multiple issues here. If changing domain does not fix the problem, I'd recommend opening a new issue.

@gerroon

This comment has been minimized.

Copy link
Author

commented Jan 21, 2019

I am not sure what am I supposed to do there. This is how the defaults are in the file

config.yml                                                                                                                                                                        buffers 
  video_threads: 0                                                                                                                                                                            
  crawl_threads: 0                                                                                                                                                                            
  channel_threads: 1                                                                                                                                                                          
  feed_threads: 1                                                                                                                                                                             
  db:                                                                                                                                                                                         
    user: kemal                                                                                                                                                                               
    password: kemal                                                                                                                                                                           
    host: localhost                                                                                                                                                                           
    port: 5432                                                                                                                                                                                
    dbname: invidious                                                                                                                                                                         
  full_refresh: false                                                                                                                                                                         
  https_only: false           


@omarroth

This comment has been minimized.

Copy link
Owner

commented Jan 21, 2019

Run git pull, then change domain: invidio.us to the domain of your instance. If it's running on localhost, you should be able to change domain to domain: $HOST.localdomain.

@gerroon

This comment has been minimized.

Copy link
Author

commented Jan 21, 2019

I used $HOST.localdomain and deleted the volume and the container, build it again and docker-compose up, it still does not work

Is there a default admin user that I can use to login?

And why am I filling a captcha to sign in ?


invidious_1  |   from lib/pg/src/pq/connection.cr:294:5 in 'expect_frame'
invidious_1  |   from lib/pg/src/pq/connection.cr:238:18 in 'connect'
invidious_1  |   from lib/pg/src/pg/connection.cr:14:9 in 'initialize'
invidious_1  |   from lib/pg/src/pg/connection.cr:7:5 in 'new'
invidious_1  |   from lib/pg/src/pg/driver.cr:3:5 in 'build_connection'
invidious_1  |   from lib/db/src/db/database.cr:51:16 in '->'
invidious_1  |   from lib/db/src/db/pool.cr:255:3 in 'build_resource'
invidious_1  |   from lib/db/src/db/pool.cr:17:34 in 'initialize'
invidious_1  |   from lib/db/src/db/pool.cr:15:5 in 'new:initial_pool_size:max_pool_size:max_idle_pool_size:checkout_timeout:retry_attempts:retry_delay'
invidious_1  |   from lib/db/src/db/database.cr:50:7 in 'initialize'
invidious_1  |   from lib/db/src/db/database.cr:43:5 in 'new'
invidious_1  |   from lib/db/src/db.cr:139:5 in 'build_database'
invidious_1  |   from lib/db/src/db.cr:103:5 in 'open'
invidious_1  |   from /usr/lib/crystal/gc/boehm.cr:121:23 in '~PG_DB:init'
invidious_1  |   from src/invidious.cr:0:1 in '__crystal_main'
invidious_1  |   from /usr/lib/crystal/crystal/main.cr:97:5 in 'main_user_code'
invidious_1  |   from /usr/lib/crystal/crystal/main.cr:86:7 in 'main'
invidious_1  |   from /usr/lib/crystal/crystal/main.cr:106:3 in 'main'
invidious_1  |   from __libc_start_main
invidious_1  |   from _start
invidious_1  |   from ???
invidious_1  | [development] Kemal is ready to lead at http://0.0.0.0:3000
invidious_1  | 2019-01-21 05:01:02 +00:00 200 GET / 4.99ms
invidious_1  | 2019-01-21 05:01:02 +00:00 200 GET /css/pure-min.css 3.12ms
invidious_1  | 2019-01-21 05:01:02 +00:00 200 GET /css/grids-responsive-min.css 453.0µs
invidious_1  | 2019-01-21 05:01:02 +00:00 200 GET /css/ionicons.min.css 1.44ms
invidious_1  | 2019-01-21 05:01:02 +00:00 200 GET /css/default.css 304.0µs
invidious_1  | 2019-01-21 05:01:02 +00:00 200 GET /css/lighttheme.css 435.0µs
invidious_1  | 2019-01-21 05:01:03 +00:00 200 GET /favicon-16x16.png 1.25ms
invidious_1  | 2019-01-21 05:01:04 +00:00 200 GET / 4.64ms
invidious_1  | 2019-01-21 05:01:04 +00:00 304 GET /css/pure-min.css 51.0µs
invidious_1  | 2019-01-21 05:01:04 +00:00 304 GET /css/grids-responsive-min.css 56.0µs
invidious_1  | 2019-01-21 05:01:04 +00:00 304 GET /css/ionicons.min.css 49.0µs
invidious_1  | 2019-01-21 05:01:04 +00:00 304 GET /css/default.css 49.0µs
invidious_1  | 2019-01-21 05:01:04 +00:00 304 GET /css/lighttheme.css 39.0µs
invidious_1  | 2019-01-21 05:01:04 +00:00 200 GET / 3.9ms
invidious_1  | 2019-01-21 05:01:04 +00:00 304 GET /css/pure-min.css 81.0µs
invidious_1  | 2019-01-21 05:01:04 +00:00 304 GET /css/grids-responsive-min.css 55.0µs
invidious_1  | 2019-01-21 05:01:04 +00:00 304 GET /css/ionicons.min.css 49.0µs
invidious_1  | 2019-01-21 05:01:04 +00:00 304 GET /css/default.css 46.0µs
invidious_1  | 2019-01-21 05:01:04 +00:00 304 GET /css/lighttheme.css 47.0µs
invidious_1  | 2019-01-21 05:01:05 +00:00 200 GET /login?referer=%2F 587.7ms
invidious_1  | 2019-01-21 05:01:10 +00:00 200 GET /login?referer=%2F&type=invidious&captcha=text 260.9ms
invidious_1  | REFRESH USER : relation "subscriptions_3813ab7a" does not exist
invidious_1  | 2019-01-21 05:01:20 +00:00 302 POST /login?referer=%2F&type=invidious 598.5ms
invidious_1  | 2019-01-21 05:01:21 +00:00 200 GET / 4.48ms
invidious_1  | 2019-01-21 05:01:23 +00:00 200 GET /login?referer=%2F 449.38ms
invidious_1  | 2019-01-21 05:01:28 +00:00 200 GET /login?referer=%2F&type=invidious&captcha=text 224.27ms
invidious_1  | 2019-01-21 05:01:36 +00:00 302 POST /login?referer=%2F&type=invidious 600.42ms
invidious_1  | 2019-01-21 05:01:36 +00:00 200 GET / 3.98ms
invidious_1  | 2019-01-21 05:02:19 +00:00 200 GET /login?referer=%2F 485.1ms
invidious_1  | 2019-01-21 05:03:27 +00:00 200 GET /login?referer=%2F&type=invidious&captcha=text 229.6ms
invidious_1  | 2019-01-21 05:04:00 +00:00 200 GET /login?referer=%2Flogin%3Freferer%3D%252F%26type%3Dinvidious%26captcha%3Dtext 492.72ms
invidious_1  | 2019-01-21 05:04:03 +00:00 200 GET /login?referer=%2F&type=invidious&captcha=text 221.71ms
invidious_1  | 2019-01-21 05:04:20 +00:00 302 POST /login?referer=%2F&type=invidious 611.14ms
invidious_1  | 2019-01-21 05:04:20 +00:00 200 GET / 3.91ms

@sunnythaper

This comment has been minimized.

Copy link

commented Jan 21, 2019

Funny, adding the domain to config.yml remoted the "Index out of bounds" issue for me but I am still unable to login.

Edit: should add that I am currently local only so I used my ip:port as the domain.

@omarroth

This comment has been minimized.

Copy link
Owner

commented Jan 21, 2019

You need to replace $HOST with the hostname of your machine. You can find it with uname -n.

Using ip:port as the domain will not work. The cookie will have domain=.ip:port; so your browser will likely not send it on subsequent requests.

@gerroon

This comment has been minimized.

Copy link
Author

commented Jan 21, 2019

I put the actual host name in the format you recommended still does not work.

I am done, thank you good luck. No further assistance is needed for me.

@gerroon gerroon closed this Jan 21, 2019
@knightfallx66

This comment has been minimized.

Copy link

commented Jan 21, 2019

Not sure why this was closed, I wouldn’t consider the issue to be resolved yet. I ran the latest version and added my domain name to the config with no success. Login/register still doesn’t seem to work for me. It looks like I’m not given a cookie at all.

@sunnythaper

This comment has been minimized.

Copy link

commented Jan 21, 2019

I changed mine to host.localdomain as suggested and still no luck. Luckily the "Inbox out of bounds" error hasn't returned tho.

@omarroth omarroth reopened this Jan 21, 2019
@knightfallx66

This comment has been minimized.

Copy link

commented Jan 21, 2019

Alright, so I cleared my cache/cookies and now I can register new users and log in as them, however I cannot with the existing ones.

@knightfallx66

This comment has been minimized.

Copy link

commented Jan 21, 2019

I deleted and rebuild the Postgres volume and now everything seems to be sorted out. Seems to have been a combination of having the wrong cookie and never being given a new one due to that.

@sunnythaper

This comment has been minimized.

Copy link

commented Jan 21, 2019

Hmm, swear I haven't done anything but now when I go to Login I get this message:

"Looks like you've found a bug in Invidious. Feel free to open a new issue here or send an email to omarroth@protonmail.com ."

@omarroth

This comment has been minimized.

Copy link
Owner

commented Jan 21, 2019

Is it showing any errors in the logs?

@sunnythaper

This comment has been minimized.

Copy link

commented Jan 21, 2019

@omarroth none. Additionally, the "Looks like you've found a bug...." message is gone and the login form has returned for me (I did a server reboot). I am back to trying to sign in using the form without success but also with zero error messages.

@omarroth

This comment has been minimized.

Copy link
Owner

commented Jan 23, 2019

You might hop on the Matrix server if you can. It should be a bit faster to debug the problem there.

You might check what cookies the server is giving you in devtools. If you're using Chrome you'll want to tick Preserve log so it isn't cleared on redirect. Firefox has a similar Persist Logs option.

@omarroth

This comment has been minimized.

Copy link
Owner

commented Feb 10, 2019

There hasn't been much conversation here so I'm going to close this. There's currently a section in the wiki for administrators which should help with any issues setting up or debugging common problems.

As mentioned, I'm happy to answer any questions on the Invidious Matrix server. Also please feel free to open a new issue.

@richierh

This comment has been minimized.

Copy link

commented Jun 25, 2019

Cannot Log in or Sign Up with google or new account , I feel sad to have this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.