2

I am getting occasional errors with a Google Apps Script trying to request a URL and failing with Address unavailable:. The errors are reported in the Google Log viewer.

However:

  1. I do not see any errors in application logs.
  2. I do not even see the requests being made in the application logs.
  3. If you try to repeat the fetch (run the Google forms script again) it will succeed.
  4. If I try to fetch the URL myself it works fine.

Questions:

  1. Is it possible Google itself is having issues fetching URLs? Seems utterly unlikely and almost certainly me, but, I'm curious.
  2. Should I just do the fetch in a try catch block and just retry X times until it succeeds?
  3. I couldn't find docs on what "address unavailable" actually means, does it mean the server cannot be found?

To be clear, most requests are processed fine, just seeing weird periodic issues which go away if you retry.

Open issue in Google

This is actually described in an open issue https://issuetracker.google.com/issues/64235231 and seems to be exactly what I have been experiencing, even down to the month we first saw the issue.

patrickdavey
  • 1,966
  • 2
  • 18
  • 25
  • 2
    When I read your question, at first, I thought that the error might be due to the IP address. For example, the server side restricts the range of IP address and when `fetch` is run several times, the IP address of out of range works. Or,. as a test case, when `fetch` is used by the script editor and custom function, it seems that the request is different. [Ref](https://stackoverflow.com/q/63024346/7108653) Using this, when you test it, what result will you get? But this is just my guess. I'm not sure whether this is the direction you expect. I apologize for this. – Tanaike Aug 25 '20 at 08:33
  • Well, I don't think ipv6 is the issue, I mean, the thing is simply that periodically the fetching will fail with that "Address Unavailable" error, and then it'll work the second time. It doesn't happen all the time (like, it's not reliably reproducible) – patrickdavey Aug 25 '20 at 09:18
  • 3
    Tanaike is saying Google uses different ips to communicate to your server. Your server blocks one or more of these Google owned ips causing the address unavailable error. – TheMaster Aug 25 '20 at 10:38
  • @patrickdavey I am seeing the same issue, just recently over the past week. Fetch calls that were normally working for years are now intermittently failing with “Address unavailable:”. In our case the target is ConnectWise APIs, but they're stating it isn't on their side. – Mike Aug 25 '20 at 15:05
  • Ah, sorry for not understaning @Tanaike - thanks for the clarification TheMaster. There's certainly no intentional blocking of IP addresses going on at the server level (at least, not that I'm aware of). – patrickdavey Aug 25 '20 at 20:14
  • @TheMaster Thank you for your always support. – Tanaike Aug 25 '20 at 23:04
  • Thank you for replying. I apologize that my comment was not the direct solution of your issue. – Tanaike Aug 25 '20 at 23:04

0 Answers0