Giter VIP home page Giter VIP logo

Comments (12)

gaelgoth avatar gaelgoth commented on May 31, 2024 3

We've been experiencing the same issue since we update our instance to 1.26.3 .Please note that we're still running our instance on legacy backend. I also tried to remove CookieAuth.ts but still got a 404 Not Found on api/techdocs/.backstage/auth/v1/cookie

from backstage.

f-rouwen avatar f-rouwen commented on May 31, 2024 1

Because of @gaelgoth's comment of 'legacy backend', I felt compelled to try and migrate.
As we only use Backstage for TechDocs at the moment and we try to keep it as vanilla as possible, this was only 2 hours of work tops.
It seems like a large improvement (much more 'out-of-the-box' feeling) and also fixed the reported issue. 🎉

Lastly, I mentioned a non-related issue I had regarding the internal/external URL.
That was solved in the process to by changing:

backend:
  baseUrl: https://backstage.domain.com:7007
  listen:
    port: 7007

to

backend:
  baseUrl: https://backstage.domain.com:7007
  listen:
    host: backstage.domain.com
    port: 7007

Without the explicit host, some internal calls default back to localhost. (We use https and our certificates require this.)
I should've been able to find the source of this sooner with the current knowledge, but better late than never.

Thanks to everyone helping and thanks for developing and maintaining Backstage!
It's appreciated!

from backstage.

jonesbusy avatar jonesbusy commented on May 31, 2024 1

After migrating to 1.26.4 the 404 issue on techdoc is still there for the legacy backend.

On our side we don't have any host: set under the backend: config

from backstage.

ljupchokotev avatar ljupchokotev commented on May 31, 2024 1

After migrating to 1.26.4 the 404 issue on techdoc is still there for the legacy backend.

On our side we don't have any host: set under the backend: config

We are experiencing the same. After bumping to 1.26.4, TechDocs is broken. I can see the 404 for the cookie request mention above. We just get a generic error in the UI when trying to load any TechDocs.

Error
ResponseError

Message
Request failed with 404 

from backstage.

fjudith avatar fjudith commented on May 31, 2024

Same issue on two different apps after upgrading to 1.26.x.

Pages are not generating anymore.

Seems to be related to API authentication issue.

image

from backstage.

fjudith avatar fjudith commented on May 31, 2024

@f-rouwen Solved by removing the legacy CookieAuth.ts previously implemented using this guide.

As i understand, it conflicts with this statement in the 1.26.0 release note (https://backstage.io/docs/releases/v1.26.0#auth-improvements)

image

from backstage.

f-rouwen avatar f-rouwen commented on May 31, 2024

@fjudith I don't have this cookie functionality. My hunch is that it does have something to do with authentication somehow.
Another problem that my instance has (had for some time now), is that I need to change the following line in order for the GitLab login to work. (otherwise the redirect back to Backstage fails.) It has something to do with our SSL certificates needing everything to run over *domain.com.

diff --git a/node_modules/@backstage/backend-app-api/dist/index.cjs.js b/node_modules/@backstage/backend-app-api/dist/index.cjs.js
index 857f553..43abc71 100644
--- a/node_modules/@backstage/backend-app-api/dist/index.cjs.js
+++ b/node_modules/@backstage/backend-app-api/dist/index.cjs.js
@@ -2912,7 +2912,7 @@ class HostDiscovery {
     );
   }
   async getBaseUrl(pluginId) {
-    return this.getTargetFromConfig(pluginId, "internal");
+    return this.getTargetFromConfig(pluginId, "external");
   }
   async getExternalBaseUrl(pluginId) {
     return this.getTargetFromConfig(pluginId, "external");

Unfortunately, I'm not much of an expert on any of this..

from backstage.

f-rouwen avatar f-rouwen commented on May 31, 2024

You seem to be right that there's something up with cookies:

In browser console I see:
GET https://backstage.domain.com:7007/api/techdocs/.backstage/auth/v1/cookie --> not found

from backstage.

gnilron avatar gnilron commented on May 31, 2024

Not sure this is correct, but maybe this relates to this one

from backstage.

f-rouwen avatar f-rouwen commented on May 31, 2024

Thanks for the effort people! Keep up the good work.

from backstage.

ljupchokotev avatar ljupchokotev commented on May 31, 2024

Looks like yarn backstage-cli versions:bump did not bump @backstage/plugin-auth-react for us so we didn't get the fixed version. @jonesbusy check if it's the same for you. We had 0.1.0 installed but you need 0.1.1 for the fix.

from backstage.

jonesbusy avatar jonesbusy commented on May 31, 2024

Hi @ljupchokotev Thanks that was it. After refreshing the yarn.lock the issue is gone when using 0.1.1 of @backstage/plugin-auth-react

from backstage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.