animetosho / Nyuu

Flexible usenet binary posting tool
221 stars 32 forks source link

Node v10.0.0 (Current): Error: Callback was already called. #45

Closed bgeet closed 6 years ago

bgeet commented 6 years ago

sw_vers

ProductName: Mac OS X ProductVersion: 10.13.4 BuildVersion: 17E202

node --version

v10.0.0

npm list -g

nyuu@0.3.7 ├─┬ async@2.6.0 │ └── lodash@4.17.10 └── yencode@1.0.8

homebrew (a macOS package manager) updated Node to v10.0.0 from v9.11.1 on Apr 25 - a day after it became current upstream: https://nodejs.org/en/blog/release/v10.0.0/ Node v9.x.x will reach end-of-life in June 2018: https://github.com/nodejs/release#release-schedule

nyuu throw that exception on start:

[ERR ] Unexpected fatal exception encountered, stack trace below /usr/local/lib/node_modules/nyuu/bin/nyuu.js:1043 throw err; // this seems to change the exit code a bit :/ ^

Error: The module '/usr/local/lib/node_modules/nyuu/node_modules/yencode/build/Release/yencode.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 59. This version of Node.js requires NODE_MODULE_VERSION 64. Please try re-compiling or re-installing the module (for instance, using npm rebuild or npm install). at Object.Module._extensions..node (internal/modules/cjs/loader.js:707:18) at Module.load (internal/modules/cjs/loader.js:589:32) at tryModuleLoad (internal/modules/cjs/loader.js:528:12) at Function.Module._load (internal/modules/cjs/loader.js:520:3) at Module.require (internal/modules/cjs/loader.js:626:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. (/usr/local/lib/node_modules/nyuu/node_modules/yencode/index.js:3:9) at Module._compile (internal/modules/cjs/loader.js:678:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10) at Module.load (internal/modules/cjs/loader.js:589:32)

so uninstalled and reinstalled nyuu thru npm, but now at the end of posting it throws this error:

[INFO] All file(s) read... [WARN] Disconnect timed out, forcefully dropping connection... [WARN] Disconnect timed out, forcefully dropping connection... [WARN] Disconnect timed out, forcefully dropping connection... [WARN] Disconnect timed out, forcefully dropping connection... [ERR ] Unexpected fatal exception encountered, stack trace below /usr/local/lib/node_modules/nyuu/bin/nyuu.js:1043 throw err; // this seems to change the exit code a bit :/ ^

Error: Callback was already called. at /usr/local/lib/node_modules/nyuu/node_modules/async/dist/async.js:955:32 at /usr/local/lib/node_modules/nyuu/node_modules/async/dist/async.js:1123:13 at /usr/local/lib/node_modules/nyuu/lib/uploader.js:185:13 at process._tickCallback (internal/process/next_tick.js:172:11)

Workaround homebrew also packaged Node v8.x separately, which is LTS and maintained by upstream till December 2019. package is called node@8, so use that for nyuu in the meantime.

nonspin commented 6 years ago

npm rebuild takes care of the first issue for now.

Regarding the latter error after posting .. "[INFO] All file(s) read..." While everything is properly uploaded .. the created .nzb only lacks the closing nzb tag at the very bottom. Add/Insert </nzb>

Some indexers will refuse it, because the xml isnt valid w/out the closing tag

animetosho commented 6 years ago

Thanks for the report!

For the first issue, Node.js requires native modules to be re-compiled if the major version has changed, and re-installing (or re-building) does fix that.

Otherwise there's been a few issues with Node 10, but hopefully should all be fixed now.