NewsBlur icon indicating copy to clipboard operation
NewsBlur copied to clipboard

can't login

Open luxiouronimo opened this issue 3 years ago • 3 comments

heya i can't login to my newsblur (macos) docker instance.

from the (not logged-in) homepage, i click 'sign in' or 'sign up or log in', enter either a username or email and password, click the 'log in' button, and the (not logged-in) homepage merely refreshes; no indication the credentials were incorrect or anything.

luxiouronimo avatar Jul 08 '22 00:07 luxiouronimo

doing a docker logs -n 20 newsblur_web shows the following:

[Jul 12 03:54:20] ---> [Safari] [0.03s] [AnonymousUser] Loading welcome [Jul 12 03:54:57] ---> [------] [dLux*] Login [Jul 12 03:54:57] ---> [Safari] [0.02s] [AnonymousUser] Loading welcome

luxiouronimo avatar Jul 12 '22 03:07 luxiouronimo

I'd guess that you updated the containers (make nb) somewhere about that time? I had something similar & ended up resetting the whole install (which was a bit nuclear, but has proved to be useful). There are changes (Standard/Premium/Premium+ accounts) which I suspect have a role. Backups are a good thing :) (Sorry, it's not much of a fix, but could be a good time to reclone the git & future proof the install for a while)

Linecutterx avatar Aug 03 '22 22:08 Linecutterx

noep this is not a new problem; it's been a problem since i first got newsblur working.. in the beginning i had to append a folder or something to the url for a login to work, but that isn't working now..

i've been steadily logged in since then, but haven't been able to login from another browser or another device.

luxiouronimo avatar Aug 04 '22 00:08 luxiouronimo

ok i had to take my main computer in for repairs, and am bummed w/o my newsblur..

how would i go about restoring a backup on a fresh git clone? or are you suggesting i start completely fresh...? one of the main features i'm using newsblur for is the search functionality and i'd like to not lose the historical articles in there..

luxiouronimo avatar Aug 28 '22 21:08 luxiouronimo

You shouldn't have to delete everything, esp. not the database. Can you show the output of make nb? I'm curious as to why it isn't working, but I bet it's simply a configuration issue. You're accessing your local NewsBlur at https://localhost, right?

samuelclay avatar Aug 30 '22 20:08 samuelclay

  • i run newsblur docker on macOS (late 2012 mac mini)
  • i have a reverse proxy in front of it (ubuntu vm/apache) for easier access (via domain name) within my lan
  • same results (login merely refreshes) when accessing newsblur at the ip directly and the reverse proxy/domain name

wow, i just tried accessing localhost, and the login works there..

before i took my main computer in for repairs, i could not login (via ip or domain name/reverse proxy) in any browser beyond the one browser that was already logged in, and i haven't been able to access newsblur from iPhone or iPad (either with safari or the native app)..

make nb appears to go off without a hitch..:

mm26:NewsBlur dlux$ make nb
docker pull newsblur/newsblur_python3
Using default tag: latest
latest: Pulling from newsblur/newsblur_python3
461246efe0a7: Pull complete
e37ebf440f7f: Pull complete
d5b2724fe69a: Pull complete
7965a1bc9673: Pull complete
203fb75034a0: Pull complete
2a0e80bac787: Pull complete
aa24e1004fdb: Pull complete
f3d983fb39e6: Pull complete
cf4fc887ae44: Pull complete
6f2f3bf80c1f: Pull complete
4f4fb700ef54: Pull complete
7b97316b05ea: Pull complete
Digest: sha256:b15f208f82af7a6f8edebb4b32846dfcb47fb0d033235242937776e370d7ff48
Status: Downloaded newer image for newsblur/newsblur_python3:latest
docker.io/newsblur/newsblur_python3:latest
docker pull newsblur/newsblur_node
Using default tag: latest
latest: Pulling from newsblur/newsblur_node
Digest: sha256:307471b66f895bb24ad924322b0c8cf0f6afa908fcee380aa5489615a2ad1859
Status: Image is up to date for newsblur/newsblur_node:latest
docker.io/newsblur/newsblur_node:latest
docker pull newsblur/newsblur_monitor
Using default tag: latest
latest: Pulling from newsblur/newsblur_monitor
Digest: sha256:273c3bb3f3b7afab9a5f1addd7539bb62c387b2a36c35ad2d65942f449134be9
Status: Image is up to date for newsblur/newsblur_monitor:latest
docker.io/newsblur/newsblur_monitor:latest
RUNWITHMAKEBUILD=True CURRENT_UID=501 CURRENT_GID=20 docker compose down
[+] Running 11/11
 ⠿ Container haproxy           Removed                                                                                          3.3s
 ⠿ Container task_celery       Removed                                                                                          3.6s
 ⠿ Container imageproxy        Removed                                                                                          0.5s
 ⠿ Container nginx             Removed                                                                                          0.5s
 ⠿ Container node              Removed                                                                                         10.9s
 ⠿ Container newsblur_web      Removed                                                                                         10.8s
 ⠿ Container db_elasticsearch  Removed                                                                                          2.2s
 ⠿ Container db_mongo          Removed                                                                                          1.0s
 ⠿ Container db_postgres       Removed                                                                                          0.9s
 ⠿ Container db_redis          Removed                                                                                          0.9s
 ⠿ Network newsblur_default    Removed                                                                                          0.1s
[[ -d config/certificates ]] && echo "keys exist" || make keys
keys exist
RUNWITHMAKEBUILD=True CURRENT_UID=501 CURRENT_GID=20 docker compose up -d --build --remove-orphans
[+] Running 11/11
 ⠿ Network newsblur_default    Created                                                                                          0.1s
 ⠿ Container imageproxy        Started                                                                                          2.0s
 ⠿ Container db_postgres       Started                                                                                          2.0s
 ⠿ Container db_redis          Started                                                                                          1.9s
 ⠿ Container db_mongo          Started                                                                                          2.0s
 ⠿ Container db_elasticsearch  Started                                                                                          1.7s
 ⠿ Container task_celery       Started                                                                                          1.4s
 ⠿ Container newsblur_web      Started                                                                                          3.1s
 ⠿ Container node              Started                                                                                          3.1s
 ⠿ Container nginx             Started                                                                                          4.2s
 ⠿ Container haproxy           Started                                                                                          5.6s
docker exec -it newsblur_web ./manage.py migrate
 ---> Starting NewsBlur development server...
Operations to perform:
  Apply all migrations: admin, analyzer, auth, contenttypes, django_ses, feed_import, ipn, oauth2_provider, profile, push, reader, recommendations, rss_feeds, sessions, sites, social, zebra
Running migrations:
  No migrations to apply.
docker exec newsblur_web ./manage.py loaddata config/fixtures/bootstrap.json
 ---> Starting NewsBlur development server...
Installed 8 object(s) from 1 fixture(s)
rm -fr static
docker pull newsblur/newsblur_deploy
Using default tag: latest
latest: Pulling from newsblur/newsblur_deploy
461246efe0a7: Already exists
e37ebf440f7f: Already exists
d5b2724fe69a: Already exists
7965a1bc9673: Already exists
203fb75034a0: Already exists
2a0e80bac787: Already exists
aa24e1004fdb: Already exists
f3d983fb39e6: Already exists
cf4fc887ae44: Already exists
6f2f3bf80c1f: Already exists
4f4fb700ef54: Pull complete
7b97316b05ea: Already exists
f2251e09d718: Pull complete
fa167bd1da12: Pull complete
f486d2c5c1bb: Pull complete
454223408637: Pull complete
22cbd91efe6b: Pull complete
0a72ecb94628: Pull complete
c168fc25183d: Pull complete
cb1d610fdc86: Pull complete
69dba8591407: Pull complete
9491ad5edaa1: Pull complete
Digest: sha256:56cfe6cddd00ea61ba43dc52605b2d3a441cd5c103d8a4bca5767b57066a86ec
Status: Downloaded newer image for newsblur/newsblur_deploy:latest
docker.io/newsblur/newsblur_deploy:latest
docker run --rm -v /Users/dlux/NewsBlur:/srv/newsblur newsblur/newsblur_deploy
 ---> Starting NewsBlur development server...

476 static files symlinked to '/srv/newsblur/static', 564 post-processed.
mm26:NewsBlur dlux$

luxiouronimo avatar Aug 30 '22 21:08 luxiouronimo

it should be noted that i have the following changes:

apps/reader/views.py:

  • ALLOWED_SUBDOMAINS contains 'news'

newsblur_web/docker_local_settings.py:

  • i am listed in ADMINS
  • my domain (news.blah.blah.blah) is specified in the following -- SERVER_EMAIL -- HELLO_EMAIL -- NEWSBLUR_URL -- PUSH_DOMAIN -- SESSION_COOKIE_DOMAIN

these are the only changes i implement after a git pull

luxiouronimo avatar Aug 30 '22 22:08 luxiouronimo

Have you checked the readne (https://github.com/samuelclay/NewsBlur) for setting custom domains.

(& maybe used my script 😃 - it's mentioned there too)?

Linecutterx avatar Aug 31 '22 05:08 Linecutterx

ooo wow u have done much work here since i last looked at it. i ran the script and now it loads via domain name/reverse proxy, and even on iOS; i have much to explore on iOS as this is the first time that's ever worked =D

in the past, with every git (stash, and) pull, i'd manually compare apps/reader/views.py and newsblur_web/docker_local_settings.py.. moving forward, what exactly is necessary?

  1. git stash; git pull
  2. run the custom domain script
  3. add subdomain ('news') to ALLOWED_SUBDOMAINS in apps/reader/views.py
  4. rejoice(?)

any chance you can update the custom domain script to add the subdomain to views.py/ALLOWED_SUBDOMAINS? or perhaps u could add 'news' to the default..?

luxiouronimo avatar Aug 31 '22 06:08 luxiouronimo

Adding news as a subdomain would redirect news.newsblur.com to the homepage, which I think would be fine.

Based on the above, I'm wondering if this is the line in the README that would have applied:

You can also confirm that there is a domain name mismatch in the database by running make shell & typing Site.objects.all()[0] to show the domain that NewsBlur is expecting.

samuelclay avatar Aug 31 '22 21:08 samuelclay

You shouldn't have to reapply everything manually if you commit your changes (git commit -am "Adding news to subdomains"). Then you would only have to do a git pull; make nb.

samuelclay avatar Aug 31 '22 21:08 samuelclay