acme.sh icon indicating copy to clipboard operation
acme.sh copied to clipboard

fix: rage4 - add error 400 and TXT cleanup

Open aorith opened this issue 1 year ago • 2 comments

The following error happens if the header is set
to 'Content-Type: application/json':

    {"statusCode":400,"message":"One or more errors occurred!",
    "errors":{"serializerErrors":["The input does not contain
    any JSON tokens. Expected the input to start with a valid
    JSON token, when isFinalBlock is true. LineNumber:
    0 | BytePositionInLine: 0."]}}

Fix TXT removal

Hello,

So currently, the rage4 API is failing because we're sending the Content-Type: application/json, also the rm function is not retrieving the id correctly from the response. This fixes both issues.

I understand that this PR won't be merged since it doesn't comply with https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Test but I do not have the time or a Rage4 account that I can use for this (but I've tested this fix at my job and it does work). Maybe someone can run the CI/CD tests.

aorith avatar Jul 05 '24 07:07 aorith

Welcome First thing: don't send PR to the master branch, please send to the dev branch instead. Please make sure you've read our DNS API Dev Guide and DNS-API-Test. Then reply on this message, otherwise, your code will not be reviewed or merged. We look forward to reviewing your Pull request shortly ✨ 注意: 必须通过了 DNS-API-Test 才会被 review. 无论是修改, 还是新加的 dns api, 都必须确保通过这个测试.

github-actions[bot] avatar Jul 05 '24 07:07 github-actions[bot]

Welcome First thing: don't send PR to the master branch, please send to the dev branch instead. Please make sure you've read our DNS API Dev Guide and DNS-API-Test. Then reply on this message, otherwise, your code will not be reviewed or merged. We look forward to reviewing your Pull request shortly ✨ 注意: 必须通过了 DNS-API-Test 才会被 review. 无论是修改, 还是新加的 dns api, 都必须确保通过这个测试.

:+1:

aorith avatar Jul 05 '24 09:07 aorith

Any chance of getting this merged? at the moment the rage4 plugin leaves a bunch of cruft around which creates problems on subsequent issuance runs.

vrachnis avatar Aug 21 '25 22:08 vrachnis

can anyone finish the dns test before it can be merged ? https://github.com/acmesh-official/acme.sh/wiki/DNS-API-Test

Neilpang avatar Aug 22 '25 02:08 Neilpang

I kicked off a dns test on a new fork off the dev branch with the changes of this PR: https://github.com/vrachnis/acme.sh/actions/runs/17163043357

Unfortunately it failed after almost 4 hours of runtime due to what seems to be a timing issue :confounded:. There seem to have been 2 concurrent issuance requests for the same certificate, and they failed due to finding the other's TXT record in DNS: first, second. You'll notice that thesecond validation was 5 seconds after the first one which i'd expect to fail since dns_rage4.sh creates records with 600 seconds TTL.

Note that the logs for the run have been deleted because they were leaking email addresses, but you can see that linux, mac, windows, freebsd, openbsd and netbsd succeeded before dragonflybsd failed. Because of this, I'm inclined to say that this failure was not related to the changes in this PR.

vrachnis avatar Aug 22 '25 23:08 vrachnis

From me in https://github.com/acmesh-official/acme.sh/issues/4306#issuecomment-3229789912

@vrachnis thanks for bringing this to my attention, I unfortunately do not use rage4 or acme.sh anymore, so I think my help might be somewhat limited. I looked at the changes in the PR and they look fine as long as they pass the test. Going to quote-post this to the PR so everyone is on the same page

SvanteRichter avatar Aug 27 '25 21:08 SvanteRichter