I am running greenlock with following options and getting an error while it is setting the challenge. Is the dns-01 challenge included by default or do I have to include it by the .create() options somehow?
TypeError: Cannot read property 'set' of undefined
at Object.certReq.setChallenge (/app/node_modules/greenlock/lib/core.js:303:51)
at /app/node_modules/acme-v2/node.js:460:17
at new Promise (<anonymous>)
at Object.ACME._setChallenge (/app/node_modules/acme-v2/node.js:444:10)
at /app/node_modules/acme-v2/node.js:285:19
at Array.map (<anonymous>)
at /app/node_modules/acme-v2/node.js:269:47
at Array.map (<anonymous>)
at Object.ACME._testChallenges (/app/node_modules/acme-v2/node.js:267:38)
at Object.ACME._getCertificate (/app/node_modules/acme-v2/node.js:581:15)
at /app/node_modules/acme-v2/node.js:576:21
at process._tickCallback (internal/process/next_tick.js:68:7)
I am running greenlock with following options and getting an error while it is setting the challenge. Is the dns-01 challenge included by default or do I have to include it by the .create() options somehow?
```
const le = Greenlock.create({
version: 'draft-12',
server: 'https://acme-v02.api.letsencrypt.org/directory',
configDir: '/db',
agreeTos: true,
renewWithin: 20 * 24 * 60 * 60 * 1000, // 20 days
challengeType: 'dns-01',
debug,
log: (...debug) => { console.log(...debug); },
}, handlers);
...
le.register({
domains: [domain],
email: mail,
})
```
```
TypeError: Cannot read property 'set' of undefined
at Object.certReq.setChallenge (/app/node_modules/greenlock/lib/core.js:303:51)
at /app/node_modules/acme-v2/node.js:460:17
at new Promise (<anonymous>)
at Object.ACME._setChallenge (/app/node_modules/acme-v2/node.js:444:10)
at /app/node_modules/acme-v2/node.js:285:19
at Array.map (<anonymous>)
at /app/node_modules/acme-v2/node.js:269:47
at Array.map (<anonymous>)
at Object.ACME._testChallenges (/app/node_modules/acme-v2/node.js:267:38)
at Object.ACME._getCertificate (/app/node_modules/acme-v2/node.js:581:15)
at /app/node_modules/acme-v2/node.js:576:21
at process._tickCallback (internal/process/next_tick.js:68:7)
```
After you've done it by hand with a CLI, then I'd say start looking at the other DNS-01 challenge handlers / plugins.
What DNS provider are you using?
Yes, if you want to use `dns-01` then you need to provide a set of handlers.
https://git.coolaj86.com/coolaj86/greenlock-express.js#dns-01-challenges
If you just want to try it out by hand, here's a good first resource to look at:
https://git.coolaj86.com/coolaj86/le-challenge-dns.js
After you've done it by hand with a CLI, then I'd say start looking at the other DNS-01 challenge handlers / plugins.
What DNS provider are you using?
Just did a ton of cleanup and updates in this area. I'd highly recommend trying the new wildcard example and taking a look at the new le-store-fs cert/key store plugin, and the new le-challenge-dns dns-01 plugin.
Just did a ton of cleanup and updates in this area. I'd highly recommend trying the new wildcard example and taking a look at the new `le-store-fs` cert/key store plugin, and the new `le-challenge-dns` dns-01 plugin.
* https://git.coolaj86.com/coolaj86/greenlock-express.js/src/branch/master/examples/wildcard.js
* https://git.coolaj86.com/coolaj86/le-store-fs.js
* https://git.coolaj86.com/coolaj86/le-challenge-dns.js
I am running greenlock with following options and getting an error while it is setting the challenge. Is the dns-01 challenge included by default or do I have to include it by the .create() options somehow?
Yes, if you want to use
dns-01
then you need to provide a set of handlers.https://git.coolaj86.com/coolaj86/greenlock-express.js#dns-01-challenges
If you just want to try it out by hand, here's a good first resource to look at:
https://git.coolaj86.com/coolaj86/le-challenge-dns.js
After you've done it by hand with a CLI, then I'd say start looking at the other DNS-01 challenge handlers / plugins.
What DNS provider are you using?
Just did a ton of cleanup and updates in this area. I'd highly recommend trying the new wildcard example and taking a look at the new
le-store-fs
cert/key store plugin, and the newle-challenge-dns
dns-01 plugin.