Fastapi: Search feature on documentation website does not work

Created on 14 Aug 2020  路  13Comments  路  Source: tiangolo/fastapi

First check

  • [x] I added a very descriptive title to this issue.
  • [x] I used the GitHub search to find a similar issue and didn't find it.
  • [x] I searched the FastAPI documentation, with the integrated search.
  • [x] I already searched in Google "How to X in FastAPI" and didn't find any information.
  • [x] I already read and followed all the tutorial in the docs and didn't find an answer.
  • [x] I already checked if it is not related to FastAPI but to Pydantic.
  • [x] I already checked if it is not related to FastAPI but to Swagger UI.
  • [x] I already checked if it is not related to FastAPI but to ReDoc.
  • [x] After submitting this, I commit to one of:

    • Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.

    • I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.

    • Implement a Pull Request for a confirmed bug.

Description

  • Open the browser and go to https://fastapi.tiangolo.com/.
  • Click the search input and enter a keyword, ex. tutorial.
  • No result is displayed.
  • Expected: Search result is displayed and clickable.

Environment

  • OS: [e.g. Linux / Windows / macOS]: macOS
  • FastAPI Version [e.g. 0.3.0]: 0.61.0
question

Most helpful comment

It's a common problem. Clean the cache (shift + F5) and/or use incognito browser.

PS.: This is not the explanation why, this is a way to solve it.

I 've tried to use incognito mode and it does not solve the problem.

I 've tested on Firefox and it worked but not for Chrome-based browser. So I guess that some wrong config/syntax,.. make the generated doc does not compatible with Chrome-based browsers

Test result:

  • Firefox: OK.
  • Firefox Android: OK.
  • Chrome, Vivaldi, Safari, Opera, Edge: Not working.
  • Chrome Android: Not working

All 13 comments

What's your browser? Have you tried another browser? Could you look at the network tab in developer tools to see if any requests are failing? Have you looked at other issues that report this?

What's your browser? Have you tried another browser? Could you look at the network tab in developer tools to see if any requests are failing? Have you looked at other issues that report this?

  1. What's your browser? Chrome-based browsers
  2. Have you tried another browser? Yes
  3. Could you look at the network tab in developer tools to see if any requests are failing? No request was created, except Google Analytics requests
  4. Have you looked at other issues that report this? Of courses, yes.
  5. Additional Information: I've tried another site using the same documentation generation tool and it worked: https://fastapi-utils.davidmontague.xyz/. I can search on this site, so I think the problem comes from something wrong in the source code.

P/s: You should test it on your side. If the search function is working, I will check more.

It's a common problem. Clean the cache (shift + F5) or use incognito browser.

PS.: This is not the explanation why, this is a way to solve it.

It's a common problem. Clean the cache (shift + F5) and/or use incognito browser.

PS.: This is not the explanation why, this is a way to solve it.

I 've tried to use incognito mode and it does not solve the problem.

I 've tested on Firefox and it worked but not for Chrome-based browser. So I guess that some wrong config/syntax,.. make the generated doc does not compatible with Chrome-based browsers

Test result:

  • Firefox: OK.
  • Firefox Android: OK.
  • Chrome, Vivaldi, Safari, Opera, Edge: Not working.
  • Chrome Android: Not working

For me it works in Brave (Chromium based) and Safari.

Does not work for me in Brave PC and Android (none of the solutions above help), search in starlette docs which use the same base works perfectly.

I have this problem sometimes but not always using Firefox.
Deleting Cache did not help.
Deleting cookies and website-data did the trick!

Correct me if I'm wrong: but wouldn't using a incognito browser also work when it's local storage (website-data) related?

for me it worked to turn off schields in brave browser

Same issue here: interestingly, the documentation root always seems to work (at least after a refresh without cache) but other pages mostly not. Refresh without cache sometimes makes it work on other pages, but often not.

I use Firefox and Chorme on macOS it has same issue.
I think something wrong with https://fastapi.tiangolo.com/search/search_index.json
I type https://fastapi.tiangolo.com/search/search_index.json in location bar and load it again and back to main website it can search again

I also had some issues at some point, I think it was related to an older version of Material for MkDocs. But I haven't seen problems in the recent versions, more now that it uses Material for MkDocs Insiders.

If you are still having issues, let me know.

I also had some issues at some point, I think it was related to an older version of Material for MkDocs. But I haven't seen problems in the recent versions, more now that it uses Material for MkDocs Insiders.

If you are still having issues, let me know.

Now, it works.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RenanAlonkin picture RenanAlonkin  路  3Comments

zero0nee picture zero0nee  路  3Comments

laith43d picture laith43d  路  3Comments

mr-bjerre picture mr-bjerre  路  3Comments

updatatoday picture updatatoday  路  3Comments