Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-11066

After failing a login with an external provider, the link to the homepage is broken

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.2
    • Fix Version/s: 7.4
    • Component/s: Web
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      When the login with an external identity provider fail, we display a page saying the login is unauthorized with a link to the homepage.
      When clicking this link the page is broken and a javascript error like this is raised :

      TypeError: this.props.currentUser is null
      Stack trace:
      [1589]/W</t.prototype.render@http://localhost:9000/js/392.080b5362.chunk.js:1:14669
      u@http://localhost:9000/js/vendors~app.f9ea3397.chunk.js:20:44083
      beginWork@http://localhost:9000/js/vendors~app.f9ea3397.chunk.js:20:48482
      r@http://localhost:9000/js/vendors~app.f9ea3397.chunk.js:20:52450
      i@http://localhost:9000/js/vendors~app.f9ea3397.chunk.js:20:52771
      a@http://localhost:9000/js/vendors~app.f9ea3397.chunk.js:20:53007
      C@http://localhost:9000/js/vendors~app.f9ea3397.chunk.js:20:56530
      E@http://localhost:9000/js/vendors~app.f9ea3397.chunk.js:20:56267
      v@http://localhost:9000/js/vendors~app.f9ea3397.chunk.js:20:55399
      h@http://localhost:9000/js/vendors~app.f9ea3397.chunk.js:20:54803
      enqueueSetState@http://localhost:9000/js/vendors~app.f9ea3397.chunk.js:20:45241
      [1033]/v.prototype.setState@http://localhost:9000/js/1.542bdbd0.chunk.js:9:1119
      n/e.receiveComponent@http://localhost:9000/js/app.4d37de27.chunk.js:1:97126
      l/n</n.prototype.componentDidMount/<@http://localhost:9000/js/app.4d37de27.chunk.js:1:97470
      u@http://localhost:9000/js/vendors~main.6ed5a55c.chunk.js:1:54483
      F/<@http://localhost:9000/js/vendors~main.6ed5a55c.chunk.js:1:54605
      f@http://localhost:9000/js/vendors~main.6ed5a55c.chunk.js:1:52887
      

      The easiest way to reproduce the error is to put a breaking point in the following IT: BaseIdentityProviderTest#display_unauthorized_page_when_authentication_failed

        Attachments

          Activity

            People

            Assignee:
            gregoire.aubert Gregoire Aubert
            Reporter:
            gregoire.aubert Gregoire Aubert
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: