Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JavaScript HTTP 0 Error in Label Studio When Accessing Cross-Domain API #6838

Open
SabolSocare opened this issue Jan 2, 2025 · 1 comment

Comments

@SabolSocare
Copy link

Hi Label Studio Community,

I'm encountering a CORS-related issue while using Label Studio. Whenever I try to make an API call to a server on another domain, I get the following error:

"Oh no! JavaScript returned an HTTP 0 error. One common reason this might happen is that you requested a cross-domain resource from a server that did not include the appropriate CORS headers in the response. Better open up your Firebug..."

Here’s what I’ve tried so far:

Verified that the target API is running and accessible directly via a browser.
Checked my front-end JavaScript, and the API request is formatted correctly.
Attempted to modify the CORS settings on the API server but still encounter this issue.

Image (10)-1

Environment Details:

Label Studio version: 1.14.1
Frontend framework: React
Question:
How can I configure Label Studio or the API server to properly handle cross-origin requests? Are there any Label Studio-specific settings I might be missing to address this error?

Any guidance or suggestions would be greatly appreciated. Thank you!

@106firestarter
Copy link

I'm also having some issues with the xhr requests with presigned urls on the labeling interface. however, i am able to load the media audio urls on the project menu, just not on the labeling interface it self.

running on 1.15.0 and if I downgrade to 1.13.1 there are no issues, so should be something related with django update or the CSRF checks from 1.14.x version. Also, got CORS correctly setup on my GCR bucket as well.

I tried disabling the CSRF checks, I have the correct envs defined and even tried some other work-arounds with the envs but nothing seems to be working.

Don't know if it is completely related with the issue firstly mentioned but it does actually seem similar but im sorry if it's not !

thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants