Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47584

Result screen not refreshing with error "Cannot read property 'self' of undefined"

    Details

    • Sprint:
      Blue Ocean 1.4 - beta 3, Blue Ocean 1.4 - beta 2, Blue Ocean - Candidates, Blue Ocean 1.6 - beta 2
    • Similar Issues:
    • Released As:
      1.14.0

      Description

      Sometimes Blue-Ocean page get stuck in a step and displayed page is not refreshing. After Refreshing browser (with F5 for instance) you can see real step progress.

      In browser console (chrome) I can see this:

       

      blueocean.js:149535 Unhandled Rejection: TypeError: Cannot read property 'self' of undefined
      at ActivityService.bunkerKey (blueocean.js:5616)
      at ActivityService.setItem (blueocean.js:5659)
      at executeAction (blueocean.js:103343)
      at ActivityService.res (blueocean.js:103315)
      at blueocean.js:5910
      at <anonymous>
      logUnhandledPromiseRejection @ blueocean.js:149535
      blueocean.js:5500 There has been an error while trying to get the data. TypeError: Cannot read property 'toLowerCase' of null
      at RunDetailsHeader.render (jenkins-js-extension.js:85421)
      at ReactCompositeComponentWrapper._renderValidatedComponentWithoutOwnerOrContext (blueocean.js:124443)
      at ReactCompositeComponentWrapper._renderValidatedComponent (blueocean.js:124466)
      at ReactCompositeComponentWrapper._updateRenderedComponent (blueocean.js:124390)
      at ReactCompositeComponentWrapper._performComponentUpdate (blueocean.js:124368)
      at ReactCompositeComponentWrapper.updateComponent (blueocean.js:124289)
      at ReactCompositeComponentWrapper.receiveComponent (blueocean.js:124191)
      at Object.receiveComponent (blueocean.js:130996)
      at Object.updateChildren (blueocean.js:122170)
      at ReactDOMComponent._reconcilerUpdateChildren (blueocean.js:129770)
      at ReactDOMComponent._updateChildren (blueocean.js:129869)
      at ReactDOMComponent.updateChildren (blueocean.js:129856)
      at ReactDOMComponent._updateDOMChildren (blueocean.js:125614)
      at ReactDOMComponent.updateComponent (blueocean.js:125432)
      at ReactDOMComponent.receiveComponent (blueocean.js:125390)
      at Object.receiveComponent (blueocean.js:130996)
      at ReactCompositeComponentWrapper._updateRenderedComponent (blueocean.js:124398)
      at ReactCompositeComponentWrapper._performComponentUpdate (blueocean.js:124368)
      at ReactCompositeComponentWrapper.updateComponent (blueocean.js:124289)
      at ReactCompositeComponentWrapper.receiveComponent (blueocean.js:124191)
      at Object.receiveComponent (blueocean.js:130996)
      at Object.updateChildren (blueocean.js:122170)
      blueocean.js:149535 Unhandled Rejection: TypeError: Cannot read property 'self' of undefined
      at ActivityService.bunkerKey (blueocean.js:5616)
      at ActivityService.setItem (blueocean.js:5659)
      at executeAction (blueocean.js:103343)
      at ActivityService.res (blueocean.js:103315)
      at blueocean.js:5910
      at <anonymous>
      logUnhandledPromiseRejection @ blueocean.js:149535
      blueocean.js:103663 [mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: 'ToastService@10.toasts[..].onActionClick'. For more details see https://github.com/mobxjs/mobx/issues/462
      handleExceptionInDerivation @ blueocean.js:103663
      trackDerivedFunction @ blueocean.js:103643
      ComputedValue.trackAndCompute @ blueocean.js:103538
      ComputedValue.get @ blueocean.js:103504
      get @ blueocean.js:104988
      _onActionClick @ blueocean.js:11338
      onActionClick @ blueocean.js:11400
      onActionClick @ blueocean.js:11145
      onClick @ blueocean.js:11173
      invokeGuardedCallback @ blueocean.js:128462
      executeDispatch @ blueocean.js:120586
      executeDispatchesInOrder @ blueocean.js:120609
      executeDispatchesAndRelease @ blueocean.js:120063
      executeDispatchesAndReleaseTopLevel @ blueocean.js:120074
      forEachAccumulated @ blueocean.js:134731
      processEventQueue @ blueocean.js:120250
      runEventQueueInBatch @ blueocean.js:128520
      handleTopLevel @ blueocean.js:128531
      handleTopLevelImpl @ blueocean.js:128598
      perform @ blueocean.js:134115
      batchedUpdates @ blueocean.js:127798
      batchedUpdates @ blueocean.js:132014
      dispatchEvent @ blueocean.js:128675
      blueocean.js:149523 Hnhandled Error: Error: [mobx] Invariant failed: Computed values or transformers should not invoke actions or trigger other side effects
      at invariant (blueocean.js:105314)
      at executeAction (blueocean.js:103321)
      at LocationService.res (blueocean.js:103315)
      at blueocean.js:150184
      at blueocean.js:82616
      at blueocean.js:82332
      at blueocean.js:81696
      at Array.forEach (<anonymous>)
      at updateLocation (blueocean.js:81695)
      at blueocean.js:81757
      at blueocean.js:81733
      at next (blueocean.js:80914)
      at Object.loopAsync (blueocean.js:80918)
      at confirmTransitionTo (blueocean.js:81719)
      at transitionTo (blueocean.js:81745)
      at Object.push (blueocean.js:81768)
      at Object.push (blueocean.js:82338)
      at Object.push (blueocean.js:82622)
      at switchRunDetails (jenkins-js-extension.js:84816)
      at Object.onActionClick (blueocean.js:402)
      at ComputedValue.peek (blueocean.js:103468)
      at trackDerivedFunction (blueocean.js:103638)
      logApplicationError @ blueocean.js:149523
      blueocean.js:2708 GET https://jenkins.eprinsa.es/blue/rest/organizations/jenkins/pipelines/analyzer_Check_syslog/runs/14987/ 404 (Not Found)
      request @ blueocean.js:2708
      dedupe @ blueocean.js:8088
      dedupe @ blueocean.js:8111
      rawFetchJSON @ blueocean.js:2734
      fetchJSON @ blueocean.js:2820
      fetchActivity @ blueocean.js:5494
      _updateRun @ blueocean.js:5909
      queueEnter @ blueocean.js:5834
      DefaultSSEHandler.handleEvents @ blueocean.js:5770
      (anonymous) @ blueocean.js:6787
      _handleJobEvent @ blueocean.js:6786
      (anonymous) @ blueocean.js:6746
      listener @ blueocean.js:52516
      blueocean.js:5500 There has been an error while trying to get the data. Error: fetch failed: 404 for https://jenkins.eprinsa.es/blue/rest/organizations/jenkins/pipelines/analyzer_Check_syslog/runs/14987/
      at checkStatus (blueocean.js:2572)
      at <anonymous>

       

        Attachments

        1. jenkins.eprinsa.es.har.zip
          2.90 MB
        2. jenkins.eprinsa.es-2.zip
          2.93 MB
        3. Pipeline_Shared_Library_translated.zip
          65 kB
        4. Pipeline_Shared_Library.zip
          59 kB
        5. screenshot-1.png
          screenshot-1.png
          358 kB
        6. screenshot-2.png
          screenshot-2.png
          413 kB
        7. screenshot-3.png
          screenshot-3.png
          645 kB
        8. screenshot-after-upgrading-1.4.beta-3.png
          screenshot-after-upgrading-1.4.beta-3.png
          196 kB
        9. simple-test-project_translated.zip
          2 kB
        10. simple-test-project.zip
          2 kB
        11. Waiting.png
          Waiting.png
          21 kB

          Issue Links

            Activity

            Hide
            sophistifunk Josh McDonald added a comment -

            It's probably unrelated to the deserialisation problem. Looks like a response / message is coming in from the server with no payload. We could cover up the exception in the client-side by simply ignoring `setItem(undefined)` but then we'd still be doing whatever is causing the response to be null in the first place.

            Show
            sophistifunk Josh McDonald added a comment - It's probably unrelated to the deserialisation problem. Looks like a response / message is coming in from the server with no payload. We could cover up the exception in the client-side by simply ignoring `setItem(undefined)` but then we'd still be doing whatever is causing the response to be null in the first place.
            Hide
            vivek Vivek Pandey added a comment -

            Josh McDonald I see 404s in the attached HAR. Is it the case where frontend code is not handling 404 well and goes ahead trying to render it?

            Show
            vivek Vivek Pandey added a comment - Josh McDonald  I see 404s in the attached HAR. Is it the case where frontend code is not handling 404 well and goes ahead trying to render it?
            Hide
            sophistifunk Josh McDonald added a comment -

            It shouldn't, but it's hard to say for sure. Without a local replication to step through there's just not a lot of insight I can give, the karaoke code is too convoluted.

            Show
            sophistifunk Josh McDonald added a comment - It shouldn't, but it's hard to say for sure. Without a local replication to step through there's just not a lot of insight I can give, the karaoke code is too convoluted.
            Hide
            andreimuresianu Andrei Muresianu added a comment -

            I am able to reproduce this in a declarative pipeline that has a user input step. After pressing on the button to proceed, sometimes the pipeline continues to the next stage without refreshing the page, other times the UI just hangs there until I refresh it although things are happening and visible in the standard console logs.

            Jenkins version: 2.180

            Tried with a few different versions of Blue Ocean to no avail: 1.17.0. 1.11.0, 1.8.0, 1.7.3

            Show
            andreimuresianu Andrei Muresianu added a comment - I am able to reproduce this in a declarative pipeline that has a user input step. After pressing on the button to proceed, sometimes the pipeline continues to the next stage without refreshing the page, other times the UI just hangs there until I refresh it although things are happening and visible in the standard console logs. Jenkins version: 2.180 Tried with a few different versions of Blue Ocean to no avail: 1.17.0. 1.11.0, 1.8.0, 1.7.3
            Hide
            andreimuresianu Andrei Muresianu added a comment -

            Could we please reopen this?

            Show
            andreimuresianu Andrei Muresianu added a comment - Could we please reopen this?

              People

              • Assignee:
                Unassigned
                Reporter:
                jlp01 Jesús Lunar Pérez
              • Votes:
                2 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: