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

TypeError: Cannot read property '0' of undefined #195

Open
jalbersdorfer opened this issue Sep 26, 2019 · 0 comments · May be fixed by #196 or #199
Open

TypeError: Cannot read property '0' of undefined #195

jalbersdorfer opened this issue Sep 26, 2019 · 0 comments · May be fixed by #196 or #199
Assignees

Comments

@jalbersdorfer
Copy link

Problem

TypeError: Cannot read property '0' of undefined when parsing broken input like {"a": 1, "b

Location

"Oboe.js": "^2.1.4" - Oboe.js 2.1.4 and higher (master)

TypeError: Cannot read property '0' of undefined
    at C:\tmp\oboe-bug-template\node_modules\oboe\dist\oboe-node.js:121:33
    at appendBuiltContent (C:\tmp\oboe-bug-template\node_modules\oboe\dist\oboe-node.js:1455:15)
    at nodeOpened (C:\tmp\oboe-bug-template\node_modules\oboe\dist\oboe-node.js:1436:7)
    at C:\tmp\oboe-bug-template\node_modules\oboe\dist\oboe-node.js:1050:19
    at applyEach (C:\tmp\oboe-bug-template\node_modules\oboe\dist\oboe-node.js:496:20)
    at emit (C:\tmp\oboe-bug-template\node_modules\oboe\dist\oboe-node.js:1931:7)
    at emitError (C:\tmp\oboe-bug-template\node_modules\oboe\dist\oboe-node.js:630:9)
    at handleStreamEnd (C:\tmp\oboe-bug-template\node_modules\oboe\dist\oboe-node.js:665:7)
    at applyEach (C:\tmp\oboe-bug-template\node_modules\oboe\dist\oboe-node.js:496:20)
    at Object.emit (C:\tmp\oboe-bug-template\node_modules\oboe\dist\oboe-node.js:1931:7)

Steps to reproduce problem:

Desired or expected behavior:

I would expect the fail event handler to be called in that case, reporting something like Unexpected end

Observed behavior:

TypeError: Cannot read property '0' of undefined occurs.

jalbersdorfer added a commit to jalbersdorfer/oboe.js that referenced this issue Sep 26, 2019
fix jimhigson#195
fix possible "TypeError: Cannot read property '0' of undefined" when parsing broken input like `{"a": 1, "b`
@Aigeec Aigeec self-assigned this Nov 3, 2019
@Aigeec Aigeec linked a pull request Nov 3, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants