-
Notifications
You must be signed in to change notification settings - Fork 281
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 'some' of undefined #233
Comments
with that information I am afraid it is not possible to give you any hint...
|
Thank you for your quick response. I tried it on the latest (0.10.0) and on 0.9.1. Both gave the exact same error.
(sorry, deleted my original reply because I forgot to remove my personal info) |
Downgraded to node 9 to test it and I get the same error.
|
Tried it on another Debian server where it used to work, same error. |
the example above is not complete, I need something I can copy paste locally and reproduce... |
After hitting this same issue for several hours I discovered setting |
i'm using greenlock not redbird and i'm seeing this too. something is wrong in a greenlock dependency but i haven't figured out what yet. i'd recommend pegging the greenlock version in package.json. their releases are.... flakey. Edit: it looks like this scheduled LE change is the issue. the acme-v2 client backing greenlock (same author) hasn't been updated. |
Any updates on this? |
after i change {production:true} problem resolved... |
Downgrading to Node v11 fixed the issue for me. Below is my implementation in Typescript.
and then calling it like so
Hope I was able to help you, stranger from the future! |
i'm also having this issue. i've tried various different ways to resolve it, including switching between // generally speaking, it looks like this...
const proxy = require('redbird')({
port: 80,
letsencrypt: { path: 'certs', port: 3000 },
ssl: { port: 443 }
})
// ..with a config that looks like this...
const config = {
ssl: { letsencrypt: { email: '[email protected]', production: false } }
}
// ...which i use like this...
proxy.register('firstdomain.com', `http://localhost:${port}`, config)
proxy.register('seconddomain.com', `http://localhost:${port}`, config)
// ...etc... but despite the variations, i keep getting this redibrd error:
followed by this:
which as @cmawhorter mentions, does seem to be a dependency. i edited the file referenced in the error in order to log the undefined object causing the issue, and when i did i got:
if it helps, here's the chain of redbird error messages that follow:
|
Ran into this today while putting together a minimal example from the readme and some GitHub issues. Switching to
My code: var proxy = require('redbird')({
port: 80,
ssl: {
port: 443,
},
letsencrypt: {
path: '/home/REDACTED/redbird/certs',
},
});
proxy.register('REDACTED', 'http://localhost:8081', {
ssl: {
letsencrypt: {
email: 'REDACTED', // Domain owner/admin email
production: true, // WARNING: Only use this flag when the proxy is verified to work correctly to avoid being banned!
}
}
}); Version: node: 14.15.3 EDIT: That error was my fault. I forgot I had switched to using port 80 after learning that Let's Encrypt only supported using port 80 for the challenges. I had to unblock port 80 on my firewall. I also unblocked port 443 since I'm now using that for the HTTPS routes. Now, I'm getting a different error:
Chrome shows the error "ERR_SSL_VERSION_OR_CIPHER_MISMATCH". Looks like the cert fetching stuff is working now and it's just a matter of me getting my system set up properly to support serving the TLS certs. EDIT 2: Switching from Node.js 14 to 12 fixed that error. Also worth mentioning, for those reading this with the same issue, that I'm using Ubuntu 20.04. |
for me this seems to happen only when using production: false which I am using for testing and diagnosing other issues.... safe-replace.stageAsync seems to get undefined for data when trying to write the pem file (for one of the many times it is called) for some reason which breaks the save process. Certificate appears to be successfully gotten but not saved properly https://git.coolaj86.com/coolaj86/fs-safe-replace.js/issues/2 Trace: {
filename: '/var/www/certs/archive/mytestdomain.example.com/bundle0.pem',
data: undefined,
options: 'ascii'
}
at Object.writeFileAsync (/var/www/html/proxy/node_modules/safe-replace/index.js:58:17)
at /var/www/html/proxy/node_modules/le-store-certbot/index.js:288:19
{
tmpname: '/var/www/certs/archive/mytestdomain.example.com/bundle0.pem.9a0b00f6cad1c731.tmp',
filename: '/var/www/certs/archive/mytestdomain.example.com/bundle0.pem',
data: "contents of '/var/www/certs/archive/mytestdomain.example.com/bundle0.pem' were not provided to safe-replace.\r\n" +
`option: '"ascii"'`,
options: 'ascii'
} |
Had to reinstall my server and while setting up the proxy I got this error:
TypeError: Cannot read property 'some' of undefined at /opt/server/proxy/node_modules/acme-v2/index.js:1219:30 at processTicksAndRejections (internal/process/task_queues.js:93:5) {"name":"redbird","hostname":"arm","pid":5257,"level":50,"err":{"message":"Cannot read property 'some' of undefined","name":"TypeError","stack":"TypeError: Cannot read property 'some' of undefined\n at /opt/server/proxy/node_modules/acme-v2/index.js:1219:30\n at processTicksAndRejections (internal/process/task_queues.js:93:5)"},"msg":"Error registering LetsEncrypt certificates","time":"2019-12-18T15:36:05.256Z","v":0}
The proxy won't work on HTTPS now sadly. Is there any fix to this?
I'm running it on an ARM based Wandboard running Node 12 (but it also did not work on Node 10)
The text was updated successfully, but these errors were encountered: