Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

CORS error when using from frontend

Open
#108 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
typescript
Domain
api, frontend

Research direction

Start with the linked minimal setup project and reproduce the failed preflight OPTIONS request in Firefox. Compare the library request with the direct fetch example in the issue, then trace the library entry point used by the frontend. Done means the frontend can make the same request without a CORS preflight failure.

Written by the indexing model from the issue text.

Description

status/cannot-reproduce

I get a CORS error (preflight OPTIONS request fails) when I try to use the library from a frontend app.

I created a minimal setup project here https://github.com/makmonty/ra-bug-min-rep

Note: I don't get the error if I do the same requests with my own implementation as such:

const result = await fetch('https://retroachievements.org/API/API_GetGame.php?y=<webApiKey>&z=<username>&i=<gameId>')
const data = await result.json()

So it's not a configuration issue at the API side.

My environment is:

Browser: Firefox 131.0
SO: Arch Linux

Dominant language
TypeScript
Stars
77
Forks
18
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RetroAchievements/api-js

All issues in RetroAchievements/api-js

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.