Skip to content

Call Stack Size Exceeded #104

@brandonparsons

Description

@brandonparsons

Hi there,

I'm getting the following error when trying to use this library:

~/code/my_project/node_modules/node-readability/node_modules/parse5/lib/tree_construction/parser.js:870
Parser.prototype._isSpecialElement = function (element) {
                                              ^

RangeError: Maximum call stack size exceeded
    at module.exports.Parser._isSpecialElement (~/code/my_project/node_modules/node-readability/node_modules/parse5/lib/tree_construction/parser.js:870:47)
    at genericEndTagInBody (~/code/my_project/node_modules/node-readability/node_modules/parse5/lib/tree_construction/parser.js:1899:15)
    at Object.endTagInBody [as END_TAG_TOKEN] (~/code/my_project/node_modules/node-readability/node_modules/parse5/lib/tree_construction/parser.js:2002:17)
    at module.exports.Parser._processToken (~/code/my_project/node_modules/node-readability/node_modules/parse5/lib/tree_construction/parser.js:619:38)
    at module.exports.parser._processToken (~/code/my_project/node_modules/node-readability/node_modules/parse5/lib/tree_construction/location_info_mixin.js:89:35)
    at module.exports.Parser._processFakeEndTag (~/code/my_project/node_modules/node-readability/node_modules/parse5/lib/tree_construction/parser.js:663:10)
    at buttonStartTagInBody (~/code/my_project/node_modules/node-readability/node_modules/parse5/lib/tree_construction/parser.js:1351:11)
    at buttonStartTagInBody (~/code/my_project/node_modules/node-readability/node_modules/parse5/lib/tree_construction/parser.js:1352:9)
    at buttonStartTagInBody (~/code/my_project/node_modules/node-readability/node_modules/parse5/lib/tree_construction/parser.js:1352:9)
    at buttonStartTagInBody (~/code/my_project/node_modules/node-readability/node_modules/parse5/lib/tree_construction/parser.js:1352:9)

Do you know why I might be getting this error? Is there a way to tell this library to stop attempting to parse the file, rather than blowing up? I can't seem to catch this error and let my script keep running.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions