Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-red crash in case of invalid url in feedparser node #134

Closed
ramajd opened this issue Oct 10, 2015 · 1 comment
Closed

node-red crash in case of invalid url in feedparser node #134

ramajd opened this issue Oct 10, 2015 · 1 comment

Comments

@ramajd
Copy link

ramajd commented Oct 10, 2015

I use feedparser node in my node-red server to get rss feeds from a url, but in case that user insert invalid url, application crash occures in second attempt to fetch data from url. any solution to prevent this application crash ?

my sample flow that make my node-red instance crash goes here:

[
    {
        "id": "44d2e0d.fbb2d2",
        "type": "debug",
        "name": "",
        "active": true,
        "console": "false",
        "complete": "false",
        "x": 521,
        "y": 368,
        "z": "666668ee.999998",
        "wires": []
    },
    {
        "id": "3426e86.fcbd918",
        "type": "feedparse",
        "name": "",
        "url": "aaa",
        "interval": "1",
        "x": 342,
        "y": 282,
        "z": "666668ee.999998",
        "wires": [
            [
                "44d2e0d.fbb2d2"
            ]
        ]
    }
]

and this is the application log including its crash log:

Welcome to Node-RED
===================

11 Oct 00:32:46 - [info] Node-RED version: v0.11.2
11 Oct 00:32:46 - [info] Node.js  version: v0.10.40
11 Oct 00:32:46 - [info] Loading palette nodes
11 Oct 00:32:47 - [warn] ------------------------------------------
11 Oct 00:32:47 - [warn] Failed to register 1 node type
11 Oct 00:32:47 - [warn] Run with -v for details
11 Oct 00:32:47 - [warn] ------------------------------------------
11 Oct 00:32:47 - [info] Settings file  : /usr/lib/node_modules/node-red/settings.js
11 Oct 00:32:47 - [info] User directory : /home/reza/.node-red
11 Oct 00:32:47 - [info] Flows file : /home/reza/.node-red/flows_reza-ubuntu.json
11 Oct 00:32:47 - [info] Server now running at http://127.0.0.1:1880/
11 Oct 00:32:47 - [info] Creating new flow file
11 Oct 00:32:47 - [info] Starting flows
11 Oct 00:32:47 - [info] Started flows
11 Oct 00:33:22 - [info] Stopping flows
11 Oct 00:33:22 - [info] Stopped flows
11 Oct 00:33:22 - [info] Starting flows
11 Oct 00:33:22 - [error] [feedparse:3426e86.fcbd918] Error: Invalid URI "aaa"
11 Oct 00:34:22 - [red] Uncaught Exception:
11 Oct 00:34:22 - Error: Invalid URI "aaa"
    at Request.init (/usr/lib/node_modules/node-red/node_modules/node-red-node-feedparser/node_modules/request/request.js:290:31)
    at new Request (/usr/lib/node_modules/node-red/node_modules/node-red-node-feedparser/node_modules/request/request.js:140:8)
    at request (/usr/lib/node_modules/node-red/node_modules/node-red-node-feedparser/node_modules/request/index.js:55:10)
    at FeedParseNode.getFeed (/usr/lib/node_modules/node-red/node_modules/node-red-node-feedparser/32-feedparse.js:31:27)
    at null.<anonymous> (/usr/lib/node_modules/node-red/node_modules/node-red-node-feedparser/32-feedparse.js:65:57)
    at wrapper [as _onTimeout] (timers.js:270:14)
    at Timer.listOnTimeout [as ontimeout] (timers.js:121:15)
@knolleary
Copy link
Member

Fixed and published to npm as v0.1.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants