Open daenamkim opened 1 year ago
Interesting thing I found is that it has been passed in node 20! But I don't want to use node 20 at the moment so it would be happy to use node 18.
Any update for this? :bow:
Hi @daenamkim, apologies for the delay and thanks for the MCVE and the detailed description of the issue you're encountering. I was able to replicate the issue you mentioned, when I tried running yarn test
it fails when using Node v18, but not when using Node v16 or v20. Also, when I tried not setting a specific value for the runtime, I also encountered the same error message.
I’ll notify our team about these issues so that they can provide more context and investigate what might be causing this.
Hi daenamkim,
After investigating with aalej and lahirumaramba this is a known issue where Node's 18 defaults to ipv6 address resolution: https://github.com/node-fetch/node-fetch/issues/1624
One solution proposed in that bug is setting the following in your App:
dns.setDefaultResultOrder('ipv4first')
That will work around the issue in the short term.
The solution we've taken in the emulator suite is to use an explicit IP address like 127.0.0.1
instead of localhost. In this case I need to investigate the hostname resolution since it's not obvious at first glance where it's deriving "locahost" from.
[REQUIRED] Environment info
firebase-tools:
Platform:
[REQUIRED] Test case
See an attached file: firebase-tools-report.zip
[REQUIRED] Steps to reproduce
See an attached file: firebase-tools-report.zip
[REQUIRED] Expected behavior
Should be success (since it has been passed until node 16)
Out of curiosity, I see this when I did not put
runtime
infirebase.json
, does this mean higher than 16 is not supported? Since I have tested node 17 and 18, both did not work.[REQUIRED] Actual behavior