haxelib icon indicating copy to clipboard operation
haxelib copied to clipboard

haxlib fails to resolve with ipv6?

Open Jan69 opened this issue 1 year ago • 3 comments

after I setup ipv6 on my computer, I now get Failed with error: std@host_resolve errors trying to interact with haxelib, and, sure enough, there is no AAAA dns record set up, so ipv6 fails to resolve...
but I've even setup ipv4 to be preferred on my system...other apps prefer picking ipv4 as a result...it shouldn't even be picking ipv6 in the first place... not sure whether it should be fixed on haxelib side, or haxe's stdlib side, but I think the sensible options are either A) if either ipv4 or ipv6 fails to resolve, it should try to resolve the other one before erroring out B) just explicitly make haxelib only use ipv4 and pretend that nothing is wrong

and yes, if I manually update /etc/hosts to point to ipv4 for lib.haxe.org then it works a little bit better, but still broke...

before host file workaround:
[jan6@Teartix ~]$ haxelib update
Checking hashlink
Failed with error: std@host_resolve
Checking hxcpp
Failed with error: std@host_resolve
All libraries are up-to-date
[jan6@Teartix ~]$ 
after host file workaround:
[jan6@Teartix ~]$ haxelib update
Checking hashlink
Checking hxcpp
Update hxcpp to 4.3.2 [y/n/a] ? y
Downloading hxcpp-4,3,2.zip...
Download complete: 0.24KB in 0.3s (0.6KB/s)
Download complete: 0KB in 0s (0KB/s)
Failed to download https://lib.haxe.org:443/files/3.0/hxcpp-4,3,2.zip. (1/3)
std@host_resolve
Download complete: 0.24KB in 0.2s (0.9KB/s)
Download complete: 0KB in 0s (0KB/s)
Failed to download https://lib.haxe.org:443/files/3.0/hxcpp-4,3,2.zip. (2/3)
std@host_resolve
Download complete: 0.24KB in 0.3s (0.6KB/s)
Download complete: 0KB in 0s (0KB/s)
Failed to download https://lib.haxe.org:443/files/3.0/hxcpp-4,3,2.zip. (3/3)
std@host_resolve
Error: [file_open,/usr/share/haxe/lib/hxcpp-4,3,2.zip]
[jan6@Teartix ~]$ 

for some reason, I need to ALSO override haxelib-files.haxe.org to ipv4 in my hosts file, DESPITE it having an ipv6 address that works just fine via curl??? if I do that, then it works, but, y'know, it's very fragile, having manual overrides

(using haxelib 4.1.0 and haxe 4.3.6 of course)

Jan69 avatar Nov 09 '24 15:11 Jan69

weirdly enough haxelib source has a giveErrorString() which is SUPPOSED to handle the error and give a more human-friendly message, but that isn't triggered?

I'm on an Arch-based distro

Jan69 avatar Nov 09 '24 15:11 Jan69

still an issue, without manual host-patching overrides, haxelib just doesn't work, and it's really ugly to manually setup overrides like this... also the -R to set remote to the IP, does not work because it doesn't get the correct certificate, because it doesn't ask for lib.haxe.org, but the raw IP, so it gets the default fake kubernetes cert (and wouldn't help much because haxelib-files.haxe.org would still be broken, so even if it was able to then get the metadata, it wouldn't be able to actually download the packages)

Jan69 avatar Mar 14 '25 19:03 Jan69

I think this may be something that will require some work in haxe/neko (or potentially whatever target haxelib is migrated to) to solve: https://github.com/HaxeFoundation/haxe/issues/3122

tobil4sk avatar Mar 16 '25 00:03 tobil4sk