osmosis-frontend
osmosis-frontend copied to clipboard
Missing COINGECKO_API_KEY in .env, yarn start => Error
Collecting page data. Fetch Error. Info: {
endpoint: 'https://coingecko.osmosis.zone/api/v3/coins/list',
config: { method: 'GET', body: undefined },
status: 403,
exception: a [Error]: JSON parse error: SyntaxError: Unexpected token 'U', "Unauthorized access" is not valid JSON
at C:\Users\MiqArt\Desktop\osmosis-frontend\packages\web\.next\server\chunks\5247.js:7:445425
at Generator.throw (<anonymous>)
at r (C:\Users\MiqArt\Desktop\osmosis-frontend\packages\web\.next\server\chunks\5247.js:7:443919)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
status: 403,
data: { url: 'https://coingecko.osmosis.zone/api/v3/coins/list' },
response: Response {
status: 403,
statusText: 'Forbidden',
headers: Headers {
date: 'Sat, 31 Aug 2024 15:16:45 GMT',
'content-type': 'text/plain;charset=UTF-8',
'content-length': '19',
connection: 'keep-alive',
vary: 'Accept-Encoding',
server: 'cloudflare',
'cf-ray': '8bbdfbc8e81b0b3a-AMS'
},
body: ReadableStream { locked: true, state: 'closed', supportsBYOB: true },
bodyUsed: true,
ok: false,
redirected: false,
type: 'basic',
url: 'https://coingecko.osmosis.zone/api/v3/coins/list'
}
}
}
I think this issue is existing because there is no public Coingecko.Osmosis coins api anymore however maybe the code should be changed to take coins from the regular coingecko coins list https://api.coingecko.com/api/v3/coins/list
I don't have this issue anymore so the problem is probably solved already
it is possible to work around the issue if you still have it
- register with coingecko
- change the api endpoint to point directly to coingecko
- use yout own api key
I am not sure about the implications of this, but I could get the repo up and running with this in the past
but again: I don't see this issue anymore
IIRC, this may be a key into our own CoinGecko proxy cc @niccoloraspa