!PclMnsCNeemgMBWtvC:snopyta.org

Nitter

414 Members
Alternative Twitter front-end | https://nitter.net | https://github.com/zedeus/nitter | Other Instances: https://github.com/zedeus/nitter/wiki/Instances | Offtopic room: #privacy-frontends-offtopic:matrix.org81 Servers

Load older messages


SenderMessageTime
14 May 2022
@michel:one.ems.hostMichel Alexandre Salim joined the room.17:18:32
15 May 2022
@isker:matrix.orgisker joined the room.05:45:24
@isker:matrix.orgisker

hi, on my self-hosted instance of nitter, visiting some user profiles results in a page titled "Jester route exception" with this as the contents:

An error has occured in one of your routes.

Detail: nre.nim:508 matchImpl
asyncfutures.nim:389 read
redpool.nim:68 getUserIdIter
asyncfutures.nim:389 read
asyncfutures.nim:389 read
asyncfutures.nim:389 read
asyncfutures.nim:389 read
asyncfutures.nim:389 read
Invalid unicode byte sequence

i can't reproduce this problem on any other instance of nitter that i try. it only happens on some user profiles and not others. there's nothing in the log other than the same message displayed on the page.

i tried to dig into the code to get a better characterization of the problem:

  • the source of the error is this https://github.com/flaviut/nre/blob/52f8117d3b8f2bfc6f94616b2b676c434b59c4f7/src/nre.nim#L553-L555, but i don't know what the actual regex is or how it's being used
  • i can't find getUserIdIter anywhere (i don't know nim, which doesn't help :)).
  • redpool seems to be about redis, so i speculatively FLUSHDB'd it at the command line but this didn't fix anything.

any pointers would be appreciated.

05:59:40
@zedeus:tchncs.dezedeus isker: Hey, thanks for looking into it! nre.nim in this case refers to nre from Nim's standard library. The line in question is here: https://github.com/nim-lang/Nim/blob/version-1-6/lib/impure/nre.nim#L508 10:21:51
@zedeus:tchncs.dezedeus Iter is added to asynchronous function names, so you should look for getUserId (it's in Nitter's redis_cache.nim file). redpool is a Redis connection pool library I made, it's responsible for calling the function using the pool, but wouldn't have any effect on this error, so you can ignore that detail 10:23:17
@suhas:matrix.orgsuhashebbar joined the room.10:45:58
@isker:matrix.orgisker
In reply to @zedeus:tchncs.de
isker: Hey, thanks for looking into it! nre.nim in this case refers to nre from Nim's standard library. The line in question is here: https://github.com/nim-lang/Nim/blob/version-1-6/lib/impure/nre.nim#L508

thanks, so seems like nim isn't really giving true locations in this stacktrace? maybe because of the asyncness? there is no nre usage anywhere near getUserId.

the only usage i can see is here: https://github.com/zedeus/nitter/blob/ecb6fe4162142f7260b36d4ac4021d6ac7cd2b49/src/experimental/parser/user.nim#L11. my understanding is that nim strings (like user.bio, in this function) are guaranteed to be valid unicode. so the runes are made into invalid unicode by one of the replacements prior to this nre one?

i really wonder what could possibly be different about my instance here...

16:59:23
@zedeus:tchncs.dezedeusCould it be your specific version of pcre/libpcre? It needs to be built with unicode, which is usually the case but not always18:07:39
16 May 2022
@isker:matrix.orgisker
In reply to @zedeus:tchncs.de
Could it be your specific version of pcre/libpcre? It needs to be built with unicode, which is usually the case but not always

well, it turns out the inputs just are different. some print debugging has revealed: using this profile's bio https://nitter.net/jesawyer, i get the first string here, the official docker image gets the second https://play.nim-lang.org/#ix=3XSw. that is indeed not unicode 🌞.

i suppose i should mention: i am using nitter from nixpkgs, on nixos. of course nix is a bizarro world that could produce this situation :). i guess i will try to understand where/how this encoding strangeness happens.

00:20:29
@isker:matrix.orgiskerokay, after just a few more minutes i'm almost certain it'll be https://github.com/zedeus/nitter/commit/62f8d48c5a1f07c09ebd14fb37abf03d95a73b52, or the lack thereof, in nixpkgs: https://github.com/NixOS/nixpkgs/blob/1d7db1b9e4cf1ee075a9f52e5c36f7b9f4207502/pkgs/development/nim-packages/jsony/default.nix#L5 gotta love it00:27:07
@isker:matrix.orgisker * okay, after just a few more minutes of reading i'm almost certain it'll be https://github.com/zedeus/nitter/commit/62f8d48c5a1f07c09ebd14fb37abf03d95a73b52, or the lack thereof, in nixpkgs: https://github.com/NixOS/nixpkgs/blob/1d7db1b9e4cf1ee075a9f52e5c36f7b9f4207502/pkgs/development/nim-packages/jsony/default.nix#L5 gotta love it00:27:17
@isker:matrix.orgiskeri'll tempt fate and pre-emptively say: thanks for your help! i think this will be the fix.00:28:03
@isker:matrix.orgiskerit works 🌞 https://github.com/NixOS/nixpkgs/pull/17321401:20:14
@thefrenchghosty:pussthecat.orgTheFrenchGhosty150 000 PR?!01:31:29
@sl:envs.netSamLeh left the room.03:31:41
@zedeus:tchncs.dezedeus
In reply to @isker:matrix.org
it works 🌞 https://github.com/NixOS/nixpkgs/pull/173214
nice! glad I could help :)
06:23:55
@cheer:tchncs.de@cheer:tchncs.de removed their profile picture.09:49:57
@cheer:tchncs.de@cheer:tchncs.de removed their display name cheer.09:50:16
@cheer:tchncs.de@cheer:tchncs.de left the room.09:50:20
@ycbcyb:matrix.orgycbcyb joined the room.10:37:58
@idahotokens:matrix.orgidahotokens joined the room.11:10:26
@tyman:matrix.orgtyman left the room.13:39:52
@rss:snopyta.orgRSS (bot)

New post in nitter: Recent Wiki Updates:

15:32:19
@idahotokens:matrix.orgidahotokens left the room.16:31:14
@gd.xwj:matrix.orggd.xwj joined the room.18:51:19
17 May 2022
@rss:snopyta.orgRSS (bot)

New post in nitter: Recent Wiki Updates:

03:06:44
@atmananu:matrix.orgStalanic Anu joined the room.13:56:11
@rss:snopyta.orgRSS (bot)

New post in nitter: Recent Wiki Updates:

14:15:41
@wolfpacktech:matrix.orgWolfPackTech joined the room.21:02:16
@daniel:mjut.clubdaniel joined the room.21:15:40

There are no newer messages yet.


Back to Room List