Error getting project name: FetchError: invalid json response body

I’m getting the following error when initializing my pinecone client:

PineconeClient: Error getting project name: FetchError: invalid json response body at https://controller.asia-northeast1-gcp.pinecone.io/actions/whoami reason: Unexpected token A in JSON at position 0

I’m using the node pinecone client as follows:

 this.pinecone = new PineconeClient()
    this.pinecone.init({
      apiKey: process.env.PINECONE_API_KEY,
      environment: 'asia-northeast1-gcp'
    }).then(()=>console.log('pinecone initialized'))
    .catch(err=>console.log('Error connecting to pinecone:', err))

@bolek - thanks for your input. We have updated the client (0.0.14) to produce a more helpful error message to help track down the reason for this failure. Could you please upgrade to the latest version and provide the error that you’re seeing?

I’m also getting this error with “asia-northeast1-gcp.”

I’m using a Vercel Edge Function without the client library (which doesn’t seem to work with edge functions).

Seems like it’s not returning proper JSON for both query, and fetch endpoints.

First, my apologies, looks like my environment was incorrect. It’s working now with both @pinecone-database/pinecone v0.0.12 and v0.0.14.
Now, regarding testing your client update in v0.0.14. When I deliberately specify an invalid API key, I’m still getting the same (unhelpful) error message regardless which client version I’m using.