backstage icon indicating copy to clipboard operation
backstage copied to clipboard

🐛 Bug Report: [1.37.0] Techdocs URL redirect error

Open jeffersonrpn opened this issue 11 months ago • 3 comments

📜 Description

When upgrading Backstage from version 1.31.1 to 1.37.0 following the official documentation everything went well, except for one thing: Our Techdocs Home and every page under the path /docs/:namespace/:kind/:name is working. But when we try to access the path /catalog/:namespace/:kind/:name/docs we get the following error:

Error: Missing ":namespace" param

I think there is something wrong with the URL redirection and it may be a known issue since this context is referenced in the Backstage code here.

👍 Expected behavior

Our techdocs is running with default configuration, so it should show a normal docs page of a component when accessing /catalog/:namespace/:kind/:name/docs.

👎 Actual Behavior with Screenshots

When accessing /catalog/:namespace/:kind/:name/docs

Error: Missing ":namespace" param
    at U (https://alpha-darkkitchen.vtex.com/static/module-remix-run.453edc8b.js:10:2302)
    at https://alpha-darkkitchen.vtex.com/static/module-remix-run.453edc8b.js:10:7893
    at Array.map (<anonymous>)
    at er (https://alpha-darkkitchen.vtex.com/static/module-remix-run.453edc8b.js:10:7743)
    at https://alpha-darkkitchen.vtex.com/static/module-backstage.9f544b6c.js:582:45097
    at https://alpha-darkkitchen.vtex.com/static/module-backstage.9f544b6c.js:586:41164
    at Object.useMemo (https://alpha-darkkitchen.vtex.com/static/module-react-dom.ea7b2bf9.js:12:58604)
    at S.useMemo (https://alpha-darkkitchen.vtex.com/static/vendor.a225ec3f.js:97:5819)
    at f (https://alpha-darkkitchen.vtex.com/static/module-backstage.9f544b6c.js:586:41109)
    at g (https://alpha-darkkitchen.vtex.com/static/module-backstage.9f544b6c.js:586:41446)

Image

For comparison, our techdocs pages is working fine. When accessing /docs/:namespace/:kind/:name:

Image

👟 Reproduction steps

  1. Go to component's page.
  2. Click on Docs tab.

📃 Provide the context for the Bug.

We can't access entities' techdocs pages directly from entity's page.

🖥️ Your Environment

Backstage 1.37.0

Techdocs config:

  • builder: external
  • publisher type: awsS3

👀 Have you spent some time to check if this bug has been raised before?

  • [x] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

Yes I am willing to submit a PR!

jeffersonrpn avatar Apr 02 '25 14:04 jeffersonrpn

Hi @jeffersonrpn, just wanted to note that this isn't an issue on the Demo site - https://demo.backstage.io/catalog/default/component/backstage-demo/docs - and makes me think that the issue could be somewhere else than the code you pointed out but unsure right now where to suggest looking. 🤔

awanlin avatar Apr 02 '25 14:04 awanlin

We also don't have the issue with the example docs that are stored on a GCP bucket: https://demo.backstage.io/catalog/default/component/backstage/docs

awanlin avatar Apr 02 '25 14:04 awanlin

Could you create a repro repo as an example for us @jeffersonrpn? Sharing a link to such a repo would help us debug the error locally 🙏🏻 , we're not seeing the issue on the demo site and no one else has reported this error besides you so far...

camilaibs avatar Apr 03 '25 14:04 camilaibs

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jun 02 '25 14:06 github-actions[bot]