Algolisted-Org / AlgoListed

Algolisted is an AI-powered platform dedicated to assisting computer science students in preparing for placements and internships. Our services include tracking and analytics across various platforms and topics.
http://algolisted.com
Other
164 stars 99 forks source link

Privacy Badger plugin causes a CORS error in Coding Competitions page #64

Open JordanAdair opened 1 year ago

JordanAdair commented 1 year ago

When I try to access the "Coding Competitions" tab I get an infinitely loading screen alongside these error messages:

fb5a2c656e99526fa53e150d2914173b

I tried it on a few different branches and IDEs but I still get the same result.

Looks like a CORS issue.

According to Google, to fix this error, you can try the following steps:

  1. Check if the server is configured to allow CORS requests: Make sure that the server at the URL https://script.google.com/macros/s/AKfycbzXyVH1o6CzzJUfLN0qC-EscTKQeKouAUlU3oBs_S85WvB13wPHuawZLK43QJrqBua3Ng/exec is configured to allow cross-origin requests. If the server is not configured to allow CORS requests, you will need to contact the server administrator and ask them to enable CORS.
  2. Use a CORS proxy: If the server is not configured to allow CORS requests, you can try using a CORS proxy to make the request. A CORS proxy is a server that acts as an intermediary between your client and the server, adding the necessary CORS headers to the response.
  3. Use the no-cors mode: If you are making a request using the fetch() function, you can try using the no-cors mode by setting the mode option to 'no-cors'. This will prevent the browser from blocking the request, but it will also prevent you from reading the response from the server.

Okay I disabled Privacy Badger and it fixed the issue. We might want to look into addressing this, though. Privacy Badger is an extremely commonly used extension.

Originally posted by @JordanAdair in https://github.com/Nayaker/AlgoListed/issues/61#issuecomment-1368272203