Invalid response XML when adding Namecheap as domain registrar

Good morning,

I am attempting to set up Namecheap as a registrar using the DNS Domain Registrars module on the latest (5.04) version of Virtualmin. When I attempt to do so, however, I get the following error from Virtualmin:

Failed to save account : Invalid response XML : Not whitespace after PUBLIC ID in DOCTYPE [Ln: 1, Col: 879670848]

I have correctly turned on API access in Namecheap and am connecting to the production API with the correct account username and API key (I double-checked). I also tried adding the debug line in /usr/libexec/webmin/virtualmin-register/namecheap-type-lib.pl file as suggested by other issues on this site but that doesn't show me any actual output in /var/webmin/miniserv.error other than the error message I was already receiving.

How can I solve this problem? Also, in the "Copy contacts from domain" field, do I have to put in a domain name I have already registered with Namecheap (in which case I'd have to actuallyr egister one manually first because my Namecheap account is new), or can I use a virtual server's domain name already on my Virtualmin system?

Thanks!

Status: 
Closed (fixed)

Comments

I'm not seeing this error myself when adding a Namecheap account.

Are you sure your IP is whitelisted in the Namecheap console, under Profiles -> Tools?

Yes. I whitelisted both my Virtualmin IP address and the IP address of the load balancer (that Virtualmin is behind), just in case. But no matter how many times I try and re-enter my API key and all that, I still get the same error message. There are no domains currently in my Namecheap account; could that be the problem? Also what then do I enter in the "Copy contacts from domain" field? (There are already virtual servers on my system) Thanks!

So we've fixed a few bugs in the registrar module recently - I can send you an updated RPM that may solve this problem if you'd like to try it?

Unfortunately we weren't able to re-produce it in testing..

Yeah, that would be great, I'll definitely try the RPM. Unfortunately the only error I get is the one I posted so I don't know if there is a more specific error message available. I would also be willing to give you access to the server so you can check out the issue yourself if the RPM you send doesn't solve the problem.

Also, the documentation for "Copy contacts from domain" doesn't really seem to exist...what should I put there? Might that be causing the problem as the domain name I put there is hosted on our Virtualmin system already, but registered through GoDaddy instead of Namecheap (as the Namecheap account is new)?

Thanks!

The "copy contacts from domain" field is for entering an existing domain that you have with Namecheap to copy the contact information from for any new domains you create. Unfortunately their API requires that contact details be provided for any new domains, but it isn't practical for Virtualmin to prompt for this at domain creation time.

Do you have any existing domain to copy from?

Unfortunately, I don't have any existing domains in Namecheap. Should I register one, updated the "Copy contacts from domain" field, and then try adding the registrar again?

Yes, give that a try.

I just registered the domain allhereminimart.com to my Namecheap account and put it in Virtualmin's "Copy contacts from domain" field but still get the exact same error message as before. :(

Ok, I've emailed you the latest development version of the virtualmin registrar plugin in RPM format - please give that a try.

I just tried the RPM you sent and I was able to add Namecheap as a registrar without any issues. I'm not sure what exactly fixed the issue but I guess the development version works. Thanks so much for this fix and I hope it's included in the next GA Virtualmin update! :)

Awesome! We'll release that new version to other users.

Status: Active ยป Fixed

I am having the same issue on a new install, it works on an existing install I plan on migrating everything from. I checked and see that I have the following installed, is this the "newer" version that "may" fix the problem?

webmin-virtualmin-registrar/stable,now 2.2 all [installed] Webmin module for 'Virtualmin Domain Registration'

You actually want version 2.3. Perhaps Jamie can e-mail you the RPM?

Yeah this one has an old problem, content length, I already knew about that I hacked in my live server:

Bad Request

Bad Request - Invalid Content Length

HTTP Error 400. There is an invalid content length or chunk length in the request.

Which file did you make that change in?