animetosho / Nyuu

Flexible usenet binary posting tool
215 stars 30 forks source link

Unexpected fatal exception encountered -> Timer already set #131

Closed duhagppn closed 1 month ago

duhagppn commented 2 months ago

New error, never seen this one before:

[WARN] NNTP connection error occurred: Response timed out (post-data); will retry post-upload request (attempt 1/5)
[WARN] Disconnect timed out, forcefully dropping connection...
[INFO] Reading file a7ee826f157f7d1c1ab87fe7d0574f8b.j0Fb...
[ERR ] Posting failed (Server sent "441 Article posting failed" response during upload) for article AfJsFxOuNeSeEcVyTmEnPtFp-1716830363847@nyuu; continuing regardless
[WARN] NNTP connection error occurred: write EPIPE; will retry post request (attempt 1/5)
[ERR ] Posting failed (Server sent "441 Article posting failed" response during upload) for article FqQfKoMvItVrOqJqKsTmHtKp-1716830363888@nyuu; continuing regardless
[ERR ] Posting failed (Server sent "441 Article posting failed" response during upload) for article WsEcFmTmGxEuGyKwRjJvMmUv-1716830363854@nyuu; continuing regardless
[ERR ] Unexpected fatal exception encountered, stack trace below
/home/user/bin/Nyuu2/bin/nyuu.js:1262
                        throw err; // this seems to change the exit code a bit :/
                        ^

Error: Timer already set: trying to set for post-upload, but already set for post
    at NNTP._setTimer (/home/user/bin/Nyuu2/lib/nntp.js:1026:25)
    at NNTP._requestSetTimer (/home/user/bin/Nyuu2/lib/nntp.js:986:8)
    at /home/user/bin/Nyuu2/lib/nntp.js:970:9
    at NNTP.noThrottle [as throttle] (/home/user/bin/Nyuu2/lib/nntp.js:45:39)
    at NNTP._writePostWait (/home/user/bin/Nyuu2/lib/nntp.js:966:31)
    at _doWrite (/home/user/bin/Nyuu2/lib/nntp.js:938:10)
    at Immediate.<anonymous> (/home/user/bin/Nyuu2/lib/nntp.js:948:9)
    at process.processImmediate (node:internal/timers:478:21)

Node.js v21.7.2
animetosho commented 2 months ago

Thanks for reporting!

This one looks like it could be difficult to trigger, but I think the above fix deals with it.
Let me know if it still seems to happen with the fix.