Wildcard updates broke non-wildcard domain #34

Closed
by Ghost opened 5 years ago · 6 comments
Ghost commented 5 years ago

This has broken my server

Apr  1 13:39:28 ip-172-31-2-116 node: Unhandled rejection TypeError: Cannot read property 'toLowerCase' of undefined
Apr  1 13:39:28 ip-172-31-2-116 node: at /.../node_modules/greenlock/lib/utils.js:26:26
Apr  1 13:39:28 ip-172-31-2-116 node: at Array.some (<anonymous>)
Apr  1 13:39:28 ip-172-31-2-116 node: at Object.module.exports.certHasDomain (/.../node_modules/greenlock/lib/uti$
Apr  1 13:39:28 ip-172-31-2-116 node: at /.../node_modules/greenlock/lib/core.js:444:23
This has broken my server ``` Apr 1 13:39:28 ip-172-31-2-116 node: Unhandled rejection TypeError: Cannot read property 'toLowerCase' of undefined Apr 1 13:39:28 ip-172-31-2-116 node: at /.../node_modules/greenlock/lib/utils.js:26:26 Apr 1 13:39:28 ip-172-31-2-116 node: at Array.some (<anonymous>) Apr 1 13:39:28 ip-172-31-2-116 node: at Object.module.exports.certHasDomain (/.../node_modules/greenlock/lib/uti$ Apr 1 13:39:28 ip-172-31-2-116 node: at /.../node_modules/greenlock/lib/core.js:444:23 ```
Owner

Can you give me some more information? I have tests cases surrounding this that pass.

I don't doubt that my update broke it. However, I'm not sure how to reproduce. What does your config look like?

Can you give me some more information? I have tests cases surrounding this that pass. I don't doubt that my update broke it. However, I'm not sure how to reproduce. What does your config look like?

Sure. I imagine these kind of bugs are a pain to track.

    const lex = require('greenlock-express').create({
      version: 'draft-11',
      server: config.ssl.staging ? 'https://acme-staging-v02.api.letsencrypt.org/directory' : 'https://acme-v02.api.letsencrypt.org/directory',
      agreeTos: true,
      configDir: config.ssl.certDir, // '~/certs/'
      email: config.ssl.email,
      communityMember: false,
      telemetry: false,
      app,
      approveDomains: config.ssl.domains // ['my.domain.com']
    })

    server = lex.listen(config.port, config.ssl.port)

Not sure what else to provide. It's been working great all this time until last update. I'm guessing _domain isn't getting passed or some test is failing.

Sure. I imagine these kind of bugs are a pain to track. ``` const lex = require('greenlock-express').create({ version: 'draft-11', server: config.ssl.staging ? 'https://acme-staging-v02.api.letsencrypt.org/directory' : 'https://acme-v02.api.letsencrypt.org/directory', agreeTos: true, configDir: config.ssl.certDir, // '~/certs/' email: config.ssl.email, communityMember: false, telemetry: false, app, approveDomains: config.ssl.domains // ['my.domain.com'] }) server = lex.listen(config.port, config.ssl.port) ``` Not sure what else to provide. It's been working great all this time until last update. I'm guessing _domain isn't getting passed or some test is failing.
Owner

I think it may be a bug in greenlock-express, actually - passing in bad data and missing the 'domain' string for the servername on startup when it isn't available yet and falling through to trying to use it anyway.

I've published greenlock@v2.7.1 with a workaround that should do until I can address the other tonight.

Please give it a try and let me know if that fixes it for you.

I think it may be a bug in greenlock-express, actually - passing in bad data and missing the 'domain' string for the servername on startup when it isn't available yet and falling through to trying to use it anyway. I've published `greenlock@v2.7.1` with a workaround that should do until I can address the other tonight. Please give it a try and let me know if that fixes it for you.

Ok I'll give it a try later. Is there a way to force it to update? greenlock is a dependency of greenlock-express (which is a dependency of my project). so npm update or ci even doesn't seem to update it that deep.

Ok I'll give it a try later. Is there a way to force it to update? greenlock is a dependency of greenlock-express (which is a dependency of my project). so npm update or ci even doesn't seem to update it that deep.
Owner

greenlock-express has a package-lock.json (which is still pointing to the older version of greenlock), so npm ci should do the trick.

However, you can manually npm install --save greenlock@2.7.1 at the root of your project and that shouldn't be in conflict with greenlock-express' dependency graphy.

(otherwise we have a very strange catch 22)

greenlock-express has a `package-lock.json` (which is still pointing to the older version of `greenlock`), so `npm ci` _should_ do the trick. However, you can manually `npm install --save greenlock@2.7.1` at the root of your project and that _shouldn't_ be in conflict with `greenlock-express`' dependency graphy. (otherwise we have a very strange catch 22)

That looks to have done the trick. Thanks @coola86

That looks to have done the trick. Thanks @coola86
coolaj86 closed this issue 5 years ago
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.