- Symptom: The error message
ERR_HTTP2_PROTOCOL_ERROR
is displayed when attempting to access a specific API endpoint on my Netlify deployed site. - Context: The API endpoint in question is designed to return image data. The endpoint works perfectly in local development environments and during manual testing, indicating that the underlying code is sound.
- Headers: The request headers, including User-Agent, Accept, and others, appear to be correctly configured and consistent with accepted standards.
- Response Headers: I have reviewed and set relevant response headers like
Access-Control-Allow-Origin
andCache-Control
, ensuring compatibility with HTTP/2. - Debugging Attempts: I have taken several troubleshooting steps, including inspecting logs, verifying SSL/TLS configuration, reviewing Netlify settings, and confirming the correctness of the API endpoint URL.
- Testing: The API request was tested using various tools, including Postman, to rule out client-related issues.
- Other Observations: The logs on the server function indicate that there are no server errors and the image is constructed properly. The return Image buffer is exactly the same as the one in my local environment.
I have attached the failing endpoint (which should return an image) and additionally another endpoint that works just fine (that just returns a json object).
Despite these efforts, the issue persists, leading me to believe that it might be related to the server or deployment configuration on the Netlify platform. I have researched and tried potential solutions without success.
I am seeking assistance to diagnose and resolve this issue, as it is critical to the proper functioning of my site’s API interactions. Any guidance, insights, or support you can provide would be greatly appreciated.
Thank you for your attention to this matter.
Environment:
- Netlify Deployed Site: https://yaravitola.netlify.app/
- Failing API Endpoint: https://yaravitola.netlify.app/api/loboImage?feature=images&id=7&page=contact
- Working API Endpoint: https://yaravitola.netlify.app/api/loboconfig?feature=gallery
- Programming Language/Framework: Nuxt 3
- Error Screenshot: