Closed tschaffter closed 1 year ago
The new endpoint added to fetch the plot data is blocked.
Logs from the browser console on the home page:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://dev.openchallenges.io/api/v1/challengeAnalytics/challengesPerYear. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 302.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://dev.openchallenges.io/api/v1/challengeAnalytics/challengesPerYear. (Reason: CORS request did not succeed). Status code: (null).
ERROR
Object { headers: {…}, status: 0, statusText: "Unknown Error", url: "https://dev.openchallenges.io/api/v1/challengeAnalytics/challengesPerYear", ok: false, name: "HttpErrorResponse", message: "Http failure response for https://dev.openchallenges.io/api/v1/challengeAnalytics/challengesPerYear: 0 Unknown Error", error: error }
The issue was that the API gateway image was deprecated. I had to temporarily limit the number of images built and published by the CI workflow, which included the removal of the API gateway. However, the code of the API gateway changed recently to allow requests to get the plot data. The CI workflow now builds again the image of the API gateway.
Another reason that could have led to this issue could have been that the remote config was out of date. However, I remembered updated the config in both the branch test-2
(used in development) and private-preview
(used in prod) when configuring the API gateway to allow the new endpoint.
What product(s) is this feature for?
OpenChallenges
Description
Previous stack
Commit ID:
App config excerpt:
Docker images:
Update stack
Pull current commit on
main
Update app config in
apps/openchallenges/app/.env
.Remove the containers:
Remove the images:
Pull the edge images and start the stack:
New stack
Commit ID:
App config excerpt:
Docker images:
Anything else?
No response
Code of Conduct