Uploaded image for project: 'Hue (READ ONLY)'
  1. Hue (READ ONLY)
  2. HUE-7780

window.onbeforeunload not triggered to close notebook session in Hue 4.x when navigating to another app

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 4.1.0
    • Fix Version/s: None
    • Component/s: con.spark
    • Labels:
      None

      Description

      In the notebook editor_components.mako, if there is an open notebook with an attached Livy session, and the user closes the browser tab or navigates to another page within the tab, the window.onbeforeunload event is fired, caught, and the selectedNotebook is closed, which also terminates the LIvy session and thus the interactive Spark job running in the cluster.

      However, if you simply navigate away from the Notebook to another Hue app, which does not reload the entire window but instead only the division containing the embedded Notebook, the window.onbeforeunload event is NOT fired and caught, and thus the Notebook is never closed--orphaning the Livy session.

      Is there an event in the editor_components.mako that can be caught in the case of navigation to another Hue app, such that we can close the Notebook down correctly?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rickbernotas Rick Bernotas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: