Rest API: TypeError: Failed to fetch

Hi

We have recently been getting some errors in various integrations via the REST API, and haven’t found a real good explanation. E.g. when querying the /API/Projects/ endpoint, we get a 404 Error “TypeError: Failed to fetch”. When using Swagger, we get “TypeError: Failed to fetch”. These are existing integrations, that have been working for year.
Facts:

  • Octopus Server v2020.6.4722
  • Authentication seems ok and correct headers are added (seen in Fiddler)
  • API key is generated from a valid user and is not expired. It’s also a member of the relevant teams.
  • All endpoints fail both in Swagger and e.g. Postman/Powershell

We will patch tomorrow morning, but looking at the changes from 4722 to lastest, I do no see this issue mentioned.

Any input is greatly appreciated.

Hi Jasper,

Thank you for reaching out to us with your query.

We’re not aware of any issues with Octopus Server itself that would cause this error, so it sounds like it might be something to do with how the server that is hosting Octopus Deploy is configured.

Could you please advise on the following so we can investigate further?

  • Can you provide a full example of an API request that did work but now isn’t?
  • Does the rest of the web interface work as expected (useful to know as it is also driven by the API)?
  • Where is the server hosted? e.g. on a physical server, on a VM, in docker, on a cloud platform etc
  • Did the errors start at the same time as any known upgrades to Octopus Deploy?
  • Did the errors start at the same time as any changes made to the server?
  • Have any changes recently been made to security software on the server?
  • Is the server hosting anything other than Octopus Deploy?

Please let me know if you have any questions.

Best Regards,

Charles

Hi Charles,

So we patched from 2020.6.4722 to latest and the problem went away. To follow up on your questions for future readers:

  • It’s basically just GET /api/projects/DMS with the X-Octopus-Apikey header.
  • Yes no problem with the web interface - we have 300+ projects and 50-75 using it on a daily basis including myself. No problem what-so-ever.
  • Hosted on-premise on a VM (Vmware) and only hosts OD
  • Yes, I would imagine the problem has starter after a upgrade. The particular pipeline where we identified the error, runs every week. Seems to correlate to an update
  • To our knowledge, we could not identity any other changes to the server (patches, security updates etc), that correlates to this error.

Hi Jasper,

Thank you for letting me know.

I’m pleased to hear that this appears to be resolved. It’s possible that something went awry in a previous upgrade that has subsequently been corrected by a later upgrade.

Please let me know if it happens again or if you have any questions.

Best Regards,

Charles

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.