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 'slice' of null (with node 9.1.0) #65

Closed
jankeromnes opened this issue Nov 13, 2017 · 5 comments
Closed

Comments

@jankeromnes
Copy link
Collaborator

[2017-11-13T14:29:21.426Z] [fail] unhandled promise rejection TypeError: Cannot read property 'slice' of null
    at getQueries (/home/jan/janitor/node_modules/camp/lib/camp.js:239:34)
    at Array.pathLayer (/home/jan/janitor/node_modules/camp/lib/camp.js:821:9)
    at bubble (/home/jan/janitor/node_modules/camp/lib/camp.js:406:26)
    at next (/home/jan/janitor/node_modules/camp/lib/camp.js:407:46)
    at Array.eventSourceLayer (/home/jan/janitor/node_modules/camp/lib/camp.js:616:49)
    at bubble (/home/jan/janitor/node_modules/camp/lib/camp.js:406:26)
    at next (/home/jan/janitor/node_modules/camp/lib/camp.js:407:46)
    at Array.ajaxLayer (/home/jan/janitor/node_modules/camp/lib/camp.js:516:39)
    at bubble (/home/jan/janitor/node_modules/camp/lib/camp.js:406:26)
    at next (/home/jan/janitor/node_modules/camp/lib/camp.js:407:46)
@jankeromnes jankeromnes changed the title TypeError: Cannot read property 'slice' of null TypeError: Cannot read property 'slice' of null (with node 9.1.0) Nov 13, 2017
@jankeromnes
Copy link
Collaborator Author

Note: The problem appeared when using node 9.1.0. It disappeared again when reverting to node 8.9.1.

@paulmelnikow
Copy link
Contributor

This was reported at badges/shields#1290 and is reproducible in Shields unit tests. A fix would be helpful for developers running Node 9.

  1) The server
       should produce colorscheme badges:
     Uncaught TypeError: Cannot read property 'slice' of null
      at getQueries (node_modules/camp/lib/camp.js:239:34)
      at catchpath (node_modules/camp/lib/camp.js:902:3)
      at Array.routeLayer (node_modules/camp/lib/camp.js:864:7)
      at bubble (node_modules/camp/lib/camp.js:406:26)
      at next (node_modules/camp/lib/camp.js:407:46)
      at Array.pathLayer (node_modules/camp/lib/camp.js:837:16)
      at bubble (node_modules/camp/lib/camp.js:406:26)
      at next (node_modules/camp/lib/camp.js:407:46)
      at Array.eventSourceLayer (node_modules/camp/lib/camp.js:616:49)
      at bubble (node_modules/camp/lib/camp.js:406:26)
      at next (node_modules/camp/lib/camp.js:407:46)
      at Array.ajaxLayer (node_modules/camp/lib/camp.js:516:39)
      at bubble (node_modules/camp/lib/camp.js:406:26)
      at next (node_modules/camp/lib/camp.js:407:46)
      at Array.wsLayer (node_modules/camp/lib/camp.js:505:50)
      at bubble (node_modules/camp/lib/camp.js:406:26)
      at next (node_modules/camp/lib/camp.js:407:46)
      at Array.genericLayer (node_modules/camp/lib/camp.js:443:5)
      at bubble (node_modules/camp/lib/camp.js:406:26)
      at listener (node_modules/camp/lib/camp.js:400:3)
      at Camp.<anonymous> (node_modules/camp/lib/camp.js:363:45)
      at parserOnIncoming (_http_server.js:619:12)
      at HTTPParser.parserOnHeadersComplete (_http_common.js:117:23)

@espadrine
Copy link
Owner

Huh, GitHub stopped sending me notifications for new issues for some reason.

I noticed this issue and fixed it here: a7f47ea

@jankeromnes
Copy link
Collaborator Author

Thanks for fixing this! 👍 💯

@styfle
Copy link

styfle commented Feb 9, 2018

For posterity, the breaking change was introduced in Node 9.0.0 with nodejs/node#13606

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

4 participants