chitoku-k / chitoku.jp

My blog and porfolio built with Gatsby

Home Page:https://chitoku.jp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update `gatsby-plugin-algolia` to 1.x

chitoku-k opened this issue · comments

Having been tried to update gatsby-plugin-algolia to v1.0.2, it always fails with the following error:

Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.

I checked the following and tried migration (#4190 and #4197) with no luck:

  • The id field is already present
  • The internal { contentDigest } field has been included
  • Extended timeouts
  • Disabled concurrentQueries
  • Decreased chunkSize to 256

Turns out that gatsby-plugin-algolia v1.x requires a proper application ID to be set on CI!

warn failed to index to Algolia

 ERROR  UNKNOWN

{
  name: 'RetryError',
  message: 'Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.',
  transporterStackTrace: [
    {
      request: {
        data: undefined,
        headers: {
          'x-algolia-api-key': '*****',
          'x-algolia-application-id': '0000000000',
          'content-type': 'application/x-www-form-urlencoded'
        },
        method: 'GET',
        url: 'https://0000000000-dsn.algolia.net/1/indexes/index/settings?x-algolia-agent=Algolia%20for%20JavaScript%20(4.14.3)%3B%20Node.js%20(19.3.0)&getVersion=2',
        connectTimeout: 1,
        responseTimeout: 30
      },
      response: {
        status: 0,
        content: 'getaddrinfo ENOTFOUND 0000000000-dsn.algolia.net',
        isTimedOut: false
      },
      host: {
        protocol: 'https',
        url: '0000000000-dsn.algolia.net',
        accept: 1
      },
      triesLeft: 3
    },
    {
      request: {
        data: undefined,
        headers: {
          'x-algolia-api-key': '*****',
          'x-algolia-application-id': '0000000000',
          'content-type': 'application/x-www-form-urlencoded'
        },
        method: 'GET',
        url: 'https://0000000000-3.algolianet.com/1/indexes/index/settings?x-algolia-agent=Algolia%20for%20JavaScript%20(4.14.3)%3B%20Node.js%20(19.3.0)&getVersion=2',
        connectTimeout: 1,
        responseTimeout: 30
      },
      response: {
        status: 0,
        content: 'getaddrinfo ENOTFOUND 0000000000-3.algolianet.com',
        isTimedOut: false
      },
      host: {
        protocol: 'https',
        url: '0000000000-3.algolianet.com',
        accept: 3
      },
      triesLeft: 2
    },
    {
      request: {
        data: undefined,
        headers: {
          'x-algolia-api-key': '*****',
          'x-algolia-application-id': '0000000000',
          'content-type': 'application/x-www-form-urlencoded'
        },
        method: 'GET',
        url: 'https://0000000000-1.algolianet.com/1/indexes/index/settings?x-algolia-agent=Algolia%20for%20JavaScript%20(4.14.3)%3B%20Node.js%20(19.3.0)&getVersion=2',
        connectTimeout: 1,
        responseTimeout: 30
      },
      response: {
        status: 0,
        content: 'getaddrinfo ENOTFOUND 0000000000-1.algolianet.com',
        isTimedOut: false
      },
      host: {
        protocol: 'https',
        url: '0000000000-1.algolianet.com',
        accept: 3
      },
      triesLeft: 1
    },
    {
      request: {
        data: undefined,
        headers: {
          'x-algolia-api-key': '*****',
          'x-algolia-application-id': '0000000000',
          'content-type': 'application/x-www-form-urlencoded'
        },
        method: 'GET',
        url: 'https://0000000000-2.algolianet.com/1/indexes/index/settings?x-algolia-agent=Algolia%20for%20JavaScript%20(4.14.3)%3B%20Node.js%20(19.3.0)&getVersion=2',
        connectTimeout: 1,
        responseTimeout: 30
      },
      response: {
        status: 0,
        content: 'getaddrinfo ENOTFOUND 0000000000-2.algolianet.com',
        isTimedOut: false
      },
      host: {
        protocol: 'https',
        url: '0000000000-2.algolianet.com',
        accept: 3
      },
      triesLeft: 0
    }
  ]
}

success index to Algolia - 0.300s - Getting existing objects