Bug in adding new domain
-
@girish I'm not very good in negative logic, as it's usually quite a resource intensive task for my brains, so I would just rewrite it to something more 'positive'
if (ipv4Result.length == 1 && ipv4 !== ipv4Result[0]) {do some logic}; else throw new BoxError(BoxError.EXTERNAL_ERROR, `Domain resolves to ${JSON.stringify(ipv4Result)} instead of IPv4 ${ipv4}`);
But the error message confuses me as well, as it's says that two similar things are not similar; my only idea is some weird data conversion coming from a weak JS data typing?
-
@potemkin_ai Do you think you can send me your real domain name to support@cloudron.io ? Let me test with my local unbound as to what is happening.
-
@potemkin_ai is it possible that the
ipv4Result
delivers more than one result in your case? As @girish it might be helpful to expose your real domain in question to us by sending to support@cloudron.ioOr you can put some
console.log()
traces in that code section if you want to debug this on your own a bit. -
thank you, @girish , @nebulon , it was indeed an issue on my side - the problem was caused by an automatic IP address detection confusion and the numbers were quite close, so I didn't notice that, indeed.
As a feature request, probably, it might make sense to add to the error message an offer to check an IP address auto-detection in Network settings, for the future-me-s?
-
@potemkin_ai I replied to you on support, I think what you want is https://docs.cloudron.io/networking/#ipv4 . The static or network interface configuration, if I understood your setup correctly. Whatever IP you provide here is what will be used to configure and test the DNS.
-
@girish I fixed the problem - indeed with static IP; what I'm saying, it's that it might be worth to mention a possible reason in the error message of the IPs mismatch, offering person to go and check if his IP address was auto-detected correctly.
Does it makes sense?
-
@potemkin_ai Ah got it, I think it would have helped if it said "IP xxx in DNS does not match auto-detected IP yyy". I have created an internal task for that.
-