sekai-soft / guide-nitter-self-hosting

A guide for self-hosting a Nitter instance
MIT License
124 stars 8 forks source link

Auth failure with docker-compose example #21

Open pypeaday opened 11 hours ago

pypeaday commented 11 hours ago

I'm working on setting up self-hosted nitter so that I can use ArchiveBox to archive tweets

I've copied the docker-compose with one change that I think should be irrelevant to the functionality (I am a fairly experienced containers user for what that's worth)

Here's my compose

name: nitter-only

services:
  nitter:
    image: ghcr.io/sekai-soft/nitter-self-contained
    container_name: nitter
    ports:
      - "8095:8080"  # changed this bit due to existing workloads
    volumes:
      - nitter-data:/nitter-data
    depends_on:
      nitter-redis:
        condition: service_healthy
    environment:
      - NITTER_ACCOUNTS_FILE=/nitter-data/guest_accounts.json
      - DISABLE_REDIS=1
      - REDIS_HOST=nitter-redis
    env_file:
      - .env
    restart: unless-stopped
    healthcheck:
      test: wget -nv --tries=1 --spider http://127.0.0.1:8080 || exit 1
      interval: 5s
      timeout: 5s
      retries: 12
  nitter-redis:
    image: redis:6-alpine
    container_name: redis
    command: redis-server --save 60 1 --loglevel warning
    volumes:
      - nitter-redis:/data
    restart: unless-stopped
    healthcheck:
      test: redis-cli ping
      interval: 5s
      timeout: 5s
      retries: 12
volumes:
  nitter-data:
  nitter-redis:

And then my env file

DEBUG=1
TWITTER_USERNAME=aMyBurner
TWITTER_PASSWORD=TheCorrectPasswordThatIHaveVerifiedSeveralTimes

INSTANCE_RSS_PASSWORD=madethisup
INSTANCE_WEB_USERNAME=madethisuptoo
INSTANCE_WEB_PASSWORD=madethisupaswell

INSTANCE_TITLE=Custom title
INSTANCE_THEME=Twitter Dark
INSTANCE_INFINITE_SCROLL=1
INSTANCE_HOSTNAME=

TS_AUTHKEY=tskey-auth

TWITTER_HANDLE=
MASTODON_HOST=
MASTODON_CLIENT_ID=
MASTODON_CLIENT_SECRET=
MASTODON_ACCESS_TOKEN=
BSKY_HANDLE=
BSKY_PASSWORD=

And finally the logs which are just full of auth failures?

Dumping auth env...

Dumping custom path env...

Dumping redis connection env...

Dumping instance customization env...

Dumping instance guardian env...

Writing Procfile...

]0;src | overmindsystem | Tmux socket name: overmind-src-Zgnr9B15s8R3rdEkpSSzj

system | Tmux session ID: src

system | Listening at ./.overmind.sock

web    | Started with pid 22...

nginx  | Started with pid 23...

web    | Running auth...

nginx  | Running gen_nginx_conf...

nginx  | Launching nginx...

web    | DEBUG:root:TW_ANDROID_BASIC_TOKEN=Basic M25WdVNvQlpueDZVNHZXc6QmNzNTlFRmJic2RGNlNsOU5nNzFzbWdTdFdFR3dYWZ0N3==

web    | DEBUG:root:start auth

web    | DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.twitter.com:443

web    | DEBUG:urllib3.connectionpool:https://api.twitter.com:443 "POST /oauth2/token HTTP/11" 200 152

web    | DEBUG:root:bearer_token=bearer AAAAAAAAAAAAAAAAAFXzAwAAAAAAMHCxpeSDG1gd74hl6k4%3DRUMF4xAQLsbeBhTSRrCiQpJtxoGWeyHrDe2jpGskWD

web    | DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.twitter.com:443

web    | DEBUG:urllib3.connectionpool:https://api.twitter.com:443 "POST /1.1/guest/activate.json HTTP/11" 200 63

web    | DEBUG:root:guest_token=1836760313141620790

web    | DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.twitter.com:443

web    | DEBUG:urllib3.connectionpool:https://api.twitter.com:443 "POST /1.1/onboarding/task.json?flow_name=login&api_version=1&known_device_token=&sim_country_code=us HTTP/11" 200 551

web    | DEBUG:urllib3.connectionpool:https://api.twitter.com:443 "POST /1.1/onboarding/task.json HTTP/11" 200 550

web    | DEBUG:urllib3.connectionpool:https://api.twitter.com:443 "POST /1.1/onboarding/task.json HTTP/11" 200 460

web    | DEBUG:urllib3.connectionpool:https://api.twitter.com:443 "POST /1.1/onboarding/task.json HTTP/11" 403 98

web    | Failed authentication. You might have entered the wrong username/password. Please rerun with environment variable DEBUG=1 for debugging.

web    | Exited with code 1

nginx  | Interrupting...

nginx  | Exited with code 0

note: I mucked with the bearer token when I pasted the logs because I actually don't really know if it matters

AritzUMA commented 9 hours ago

Check with another account