Integrated algolia plugin via netlify and resulted in successful build but the build status has ['hung'/remained] at 'building' within netlify dashboard

So I followed all the onscreen prompts ( A great UX), placed the front-end code on my site and pushed code to bitbucket repo for fresh deployment.

The site was successfully built but the build status remained at ‘building’ and has been like that for over 30mins. I initiated a second deploy and build and the same thing happened.

I got a prompt inside netlify dashboard (for deploy) that crawler was crawling and had a url. so i visited that were it tells me in ‘Monitoring tab’ that I have 1 success and 1 ignored. the success was the sitemap.xml and the other was Ignored Extraction Canonical URL - Not processed.
For which it uses the netlify domain rather than the custom domain (maybe this is issue?)

Anyways the index is sitting empty and if i visit my agolia dashboard I see I have a list of 4 ‘to dos’ one of which is build index. As i understood this was all supposed to be automated so i don’t want to go ahead and do anything for now.
So i appreciate this is beta and so take this as a bug report. If i can do anything else to help let me know
If needs be I can just remove all the agolia stuff if i need to make any updates to site, but happy to help you debug until then
Dave

Hello @daveharrisonnet,

We are aware of issue with canonical url, a fix is pending, hopefully very soon in production.
See relate github issue: https://github.com/algolia/algoliasearch-netlify/issues/73

In the meantime, what I can tell you is that the Plugin is not blocking the Netlify build.
We are using the onSuccess hook which is trigger after the site is deployed.
Maybe you can share your public deploy log (or contact support@algolia.com if it’s private)
so we can clarify if the issue is coming from the plugin or not.

Thanks a lot for your feedback and patience,
We’ll ping you when the fix is deployed.

Best Regards

Samuel

thanks for the update. I think it might be best for me not to uninstall the plugin as judging by another thread in this forum it might be troublesome to reinstall on same site? If the fix is imminent i should be Ok to wait.

With regard my ‘hanging’ build yes it is very weird because the log reports that the build was successful but the deploy itself is still tagged as building and not published as i would expect and the new deploy I can confirm is not live.

here is relevant part of log, which just shows everything is OK but yet it isn’t! lol

10:38:15 PM: Project built successfully.

10:38:15 PM: ​

10:38:15 PM: (build.command completed in 21.4s)

10:38:15 PM: ​

10:38:15 PM: ┌───────────────────────────────────────────────────────────┐

10:38:15 PM: │ 2. onSuccess command from @algolia/netlify-plugin-crawler │

10:38:15 PM: └───────────────────────────────────────────────────────────┘

10:38:15 PM: ​

10:38:15 PM: Algolia Netlify plugin started

10:38:15 PM: Sending request to crawl https://crawler.algolia.com/api/1/netlify/crawl

10:38:16 PM: API answered: 200

10:38:16 PM: Your crawler is running at: https://crawler.algolia.com/admin/user_configs/fba92b63-1b3e-46e2-8f4f-0ccde4d9f13d

10:38:16 PM: Done.

10:38:16 PM: ​

10:38:16 PM: (@algolia/netlify-plugin-crawler onSuccess completed in 755ms)

10:38:16 PM: ​

10:38:16 PM: ┌─────────────────────────────┐

10:38:16 PM: │ Netlify Build Complete │

10:38:16 PM: └─────────────────────────────┘

10:38:16 PM: ​

10:38:16 PM: (Netlify Build completed in 22.6s)

10:38:16 PM: Caching artifacts

10:38:16 PM: Started saving ruby gems

10:38:16 PM: Finished saving ruby gems

10:38:16 PM: Started saving build plugins

10:38:16 PM: Finished saving build plugins

10:38:16 PM: Started saving pip cache

10:38:17 PM: Finished saving pip cache

10:38:17 PM: Started saving emacs cask dependencies

10:38:17 PM: Finished saving emacs cask dependencies

10:38:17 PM: Started saving maven dependencies

10:38:17 PM: Finished saving maven dependencies

10:38:17 PM: Started saving boot dependencies

10:38:17 PM: Finished saving boot dependencies

10:38:17 PM: Started saving go dependencies

10:38:19 PM: Finished saving go dependencies

10:38:19 PM: Build script success

10:39:06 PM: Finished processing build request in 1m40.387568556s

I suspect some process has started, in my case ‘the indexing’ of the site perhaps (that based on my agolia dashboard did not complete), that has not reported its completion to netlify build process and therefore while the site build happened OK the ‘total build’ including all sub processes (your plugin?) did not finish and so my deploy did not get published? just my thoughts

I can reproduce the issue on my end.
This is indeed very strange, as everything seems to be running properly.
The crawl itself is run on our backend and should absolutely not block your deploy.
we are investigating and will report as soon as possible.

Sorry for the inconvenience

1 Like

We have reached out to Netlify, we believe the issue is on their end.
You can look at the opened github issue here: https://github.com/netlify/build/issues/1973

We’ll reach out again when fixed :relaxed:

Netlify fixed the issue,
you just have to trigger a new deploy to solve the issue :relaxed:

Have a great day

@samuel.bodin thanks buddy all looking good so far
Can you point me in the direction of some docs re; implementing on site
Do i need to include instantsearch.js etc or is this functionilty all bundled in with netlify plugin?
I just need a quick way to get the search onto my homepage to test it then i can refine later

Hi @daveharrisonnet
I’m Eunjae, from InstantSearch team.
Indeed the fastest and the best way to get started with your search UI/UX is to use InstantSearch.

This is a basic example showing you a couple of widgets and how they work together.
If you prefer you can use React InstantSearch, Vue InstantSearch or Angular InstantSearch.

This is a getting started guide.

I’m sending you only two links not to overwhelm you.
Feel free to ask me if you have any question or more guides :slight_smile:

Hi @daveharrisonnet, indeed InstantSearch is the way to go to build a complete and custom search experience. However, to start quickly and have a searchbox on your site in no time, we have packaged a lightweight UI that you can install on your site by copying a few lines of code: https://github.com/algolia/algoliasearch-netlify#installing-the-front-end-bundle

2 Likes

Am i missing something obvious? I have added that frontend bundle but no search appears. I am wondering where on the page the search would appear? and/or how I hook it to my markup

Is instantsearch js and css in addition to netlify algolia plugin js and css or does the netlify plugin expose all the same frontend functionality?

Dave

By default, we inject the search results in all input[type=search] that we find on your pages. This is configurable, see https://github.com/algolia/algoliasearch-netlify/tree/master/frontend#available-options

The Netlify plugin is an easy way to have a functional search in a few minutes. InstantSearch is a very-complete library allowing you to fully customize the search experience with many available widget, so it requires a bit more work to set up. It really depends on your needs, the best is to try both!

1 Like

were are the search results injected? I assume you meant that any input element with type search would be used to enter the search term ? But were are the results injected. Do I need to create a div with ID of results?

No need to create any extra div, they will appear below the search input, as shown in our documentation:

1 Like

thanks Sylvain I’m thinking it is a css issue , so I’m going to try a slightly different imp,implementation on my site. thanks for the clarification. Dave

1 Like

I noticed this in the documentation and wonder if this is what is blocking the results coming through?
My website and the implementation of algolia search netlify plugin can be seen here www.daveharrison.net

My website requires JavaScript to render

The Algolia Crawler supports JavaScript-rendered websites, but we don’t yet expose this option in the plugin. Please contact us to enable it.

Hi Dave,

Te issue here is simply a z-index one. Indeed, the autocomplete is hidden behind the modal.
You can fix this by adding a bit of CSS:

<style>
.algolia-autocomplete { z-index: 1000 !important; }
</style>
1 Like

@Jerska I still don;t see any results and am getting this error in console

 2AutocompleteWrapper.ts:127 Uncaught (in promise) TypeError: Cannot read property 'matchLevel' of undefined
at t.value (AutocompleteWrapper.ts:127)
at AutocompleteWrapper.ts:122
at p (dataset.js:164)
at Object.r.map (zepto.js:373)
at h.f (dataset.js:148)
at h._render (dataset.js:110)
at h.e (dataset.js:203)
at AutocompleteWrapper.ts:116

[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See <URL> 

in google browser OSX 10.14.6

and…

Uncaught (in promise) TypeError: n is undefined
value https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@0/dist/algoliasearchNetlify.js:1
value https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@0/dist/algoliasearchNetlify.js:1
p https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@0/dist/algoliasearchNetlify.js:3
map https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@0/dist/algoliasearchNetlify.js:3
f https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@0/dist/algoliasearchNetlify.js:3
_render https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@0/dist/algoliasearchNetlify.js:3
e https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@0/dist/algoliasearchNetlify.js:3
value https://cdn.jsdelivr.net/npm/@algolia/algoliasearch-netlify-frontend@0/dist/algoliasearchNetlify.js:1

in firefox console

Thanks for the detailed report!

Indeed, this happens “randomly” depending on which results are shown.
For instance, when I type “Dave”, results do show up:

But there are other cases where indeed no results show up.
Indeed, our library had an unhandled case for pages which didn’t have a description.
Those are the errors you saw in the console.

This is fixed in https://github.com/algolia/algoliasearch-netlify/pull/96 , which I’ve just released under v0.0.15.
You might need to clear your cache to download the latest version.

2 Likes