Wildcard updates broke non-wildcard domain #34

Закрито
відкрито 2019-04-01 19:12:59 +00:00 користувачем Ghost · 6 коментарів
Ghost прокоментував(ла) 2019-04-01 19:12:59 +00:00

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 ```
coolaj86 прокоментував(ла) 2019-04-01 20:05:11 +00:00
Власник

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?
Ghost прокоментував(ла) 2019-04-01 20:11:39 +00:00
Author

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.
coolaj86 прокоментував(ла) 2019-04-01 20:21:34 +00:00
Власник

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.
Ghost прокоментував(ла) 2019-04-01 20:26:38 +00:00
Author

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.
coolaj86 прокоментував(ла) 2019-04-01 20:29:06 +00:00
Власник

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)
Ghost прокоментував(ла) 2019-04-01 20:52:35 +00:00
Author

That looks to have done the trick. Thanks @coola86

That looks to have done the trick. Thanks @coola86
coolaj86 закрив цю задачу 2019-04-02 03:46:29 +00:00
Підпишіться щоб приєднатися до обговорення.
Без мітки
Етап відсутній
Немає виконавця
2 учасників
Сповіщення
Дата завершення
Термін дії не дійсний або знаходиться за межами допустимого діапазону. Будь ласка використовуйте формат 'yyyy-mm-dd'.

Термін виконання не встановлений.

Залежності

No dependencies set.

Reference: coolaj86/greenlock.js-ARCHIVED#34
No description provided.