Error: Could not reach Algolia's Crawler, got: Forbidden {}

The algolia-netlify plugin has been failing for me. I have the ALGOLIA_API_KEY and ALGOLIA_BASE_URL set in the environment variable. I also set NETLIFY_BUILD_DEBUG to get more logs. Here’s the logs I am seeing.

8:25:46 PM:   3. @algolia/netlify-plugin-crawler (onSuccess event)          
8:25:46 PM: ────────────────────────────────────────────────────────────────
8:25:46 PM: ​
8:25:46 PM: Step starting.
8:25:46 PM: Step started.
8:25:46 PM: Plugin logic started.
8:25:46 PM: Algolia Netlify plugin started
8:25:46 PM: Sending request to crawl https://crawler.algolia.com/api/1/netlify/crawl
8:25:46 PM: {"branch":"master","siteName":"gaeblog","deployPrimeUrl":"https://63b6512982df561ea66d5714--gaeblog.netlify.app","version":"1.0.0"}
8:25:46 PM: Response {
8:25:46 PM:   size: 0,
8:25:46 PM:   timeout: 0,
8:25:46 PM:   [Symbol(Body internals)]: {
8:25:46 PM:     body: PassThrough {
8:25:46 PM:       _readableState: [ReadableState],
8:25:46 PM:       _events: [Object: null prototype],
8:25:46 PM:       _eventsCount: 5,
8:25:46 PM:       _maxListeners: undefined,
8:25:46 PM:       _writableState: [WritableState],
8:25:46 PM:       allowHalfOpen: true,
8:25:46 PM:       [Symbol(kCapture)]: false,
8:25:46 PM:       [Symbol(kCallback)]: null
8:25:46 PM:     },
8:25:46 PM:     disturbed: false,
8:25:46 PM:     error: null
8:25:46 PM:   },
8:25:46 PM:   [Symbol(Response internals)]: {
8:25:46 PM:     url: 'https://crawler.algolia.com/api/1/netlify/crawl',
8:25:46 PM:     status: 403,
8:25:46 PM:     statusText: 'Forbidden',
8:25:46 PM:     headers: Headers { [Symbol(map)]: [Object: null prototype] },
8:25:46 PM:     counter: 0
8:25:46 PM:   }
8:25:46 PM: }
8:25:46 PM: Could not reach algolia Error: Forbidden {}
8:25:46 PM:     at onSuccess (/opt/build/repo/.netlify/plugins/node_modules/@algolia/netlify-plugin-crawler/dist/index.js:107:19)
8:25:46 PM:     at processTicksAndRejections (node:internal/process/task_queues:96:5)
8:25:46 PM:     at async Object.run (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/child/run.js:14:5)
8:25:46 PM:     at async handleEvent (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/child/main.js:28:42)
8:25:46 PM:     at async process.<anonymous> (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/ipc.js:91:24)
8:25:46 PM: Step erroring.
8:25:46 PM: Error: Could not reach Algolia's Crawler, got: Forbidden {}
    at onSuccess (/opt/build/repo/.netlify/plugins/node_modules/@algolia/netlify-plugin-crawler/dist/index.js:112:21)
8:25:46 PM:     at processTicksAndRejections (node:internal/process/task_queues:96:5)
8:25:46 PM:     at async Object.run (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/child/run.js:14:5)
8:25:46 PM:     at async handleEvent (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/child/main.js:28:42)
8:25:46 PM:     at async process.<anonymous> (file:///opt/buildhome/node-deps/node_modules/@netlify/build/lib/plugins/ipc.js:91:24)
8:25:46 PM: Step completed.

Hello!

You can find more information on this issue over on GitHub for the plugin: Error: Could not reach Algolia's Crawler, got: Forbidden {} · Issue #844 · algolia/algoliasearch-netlify · GitHub

This should help answer any questions you have! Thanks!

Thanks for the pointer! Seems from the thread that it should be working right now. Is there any updates I need to do? I retried my build just now but still getting the same error.

@royxagain Are there any Algolia variables on this page? If not, you can re-add them or re-install the plugin to set it back up again.

Let me know, happy to help further. Thanks!

Thanks! I’ve cleaned up everything and re-install them and now they worked!

2 Likes