Flood-UI / flood

A web UI for rTorrent, qBittorrent and Transmission with a Node.js backend and React frontend. Migrate to v4: https://github.com/jesec/flood/wiki/Migrate-from-older-versions-of-Flood.
https://flood.js.org
GNU General Public License v3.0
1.81k stars 173 forks source link

[Bug] Flood crashes when RSS feed is not a RSS feed #368

Open Phr33d0m opened 7 years ago

Phr33d0m commented 7 years ago

Hi,

If you add a new RSS feed and enter a URL that's not an RSS feed then flood crashes. This is reproducible always.

$ ▶ npm start

> flood@1.0.0 start /media/STORAGE4/Downloads/flood
> node server/bin/www

GET /api/stats 200 378.437 ms - 152
GET /api/client/torrents 200 381.371 ms - 2
GET /api/history?snapshot=thirtyMin 200 371.947 ms - -
GET /api/client/torrents/taxonomy 200 289.100 ms - 37
GET /api/notifications?limit=10&start=0 304 371.725 ms - -
Feed reader error: Error: Feed type not recognized
    at SAXStream.openf1 (/media/STORAGE4/Downloads/flood/node_modules/feedme/lib/xmlfeedparser.js:106:28)
    at emitOne (events.js:96:13)
    at SAXStream.emit (events.js:191:7)
    at SAXParser.me._parser.(anonymous function) [as onopentag] (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:258:17)
    at emit (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:640:35)
    at emitNode (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:645:5)
    at openTag (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:841:5)
    at SAXParser.write (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:1407:13)
    at SAXStream.write (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:239:18)
    at module.exports.yoshi.write (/media/STORAGE4/Downloads/flood/node_modules/feedme/lib/feedme.js:41:14)
/media/STORAGE4/Downloads/flood/node_modules/feedme/lib/xmlfeedparser.js:107
      parser.close();
             ^

TypeError: parser.close is not a function
    at SAXStream.openf1 (/media/STORAGE4/Downloads/flood/node_modules/feedme/lib/xmlfeedparser.js:107:14)
    at emitOne (events.js:96:13)
    at SAXStream.emit (events.js:191:7)
    at SAXParser.me._parser.(anonymous function) [as onopentag] (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:258:17)
    at emit (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:640:35)
    at emitNode (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:645:5)
    at openTag (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:841:5)
    at SAXParser.write (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:1407:13)
    at SAXStream.write (/media/STORAGE4/Downloads/flood/node_modules/sax/lib/sax.js:239:18)
    at module.exports.yoshi.write (/media/STORAGE4/Downloads/flood/node_modules/feedme/lib/feedme.js:41:14)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! flood@1.0.0 start: `node server/bin/www`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the flood@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/user/.npm/_logs/2017-05-26T18_06_03_261Z-debug.log

And the log file:

$ ▶ cat /home/user/.npm/_logs/2017-05-26T18_06_03_261Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'start' ]
2 info using npm@4.6.1
3 info using node@v7.10.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle flood@1.0.0~prestart: flood@1.0.0
6 silly lifecycle flood@1.0.0~prestart: no script for prestart, continuing
7 info lifecycle flood@1.0.0~start: flood@1.0.0
8 verbose lifecycle flood@1.0.0~start: unsafe-perm in lifecycle true
9 verbose lifecycle flood@1.0.0~start: PATH: /usr/lib/node_modules/npm/bin/node-gyp-bin:/media/STORAGE4/Downloads/flood/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/user/.bin/:/home/user/.config/composer/vendor/bin:/home/user/Downloads/android/tools:/home/user/.gem/ruby/2.4.0/bin
10 verbose lifecycle flood@1.0.0~start: CWD: /media/STORAGE4/Downloads/flood
11 silly lifecycle flood@1.0.0~start: Args: [ '-c', 'node server/bin/www' ]
12 silly lifecycle flood@1.0.0~start: Returned: code: 1  signal: null
13 info lifecycle flood@1.0.0~start: Failed to exec start script
14 verbose stack Error: flood@1.0.0 start: `node server/bin/www`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:279:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:194:7)
14 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:194:7)
14 verbose stack     at maybeClose (internal/child_process.js:899:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid flood@1.0.0
16 verbose cwd /media/STORAGE4/Downloads/flood
17 verbose Linux 4.11.2-1-ARCH
18 verbose argv "/usr/bin/node" "/usr/bin/npm" "start"
19 verbose node v7.10.0
20 verbose npm  v4.6.1
21 error code ELIFECYCLE
22 error errno 1
23 error flood@1.0.0 start: `node server/bin/www`
23 error Exit status 1
24 error Failed at the flood@1.0.0 start script.
24 error This is probably not a problem with npm. There is likely additional logging output above.
25 verbose exit [ 1, true ]

Regards.

noraj commented 6 years ago

@jfurrow Sounds easy to fix? Just adding a try/catch to check input?

bbashy commented 6 years ago

Flood uses feedsub package now. Does this bug still exist?