Comments (10)
Thanks for all the feedback and research here folks. An updated version (1.2.4
) has been published with the PR from @ajuanjojjj which should resolve this issue. 🎉
from acme-dns-01-cloudflare.
Thank you @ajuanjojjj, it fixed the issue in my case
from acme-dns-01-cloudflare.
Thanks for the report. I'm unable to replicate this myself in any of our projects, but looking at the code at https://git.rootprojects.org/root/greenlock.js/src/branch/master/plugins.js#L12-L26, seems to indicate that P_loadHelper
is somehow being passed undefined
, which is then causing require()
to be passed undefined
too, triggering this error.
https://git.rootprojects.org/root/greenlock.js/issues/35 seems to be a related issue. Try tweaking the packageRoot
, configDir
, store.basePath
, etc. directories - I expect it's related to that.
from acme-dns-01-cloudflare.
I'm able to replicate it, using "acme-dns-01-cloudflare": "^1.2.3" and "greenlock": "^4.0.4". However, the "The "id" argument must be of type string. Received undefined" is not the end of the story, but just the error on the first run.
Deleting the config folder causes it to happen again, but if the error is thrown and then node ran again, it'll throw
Fatal error during greenlock init: bad challenge dns-01 module config{"options":{"token":"\\hidden\\","verifyPropagation":true,"verbose":true},"client":{},"propagationDelay":0}
Server.js content:
const acmeDnsCloudflare = require("acme-dns-01-cloudflare");
const cloudflareDns01 = new acmeDnsCloudflare({
token: "\\HIDDEN\\",
verifyPropagation: true,
verbose: true // log propagation delays and other debug information
});
const Greenlock = require("greenlock");
const pkg = require("./package.json");
const greenlock = Greenlock.create({
packageAgent: pkg.name + "/" + pkg.version,
configDir: "./store",
packageRoot: __dirname,
maintainerEmail: "[email protected]"
});
greenlock.manager.defaults({
agreeToTerms: true,
subscriberEmail: "[email protected]",
store: {
module: "greenlock-store-fs",
basePath: "./store/certs"
},
challenges: {
"dns-01": cloudflareDns01
}
});
greenlock.add({
"subject": "\\HIDDEN\\",
"altnames": [
"\\HIDDEN\\",
"\\HIDDEN\\"
]
}).then(function () {
console.log("SUCCESS");
}).catch(console.error);
EDIT:
Adding "module": "acme-dns-01-cloudflare"
manually to config.json:defaults.challenges
also brings you back to the The "id" argument must be of type string. Received undefined
error
from acme-dns-01-cloudflare.
Oh, and better not to abuse the tests, since you might hit the rate limit for your IP: https://letsencrypt.org/docs/rate-limits/
Guess how I found out (:
from acme-dns-01-cloudflare.
After quite the evening of debugging, I think ive found where some of the (multiple) issues fall, although i'm not familiar with how the module works, so feel free to correct me where i'm wrong
index.js:57:
- Missing a
this.module = "acme-dns-01-cloudflare";
declaration - The
cloudflare
class is not being saved correctly in the config.json file (JSON.stringify or something like that failing). Fixed by refactoringthis.client
tothis.cloudflareClient
and adding an extrathis.client
without thecloudflare
prototype. - The
client
data may be fed viaoptions.token
(server.js) oroptions.client?.token
(config.json), so you have to check for both
Doing all of this seems to have fixed the issue, although more testing would be nice (I'm not completly sure i've not bypassed any extra errors while debugging)
from acme-dns-01-cloudflare.
Same problem here @ajuanjojjj , do you have a public repo to check your changes?
from acme-dns-01-cloudflare.
Same problem here @ajuanjojjj , do you have a public repo to check your changes?
Just pushed a PR that fixed it for me, feel free to check it out :D
from acme-dns-01-cloudflare.
Wow, that worked @ajuanjojjj great work
I just copy / paste the node_modules/index.js with this content:
https://github.com/ajuanjojjj/acme-dns-01-cloudflare/blob/master/index.js.
@Cherry can we accept this please
from acme-dns-01-cloudflare.
Wow, that worked @ajuanjojjj great work
I just copy / paste the node_modules/index.js with this content:
https://github.com/ajuanjojjj/acme-dns-01-cloudflare/blob/master/index.js.@Cherry can we accept this please
The PR is already linked, we just need to fix some minor stuff and it will be added on the next release!
(Also, if you find the module useful, please star it so it gets more traction and hopefully more people help tweaking/fixing it :D)
from acme-dns-01-cloudflare.
Related Issues (14)
- Fails to resolve challenge when requesting wildcard of subdomain HOT 22
- Promise.reject() should take Error instead of string HOT 5
- HTTPError: Response code 400 (Bad Request) HOT 5
- Example / Greenlock broken HOT 4
- Over-eager zone matching HOT 3
- Log errors when applying for certificates (Cloudflare) HOT 3
- Update README with ACME.js example HOT 1
- Using with Greenlock-Express HOT 1
- Add CI pipeline for testing (GitHub Actions) HOT 5
- Action required: Greenkeeper could not be activated 🚨 HOT 2
- [Bug ?] doesn't seem to ever be able to perform domain validation HOT 2
- API Token requires access to all zones on account HOT 8
- Propagation delay issues HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from acme-dns-01-cloudflare.