backstage: 🐛 Bug Report: backstage error Missing index for techdocs.
📜 Description
I’ve successfully setup techdocs as follows
*Run backstage in docker and use techdocs by local mode by follow the guide or github issue I found
-----app-config.yaml-----------------------------------
techdocs:
builder: “local”
generator:
runIn: “local”
publisher:
type: “local”
-----Dockerfile part of installing mkdocs-----------------------------------
RUN set -xe
&& apt-get update -y
&& apt-get install -y python3-pip
RUN pip install --upgrade pip && pip install mkdocs-techdocs-core
Repo File Structure
catalog-info.yaml mkdocs.yml docs/(index.md,a.md,b.md)
catalog-info.yaml
metadata: … annotations: backstage.io/techdocs-ref: dir:.
mkdocs.yml
site_name: ‘Techdocs example’ site_description: ‘Description A’
nav: - Introduction: index.md - Page A: a.md - Page B: b.md
plugins: - techdocs-core
markdown file is simple table
👍 Expected behavior
There should be no error. Search bar should work. I’m not sure about “index” in the error. Is it search index or index page/index.md which I have as default in example without changing name. The page is also build&rendered already.
*If it’s also possible, I would like to ask how to adjust techdocs style a bit. For example, add cell border. I try to add global css to make vertical line between column. But I cant make it work. Not sure how it should be done in Backstage.
👎 Actual Behavior with Screenshots
Document is finally rendered. But there’s this error comes up every time I view techdocs.
backstage error Missing index for techdocs. This could be because the index hasn't been created yet or there was a problem during index creation. type=errorHandler name=MissingIndexError cause=undefined stack=MissingIndexError: Missing index for techdocs. This could be because the index hasn't been created yet or there was a problem during index creation.
And search bar says “No results found” which I suspect it’s because of this error too. I try to search: Pag or Page and it shows “No results found”
👟 Reproduction steps
- Setup techdocs follow the guide
- Create repo structure as default in the guide.
📃 Provide the context for the Bug.
No response
🖥️ Your Environment
“@backstage/cli@^0.18.0”: version “0.18.1” “@backstage/plugin-techdocs@^1.3.0”: version “1.3.2” “@backstage/plugin-techdocs-backend@^1.2.0”: version “1.3.0” “@backstage/plugin-techdocs-node@^1.4.0”: version “1.4.0” “@backstage/plugin-techdocs-react@^1.0.2”, “@backstage/plugin-techdocs-react@^1.0.4”: version “1.0.4”
👀 Have you spent some time to check if this bug has been raised before?
- I checked and didn’t find similar issue
🏢 Have you read the Code of Conduct?
- I have read the Code of Conduct
Are you willing to submit PR?
None
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 5
- Comments: 19 (5 by maintainers)
I was able to successfully fix this by updating our auth middleware that we use to authenticate API requests. Here’s the latest version of the docs on that: https://github.com/backstage/backstage/blob/master/contrib/docs/tutorials/authenticate-api-requests.md