osmosis-frontend icon indicating copy to clipboard operation
osmosis-frontend copied to clipboard

Missing COINGECKO_API_KEY in .env, yarn start => Error

Open miqart opened this issue 1 year ago • 2 comments

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'
    }
  }
}

miqart avatar Aug 31 '24 17:08 miqart

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

Haukar avatar Sep 05 '24 10:09 Haukar

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

greg-nagy avatar Oct 25 '24 07:10 greg-nagy

IIRC, this may be a key into our own CoinGecko proxy cc @niccoloraspa

jonator avatar Nov 01 '24 15:11 jonator