Trying to migrate some resources from Cloud functions to App Engine.
Problem: When I send a request from another Nodejs server to app deployed to App Engine,
await axios.get("https://project-id.uc.r.appspot.com/hey")
it gives error:
(node:13088) UnhandledPromiseRejectionWarning: Error: getaddrinfo ENOTFOUND
project-id.uc.r.appspot.com project-id.uc.r.appspot.com:443
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
What I've tried and verified:
- Requests from Nodejs -> App Engine fail
- Requests from Browser -> App Engine pass
- Replaced Axios with node-fetch, still same error.
Update:
Everything seems to be working as expected when I connected custom domain name.
A problem with Nodejs not being able to resolve "x.y.z.appspot.com" domain? Kinda sus.