DNS Domain Registrars - Failed to save account : Invalid response XML : Not whitespace after PUBLIC ID in DOCTYPE

I am having trouble setting up my Namecheap account, when I enter my details and click 'create' I get the above message.

I have already whitelisted my server IP as mentioned here, https://www.virtualmin.com/node/39097, but I still have this error.

Status: 
Active

Comments

Title: DNS Domain Registrars - Failed to save account : Invalid response XML : Not whitespace after PUBLIC ID in DOCTYPE [Ln: 1, Col: 802849664 » DNS Domain Registrars - Failed to save account : Invalid response XML : Not whitespace after PUBLIC ID in DOCTYPE
Priority: Normal » Major

I've added print STDERR $out; after line 523 in /usr/libexec/webmin/virtualmin-registrar/namecheap-type-lib.pl as suggested in the other user's issue ticket stated above, (the file name is not namecheap-lib.pl, but namecheap-type-lib.pl.)

I then filled the Virtualmin Domain Registration form again and clicked Create and then looked at the subsequent error message logged at the bottom of /var/webmin/miniserv.error. It is as follows.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Bad Request</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request - Invalid Content Length</h2>
<hr><p>HTTP Error 400. There is an invalid content length or chunk length in the request.</p>
</BODY></HTML>
Error: Invalid response XML : Not whitespace after PUBLIC ID in DOCTYPE [Ln: 1, Col: 635137920]

After that I contacted Namecheap support and this is not an issue they recognise nor understand and so is not considered an issue at their end.

Are you connecting to the test or production namecheap API?

Ok, let me see if I can re-produce this error..

So I did some more testing, but was unable to re-produce this problem - adding a Namecheap account worked fine.

Maybe double-check that the login and API key you are entering is valid, and that your Namecheap account has production API access enabled.