I’ve been facing a very strange bug for weeks. I have tried everything to find the cause with no success, as it seems to be completely random. I’m sending requests in a loop, each containing an average of about ten images passed through URLs. And every few requests, I receive an “invalid_image” error.
However, when I debug this request by resending it in isolation, Vision analyzes the images that were supposed to be invalid perfectly. So nothing is due to the images, format images, resolution images, type of link, hosting links…
What’s worse, I’ve set up a retry system, which, when I receive an “invalid_image” error, resends the same request, resulting in about 95% success rate on the second attempt.
Here are all the solution ideas I have tested, which had no positive or negative impact on this bug.
- A throttle of x seconds, to try to space out the requests.
- Testing different quantities of image links and even a batching system to send a maximum number of images (8 by requests, for example).