TuxedoTako / 4chan-xt

Adds various features to anonymous imageboards.
Other
123 stars 8 forks source link

Fetching threads causes parsing errors #86

Open saxamaphone69 opened 2 months ago

saxamaphone69 commented 2 months ago

While originally I thought this was part of the fxtwitter thing, I actually think this has to do with the Thread Watcher and trying to grab certain threads. Clicking on the 'check threads'/refresh button pops this into the console each time.

image

I've got some random threads in there at most times for CSS testing. My guess is it's trying to grab something from archived.moe and it's getting a CloudFlare bot check/captcha page. I had the same issue when trying to get requests to https://find.4chan.org/api?q=pokemon working correctly, but getting blocked my the captcha. While the thread in the thread watcher links to https://boards.4chan.org/qst/thread/5983227, it actually takes you to https://archived.moe/qst/thread/5983227/ (after the 404 page). I find going to the page manually works, but trying to do it through JS doesn't.

Steps to reproduce? I'd guess follow some dying threads on /qst/ or other boards that use archived.moe, wait for them to go, and try? This is using Windows 11 / Tampermonkey latest / Chrome latest.

TuxedoTako commented 2 months ago

Arhived.moe not liking external scripts using their bandwidth is a known issue: https://github.com/TuxedoTako/4chan-xt/issues/51.

The error handling could probably be improved.

Also related: https://github.com/TuxedoTako/4chan-xt/issues/82.

saxamaphone69 commented 5 hours ago

I think this is related, and the error is different now (something you may have included?).

For my own testing I sometimes keep some random sushigirl and other 4chan X-compatible threads in my Thread Watcher. It now says:

image

image

Which I guess shows the error of the JSON itself, rather than which function/where it is called from? I can consistently cause the console errors upon refreshing the Thread Watcher.