ccd0 / 4chan-x

Adds various features to anonymous imageboards.
https://www.4chan-x.net/
Other
988 stars 135 forks source link

Incorrect future date setting breaks thread watcher auto-update even after date corrected #1164

Open ccd0 opened 8 years ago

ccd0 commented 8 years ago

VERSIONS 4chan-x: 1.12.3.9 (has occurred in previous versions) Chrome: 54.0.2840.71 m (64-bit)

STEPS TO REPRODUCE

  1. Watch thread
  2. Go to another thread or go off and do something else, thread watcher numbers are stuck at 0 unless threadwatcher is manually refreshed OR the threads that I want updated are left open in other tabs

PROBLEM Threadwatcher unread count only changes if the thread is left open OR if the threadwatcher is manually refreshed. Unless that is done Console lines such as script.js:3938 XHR finished loading: GET "http://a.4cdn.org/a/thread/148944939.json?s=ThreadUpdater".(anonymous function) @ script.js:3938update @ script.js:17153timeout @ script.js:17142 script.js:3938 XHR finished loading: GET "http://a.4cdn.org/a/threads.json?s=ThreadStats". Will not fire by themselves

ERROR LOG

It appears that the only errors displayed in the browser are advertising networks blocked by CSP (as expected)

core.min.1008.js:1 Refused to load the script 'http://s.zkcdn.net/ados.js' because it violates the following Content Security Policy directive: "script-src http://s.4cdn.org https://s.4cdn.org http://www.google.com https://www.google.com https://www.gstatic.com http://cdn.mathjax.org https://cdn.mathjax.org 'self' 'unsafe-inline' 'unsafe-eval'". initAds @ core.min.1008.js:1 core.min.1008.js:1 Refused to load the script 'http://www.google-analytics.com/analytics.js' because it violates the following Content Security Policy directive: "script-src http://s.4cdn.org https://s.4cdn.org http://www.google.com https://www.google.com https://www.gstatic.com http://cdn.mathjax.org https://cdn.mathjax.org 'self' 'unsafe-inline' 'unsafe-eval'".

(anonymous function) @ core.min.1008.js:1

ccd0 commented 8 years ago

Are you certain you're waiting long enough for it to auto-update? The time between auto-updates is 5 minutes.

ccd0 commented 8 years ago

Exported settings and a list of any other extensions you use (and if it still happens with them disabled) would also be helpful.

swablueme commented 8 years ago

@ccd0 I disabled all extensions apart from uMatrix and uBlock in testing. (and then disabled umatrix since everything was allowed through anyway because 4chanx blocked everything I wanted to block). I waited until up to 22 minutes for 4chan-x to autoupdate and it still wouldn't register.

Furthermore, it was a recent issue which happened completely out of the blue. (when I first installed 4chan-x the threadwatcher worked perfectly fine)

I have exported what I believe to be the 4chanx settings prior to the wipe: https://www.sendspace.com/file/hv1dpb

However I managed to fix the issue completely:

  1. I reset by 4chanx settings. I exported this new clean json
  2. I found my old 4chanx setting file with the broken threadwatcher. I copied and pasted the top half of the old json (everything above the line "hiddenThreads": {) so that I didn't have to retick all the boxes and reinput all my filters) into the new one 2a. I did this because I assumed that the issue was to do with how 4chan-x records the posts that I look at/hide/last checked and also I had previously used appchan x and that threadwatcher had a habit of dying if I didn't clean up the posts recorded under "lastReadPosts": { (can't remember if it was called something different in appchan, but anyway long lists of numbers recorded by the program to determine whether or not I had read the thread) from time to time.
  3. I then imported the modified 4chanx settings from step 2 into 4chan x.
  4. Threadwatcher worked perfectly again and it is still working now. And I have all my extensions enabled.
ccd0 commented 8 years ago

Your exported settings shows a last check date of Nov 10, 2016. Do you or did you have your clock set wrong at some point?

We should probably make it easier to recover from this sort of error.

swablueme commented 8 years ago

@ccd0 11 days ago (according to the nyafuu), I set my computer clock forwards in order to quickly unlock a few events on an emulator for a few anons (so the time jumps were made while I had 4chan and the corresponding 4chanx open).

The time jumps should have been as follows: My regular date to 19th of October to 23rd of October to 30th of October to 5th of October to 11th of November to To the correct date/time

I had noticed that 4chanx's displayed time (for example posted '1 hour ago') were calculated using my computer's time settings. Interesting. Maybe I'll try only replacing the last checked timestamps next time instead of deleting everything including post/last read history.

ccd0 commented 8 years ago

The fix is in stable. Most settings should now be robust to this sort of error, although you may still have problems with captchas and cooldowns. I'll leave this open until those are fixed also. Might be easiest to just add a interface to clear those, which I think is already on the issue list somewhere.