nitter icon indicating copy to clipboard operation
nitter copied to clipboard

[tokens] fetching token failed on OpenBSD

Open hnhx opened this issue 1 year ago • 7 comments

I'm running the latest version of nitter on OpenBSD 7.2-beta (amd64).

When I start nitter I get this error:

[tokens] fetching token failed: No error reported. [tokens] fetching tokens paused, resuming in 30 minutes

I tried decreasing the tokenCount in the config however it didn't really help, same issue.

When I open the nitter instance, the index page works fine, however whenever I try to search for something it just says the instance has been rate limited, I'm pretty sure its not actually a rate limit issue, I think its because it cant fetch the token for some reason.

hnhx avatar Jul 25 '22 13:07 hnhx

Could be that Nitter doesn't run on OpenBSD 7.2, hard to tell from just "No error reported."

zedeus avatar Jul 25 '22 14:07 zedeus

Experiencing the same on OpenBSD 7.1. Are there any debugging flags that can be used to get more information out of the nitter app than just no error reported?

hmsmart avatar Jul 27 '22 17:07 hmsmart

I couldn't find any way to fix it on OpenBSD, and it doesn't help that I'm not familiar with the nim language. I have migrated my homeserver to FreeBSD 13.1, Nitter works fine there, it seems to be an OpenBSD only issue.

hnhx avatar Jul 27 '22 17:07 hnhx

I think that is a bug of asynchttpclient in nim under OpenBSD.

Even the sample code from nim httpclient module do not work and raise the same error and however the sync http client works normally.

import std/[asyncdispatch, httpclient]

proc asyncProc(): Future[string] {.async.} =
   var client = newAsyncHttpClient()
   return await client.getContent("https://www.example.com")

echo waitFor asyncProc()

jackyzy823 avatar Aug 02 '22 16:08 jackyzy823

@jackyzy823 thanks for the additional information. Maybe the issue might be with LibreSSL, since asynchttp seems to work with http requests.

hmsmart avatar Aug 02 '22 23:08 hmsmart

Maybe the issue might be with LibreSSL

Yes.

More detail , the issue might be cause by nim interoperating with LibreSSL in usage of TLS1.3 and non-blocking mode .Thus It would be quite hard to find where the bug is.

I reported a issue to nim. https://github.com/nim-lang/Nim/issues/20144 Hope that some one could help out.

jackyzy823 avatar Aug 03 '22 12:08 jackyzy823

I also have this issue running nitter:latest in docker on ubuntu 22.04 server. Is there something i can do to help fix this issue? My docker compose file looks like this:

version: "3"

services:

  nitter:
    image: zedeus/nitter:latest
    container_name: nitter
    ports:
      - "127.0.0.1:8082:8080"
    volumes:
      - ./nitter.conf:/src/nitter.conf:ro
    depends_on:
      - nitter-redis
    restart: unless-stopped
    healthcheck:
      test: wget -nv --tries=1 --spider http://127.0.0.1:8080/Jack/status/20 || exit 1
      interval: 30s
      timeout: 5s
      retries: 2

  nitter-redis:
    image: redis:6-alpine
    container_name: nitter-redis
    command: redis-server --save 60 1 --loglevel warning
    volumes:
      - nitter-redis:/data
    restart: unless-stopped
    healthcheck:
      test: redis-cli ping
      interval: 30s
      timeout: 5s
      retries: 2

volumes:
  nitter-redis:

BitWire avatar Aug 28 '22 20:08 BitWire

This was fixed upstream, but you might have to build using unstable/nightly Nim (easy using the choosenim tool).

zedeus avatar Jun 17 '23 01:06 zedeus