Apicurio/apicurio-studio

1.0.0.Beta1 not working in local containers

Opened this issue · 3 comments

Running https://www.apicur.io/studio/getting-started/ in Podman Desktop on Windows, the UI shows

Error: Something went wrong!

Something went wrong with the action you attempted, but we're not sure what it was. Try reloading the page and hopef for a better result, or contact your admin to report the error.

And if I ignore that and try importing an existing API from URL, after retrieving the document and clicking the Import button, I see a dialog with the following error

{
    "message": "Network Error",
    "status": 500
}

No errors show in either container's logs, although the non-ui container has this warning:

2024-08-16 21:08:52 WARN [null] (main) Unrecognized configuration key "quarkus.oidc.client-secret" was provided; it will be ignored; verify that the dependency extension for this configuration is set or that you did not make a typo

Error shows up in javascript console

Access to XMLHttpRequest at 'http://localhost:8080/apis/studio/v1/system/uiConfig' from origin 'http://127.0.0.1:8888' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

This is disappointing to learn. I thought that the default settings for both container images resulted in a successful integration between the two.

But it sounds like the API container needs to be configured to be more CORS permissive. This can easily be done by setting the appropriate quarkus environment variable.

You can find relevant documentation here: https://quarkus.io/guides/security-cors

You can either set the value of allowed origins to be a specific one or you can use *.