Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-2974

Fix back button redirection at the end of history error

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      On clicking the back button from home directory, the loading spinner does not go away.

      Error in console:
      Uncaught TypeError: Cannot read properties of undefined (reading 'includes')
      at getFileList (cyverse.js:403)
      at window.onhashchange (cyverse.js:164)

        Attachments

          Activity

          karthik Karthik Raveendran created issue -
          karthik Karthik Raveendran made changes -
          Field Original Value New Value
          Epic Link IGBF-2376 [ 18533 ]
          karthik Karthik Raveendran made changes -
          Issue Type Task [ 3 ] Bug [ 1 ]
          karthik Karthik Raveendran made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          Hide
          karthik Karthik Raveendran added a comment - - edited

          In function getFileList. there is an object that where the current URL and other records are saved. When the user hits the back button, values of the object is passed to the geFileLust() from the another object that saves the history of user visits in BioViz Connect in that session. When user goes too far (beyond the history's limit) a null set is passed and that causes the type error.

          Show
          karthik Karthik Raveendran added a comment - - edited In function getFileList. there is an object that where the current URL and other records are saved. When the user hits the back button, values of the object is passed to the geFileLust() from the another object that saves the history of user visits in BioViz Connect in that session. When user goes too far (beyond the history's limit) a null set is passed and that causes the type error.
          Hide
          karthik Karthik Raveendran added a comment - - edited

          Error line in getFileList: if (object['redirect_savedurl'].includes('searchDirectory'))

          In this line, string function 'includes' throws an error because the value of the object is undefined.
          However. this line is check before saving the section in which the user is searching if the user uses the search function. Adding a check before this line for any error works: The user is redirected to CAS login as per the browser history.

          Note: The check should not be too specific to a certain error value because no matter what the error value maybe when the user hits the back button or forward at the end of the history, they should be redirected to previous page. As long as it has a string value it should be good to go.

          Show
          karthik Karthik Raveendran added a comment - - edited Error line in getFileList: if (object ['redirect_savedurl'] .includes('searchDirectory')) In this line, string function 'includes' throws an error because the value of the object is undefined. However. this line is check before saving the section in which the user is searching if the user uses the search function. Adding a check before this line for any error works: The user is redirected to CAS login as per the browser history. Note: The check should not be too specific to a certain error value because no matter what the error value maybe when the user hits the back button or forward at the end of the history, they should be redirected to previous page. As long as it has a string value it should be good to go.
          karthik Karthik Raveendran made changes -
          Summary Fix back button from home directory issue Fix back button redirection at the end of history
          karthik Karthik Raveendran made changes -
          Summary Fix back button redirection at the end of history Fix back button redirection at the end of history error
          karthik Karthik Raveendran made changes -
          Description On clicking the back button from home directory, the loading spinner does not go away.
           Error in console:
          Uncaught TypeError: Cannot read properties of undefined (reading 'includes')
              at getFileList (cyverse.js:403)
              at window.onhashchange (cyverse.js:164)
          On clicking the back button from home directory, the loading spinner does not go away.

          Error in console:
          Uncaught TypeError: Cannot read properties of undefined (reading 'includes')
              at getFileList (cyverse.js:403)
              at window.onhashchange (cyverse.js:164)

          Hide
          karthik Karthik Raveendran added a comment - - edited

          Pushed changes to repo. Commit in IGBF-2974

          Testing Protocol:
          a) When you are logged in to Bioviz Connect and home page is loaded, hit the back button to see if you are redirected to CAS (CAS is CyVerse login page)
          b) Navigate through the directories and hit the back button to check if it follows the breadcrumbs and at the end of history you should be redirected to CAS (CAS is CyVerse login page)
          c) Check to see if the Search function is working as it should be

          Show
          karthik Karthik Raveendran added a comment - - edited Pushed changes to repo. Commit in IGBF-2974 Testing Protocol: a) When you are logged in to Bioviz Connect and home page is loaded, hit the back button to see if you are redirected to CAS (CAS is CyVerse login page) b) Navigate through the directories and hit the back button to check if it follows the breadcrumbs and at the end of history you should be redirected to CAS (CAS is CyVerse login page) c) Check to see if the Search function is working as it should be
          karthik Karthik Raveendran made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          karthik Karthik Raveendran made changes -
          Assignee Karthik Raveendran [ karthik ]
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ]
          ann.loraine Ann Loraine made changes -
          Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
          ann.loraine Ann Loraine made changes -
          Assignee Ann Loraine [ aloraine ] Karthik Raveendran [ karthik ]
          karthik Karthik Raveendran made changes -
          Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
          nfreese Nowlan Freese made changes -
          Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
          Show
          nfreese Nowlan Freese added a comment - Merged https://bitbucket.org/nfreese/bioviz-connect/pull-requests/263/igbf-2974-fix-back-button-redirection-at?link_source=email
          nfreese Nowlan Freese made changes -
          Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
          nfreese Nowlan Freese made changes -
          Assignee Karthik Raveendran [ karthik ] Omkar Marne [ omarne ]
          Hide
          ann.loraine Ann Loraine added a comment -

          Deployed for testing to https://bvctest6.bioviz.org.

          Show
          ann.loraine Ann Loraine added a comment - Deployed for testing to https://bvctest6.bioviz.org .
          ann.loraine Ann Loraine made changes -
          Rank Ranked higher
          omarne Omkar Marne (Inactive) made changes -
          Attachment Log in successful page.png [ 16803 ]
          omarne Omkar Marne (Inactive) made changes -
          Attachment Log out Page.png [ 16804 ]
          Hide
          omarne Omkar Marne (Inactive) added a comment - - edited

          Test results:

          • When I pressed the back button after logging in, the page redirected to CAS login page but when I hit forward button it logged out successfully. ( Please see attached screenshot.)
          • When I tried to log in again through the link on the log out page, I logged in successfully but it redirected me to the above page. (Please see 'Log in successful' screenshot). Not sure if that's a bug.
          • After navigating through the directories and hitting the back the button it redirects to CAS login page but repeats above after hitting forward button.
          • Search function is working fine on the community page but its not working on the home page. Please see attached screen shots.
          • If I sign out from my profile it redirects me to the https://www.bioviz.org/connect.html instead of CAS login page. Not sure if that's a bug too.

          Moving the ticket back to to-do.

          Show
          omarne Omkar Marne (Inactive) added a comment - - edited Test results: When I pressed the back button after logging in, the page redirected to CAS login page but when I hit forward button it logged out successfully. ( Please see attached screenshot.) When I tried to log in again through the link on the log out page, I logged in successfully but it redirected me to the above page. (Please see 'Log in successful' screenshot). Not sure if that's a bug. After navigating through the directories and hitting the back the button it redirects to CAS login page but repeats above after hitting forward button. Search function is working fine on the community page but its not working on the home page. Please see attached screen shots. If I sign out from my profile it redirects me to the https://www.bioviz.org/connect.html instead of CAS login page. Not sure if that's a bug too. Moving the ticket back to to-do.
          omarne Omkar Marne (Inactive) made changes -
          Attachment bug.png [ 16805 ]
          omarne Omkar Marne (Inactive) made changes -
          Attachment home page.png [ 16806 ]
          omarne Omkar Marne (Inactive) made changes -
          Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
          omarne Omkar Marne (Inactive) made changes -
          Status Post-merge Testing In Progress [ 10003 ] To-Do [ 10305 ]
          omarne Omkar Marne (Inactive) made changes -
          Assignee Omkar Marne [ omarne ] Karthik Raveendran [ karthik ]
          omarne Omkar Marne (Inactive) made changes -
          Attachment home page.png [ 16806 ]
          omarne Omkar Marne (Inactive) made changes -
          Attachment bug.png [ 16805 ]
          omarne Omkar Marne (Inactive) made changes -
          Attachment Home page.png [ 16807 ]
          omarne Omkar Marne (Inactive) made changes -
          Attachment bug.png [ 16808 ]
          Hide
          omarne Omkar Marne (Inactive) added a comment -

          As per Dr. Freese, search function problem with the home page is a known issue. It usually happens when some one creates a new bioviz connect account ( which I did).
          We ran analysis on of the files and the result is as expected and we are able to the load the data in IGB.
          Closing the ticket.

          Show
          omarne Omkar Marne (Inactive) added a comment - As per Dr. Freese, search function problem with the home page is a known issue. It usually happens when some one creates a new bioviz connect account ( which I did). We ran analysis on of the files and the result is as expected and we are able to the load the data in IGB. Closing the ticket.
          omarne Omkar Marne (Inactive) made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          omarne Omkar Marne (Inactive) made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          omarne Omkar Marne (Inactive) made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          omarne Omkar Marne (Inactive) made changes -
          Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
          omarne Omkar Marne (Inactive) made changes -
          Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
          omarne Omkar Marne (Inactive) made changes -
          Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
          omarne Omkar Marne (Inactive) made changes -
          Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
          omarne Omkar Marne (Inactive) made changes -
          Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
          omarne Omkar Marne (Inactive) made changes -
          Resolution Done [ 10000 ]
          Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]
          ann.loraine Ann Loraine made changes -
          Resolution Done [ 10000 ]
          Status Closed [ 6 ] To-Do [ 10305 ]
          ann.loraine Ann Loraine made changes -
          Assignee Karthik Raveendran [ karthik ] Omkar Marne [ omarne ]
          Hide
          ann.loraine Ann Loraine added a comment -

          Please describe the known issue above so that if it occurs again, someone search and find this ticket to learn what the "known issue" above actually is, and why it occurs.

          Show
          ann.loraine Ann Loraine added a comment - Please describe the known issue above so that if it occurs again, someone search and find this ticket to learn what the "known issue" above actually is, and why it occurs.
          omarne Omkar Marne (Inactive) made changes -
          Attachment Log in successful page.png [ 16803 ]
          omarne Omkar Marne (Inactive) made changes -
          Attachment Log out Page.png [ 16804 ]
          Hide
          omarne Omkar Marne (Inactive) added a comment - - edited

          Known issue:

          • I have a uploaded a .bed file on my account. ( Please see "Home page" sceenshot ). If I try to search the file on the Home page its not appearing in the search results. ( Please see "bug" screenshot.). It usually takes 24 to 72 hrs for the new user to appear his search results. For me its more than 72 hrs but I am not able to see the results.
          • Also, If try to log out and log back in, it redirects me to the production site https://www.bioviz.org/connect.html instead of testing site https://bvctest6.bioviz.org.

          I tried on chrome and firefox after clearing both their cache's but I am getting the same result.

          Karthik Raveendran Please look into it.

          Show
          omarne Omkar Marne (Inactive) added a comment - - edited Known issue: I have a uploaded a .bed file on my account. ( Please see "Home page" sceenshot ). If I try to search the file on the Home page its not appearing in the search results. ( Please see "bug" screenshot.). It usually takes 24 to 72 hrs for the new user to appear his search results. For me its more than 72 hrs but I am not able to see the results. Also, If try to log out and log back in, it redirects me to the production site https://www.bioviz.org/connect.html instead of testing site https://bvctest6.bioviz.org . I tried on chrome and firefox after clearing both their cache's but I am getting the same result. Karthik Raveendran Please look into it.
          omarne Omkar Marne (Inactive) made changes -
          Assignee Omkar Marne [ omarne ] Karthik Raveendran [ karthik ]
          Hide
          karthik Karthik Raveendran added a comment - - edited

          1) As discussed, the search error seems to happen only for new users for a certain period of time, and for older users, the search seems to work just fine. This is most likely because Cyverse is taking a while indexing files for new users for the search functionality or the indexing happens only periodically. Nevertheless, this does not seem to have anything to do with this ticket so it's not a blocker. Please check once more if the search works for your profile, Omkar Marne and if it does not a new ticket can be created for this.
          2) This is not a bug but intended behavior. When re-logging to BioViz Connect after logging out the user should be redirected to the production site, https://www.bioviz.org/connect.html, even if the user started off with the test server.

          Show
          karthik Karthik Raveendran added a comment - - edited 1) As discussed, the search error seems to happen only for new users for a certain period of time, and for older users, the search seems to work just fine. This is most likely because Cyverse is taking a while indexing files for new users for the search functionality or the indexing happens only periodically. Nevertheless, this does not seem to have anything to do with this ticket so it's not a blocker. Please check once more if the search works for your profile, Omkar Marne and if it does not a new ticket can be created for this. 2) This is not a bug but intended behavior. When re-logging to BioViz Connect after logging out the user should be redirected to the production site, https://www.bioviz.org/connect.html , even if the user started off with the test server.
          karthik Karthik Raveendran made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          karthik Karthik Raveendran made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          karthik Karthik Raveendran made changes -
          Assignee Karthik Raveendran [ karthik ]
          Hide
          omarne Omkar Marne (Inactive) added a comment - - edited

          Karthik Raveendran I checked with my profile again on production website https://www.bioviz.org/connect.html. Its still not working for me for the home page.

          Show
          omarne Omkar Marne (Inactive) added a comment - - edited Karthik Raveendran I checked with my profile again on production website https://www.bioviz.org/connect.html . Its still not working for me for the home page.
          ann.loraine Ann Loraine made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          ann.loraine Ann Loraine made changes -
          Status First Level Review in Progress [ 10301 ] To-Do [ 10305 ]
          karthik Karthik Raveendran made changes -
          Status To-Do [ 10305 ] In Progress [ 3 ]
          karthik Karthik Raveendran made changes -
          Assignee Karthik Raveendran [ karthik ]
          Hide
          karthik Karthik Raveendran added a comment -

          I will create a new investigate ticket for that and move this ticket to done

          Show
          karthik Karthik Raveendran added a comment - I will create a new investigate ticket for that and move this ticket to done
          karthik Karthik Raveendran made changes -
          Status In Progress [ 3 ] Needs 1st Level Review [ 10005 ]
          karthik Karthik Raveendran made changes -
          Status Needs 1st Level Review [ 10005 ] First Level Review in Progress [ 10301 ]
          karthik Karthik Raveendran made changes -
          Status First Level Review in Progress [ 10301 ] Ready for Pull Request [ 10304 ]
          karthik Karthik Raveendran made changes -
          Status Ready for Pull Request [ 10304 ] Pull Request Submitted [ 10101 ]
          karthik Karthik Raveendran made changes -
          Status Pull Request Submitted [ 10101 ] Reviewing Pull Request [ 10303 ]
          karthik Karthik Raveendran made changes -
          Status Reviewing Pull Request [ 10303 ] Merged Needs Testing [ 10002 ]
          karthik Karthik Raveendran made changes -
          Status Merged Needs Testing [ 10002 ] Post-merge Testing In Progress [ 10003 ]
          karthik Karthik Raveendran made changes -
          Resolution Done [ 10000 ]
          Status Post-merge Testing In Progress [ 10003 ] Closed [ 6 ]
          karthik Karthik Raveendran made changes -
          Link This issue is blocked by IGBF-2991 [ IGBF-2991 ]

            People

            • Assignee:
              karthik Karthik Raveendran
              Reporter:
              karthik Karthik Raveendran
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: