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

Authorization header code sometimes invokes new Buffer(undefined) #75

Open
paulmelnikow opened this issue Jul 17, 2018 · 1 comment
Open

Comments

@paulmelnikow
Copy link
Contributor

Hi, I'm seeing this exception in Shields:

NodeError: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type undefined
  File "buffer.js", line 195, in Function.from
  File "buffer.js", line 170, in new Buffer
  File "/home/m/shields/node_modules/camp/lib/camp.js", line 63, in augmentReqRes
    var up = new Buffer(authComponent[1], 'base64').toString().split(':');
  File "/home/m/shields/node_modules/camp/lib/camp.js", line 398, in listener
    augmentReqRes(req, res, server);
  File "/home/m/shields/node_modules/camp/lib/camp.js", line 364, in SecureCamp.<anonymous>
    server.on('request', function(req, res) { listener(server, req, res) });
...
(3 additional frame(s) were not displayed)

NodeError: The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type undefined

This is the line of code:

sc/lib/camp.js

Line 64 in 2d0e916

var up = new Buffer(authComponent[1], 'base64').toString().split(':');

Shields is running camp 17.2.1 in production, though it doesn't look like this code has been touched recently.

@paulmelnikow
Copy link
Contributor Author

paulmelnikow commented Jul 17, 2018

Sentry link for Shields: https://sentry.io/shields/shields/issues/561620553

Added: This issue still exists as of 17.2.2.

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

1 participant