Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor tabs are not restored after refreshing browser tab #15317

Closed
3 of 19 tasks
dmytro-ndp opened this issue Nov 26, 2019 · 12 comments
Closed
3 of 19 tasks

Editor tabs are not restored after refreshing browser tab #15317

dmytro-ndp opened this issue Nov 26, 2019 · 12 comments
Assignees
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system.

Comments

@dmytro-ndp
Copy link
Contributor

dmytro-ndp commented Nov 26, 2019

Describe the bug

The selenium tests fails because Editor tabs are not restored after refreshing browser tab.
screencast-che-eclipse-che 10 33 177 124 nip io-2019 11 26-13_58_51

Driver info: org.eclipse.che.selenium.core.SeleniumWebDriver
	at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:80)
	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:265)
	at org.eclipse.che.selenium.core.webdriver.SeleniumWebDriverHelper.waitVisibility(SeleniumWebDriverHelper.java:151)
	at org.eclipse.che.selenium.core.webdriver.SeleniumWebDriverHelper.waitVisibility(SeleniumWebDriverHelper.java:161)
	at org.eclipse.che.selenium.pageobject.theia.TheiaEditor.waitEditorTab(TheiaEditor.java:126)
	at org.eclipse.che.selenium.workspaces.ProjectStateAfterRefreshTest.checkFilesAreOpened(ProjectStateAfterRefreshTest.java:89)
	at org.eclipse.che.selenium.workspaces.ProjectStateAfterRefreshTest.checkRestoreStateOfProjectAfterRefreshTest(ProjectStateAfterRefreshTest.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:696)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:882)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1189)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//ul[@class='p-TabBar-content']//li[contains(@title, 'pom.xml')]"}
  (Session info: chrome=71.0.3578.98)
  (Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 3.10.0-862.11.6.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)

org eclipse che selenium workspaces ProjectStateAfterRefreshTest checkRestoreStateOfProjectAfterRefreshTest_time-1574715575042-millis

Driver info: org.eclipse.che.selenium.core.SeleniumWebDriver
	at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:80)
	at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:265)
	at org.eclipse.che.selenium.core.webdriver.SeleniumWebDriverHelper.waitVisibility(SeleniumWebDriverHelper.java:151)
	at org.eclipse.che.selenium.core.webdriver.SeleniumWebDriverHelper.waitVisibility(SeleniumWebDriverHelper.java:161)
	at org.eclipse.che.selenium.pageobject.theia.TheiaEditor.waitEditorTab(TheiaEditor.java:126)
	at org.eclipse.che.selenium.workspaces.ProjectStateAfterRenameWorkspaceTest.checkFilesAreOpened(ProjectStateAfterRenameWorkspaceTest.java:109)
	at org.eclipse.che.selenium.workspaces.ProjectStateAfterRenameWorkspaceTest.checkProjectAfterRenameWs(ProjectStateAfterRenameWorkspaceTest.java:94)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:696)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:882)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1189)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//ul[@class='p-TabBar-content']//li[contains(@title, 'pom.xml')]"}
  (Session info: chrome=71.0.3578.98)
  (Driver info: chromedriver=2.45.615279 (12b89733300bd268cff3b78fc76cb8f3a7cc44e5),platform=Linux 3.10.0-862.11.6.el7.x86_64 x86_64) (WARNING: The server did not provide any stacktrace information)

org eclipse che selenium workspaces ProjectStateAfterRenameWorkspaceTest checkProjectAfterRenameWs_time-1574715617388-millis

Che version

  • latest
  • nightly
  • other: please specify

Runtime

  • kubernetes (include output of kubectl version)
  • Openshift 3.9 (include output of oc version)
  • minikube (include output of minikube version and kubectl version)
  • minishift (include output of minishift version and oc version)
  • docker-desktop + K8S (include output of docker version and kubectl version)
  • other: (please specify)

Environment

  • my computer
    • Windows
    • Linux
    • macOS
  • Cloud
    • Amazon
    • Azure
    • GCE
    • other (please specify)
  • other: Codenvy CI
@dmytro-ndp dmytro-ndp added kind/bug Outline of a bug - must adhere to the bug report template. e2e-test/failure Issues that is related to a test failures reported by our CI platform and our QE. team/che-qe labels Nov 26, 2019
@che-bot che-bot added the status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. label Nov 26, 2019
@SkorikSergey
Copy link
Contributor

SkorikSergey commented Nov 26, 2019

The selenium tests fails because Editor tabs are not restored after refreshing browser tab.

screencast-che-eclipse-che 10 33 177 124 nip io-2019 11 26-13_58_51

@dmytro-ndp dmytro-ndp changed the title Investigate failure of ProjectStateAfterRefreshTest and ProjectStateAfterRenameWorkspaceTest Editor tabs are not restored after refreshing browser tab Nov 26, 2019
@dmytro-ndp dmytro-ndp added area/editor/theia Issues related to the che-theia IDE of Che and removed e2e-test/failure Issues that is related to a test failures reported by our CI platform and our QE. team/che-qe labels Nov 26, 2019
@l0rd l0rd added severity/P2 Has a minor but important impact to the usage or development of the system. team/ide2 and removed status/need-triage An issue that needs to be prioritized by the curator responsible for the triage. See https://github. labels Nov 26, 2019
@l0rd
Copy link
Contributor

l0rd commented Nov 26, 2019

Out of curiosity why do you need to refresh? This smells like a workaround for another issue. I am setting P2 because I don't consider refreshing the browser something a user should do so this issue doesn't have a big impact on users.

Of course if that affects tests it should be fixed and priority raised. But I would prefer if we remove the refresh in the test case.

@dmytro-ndp
Copy link
Contributor Author

There are dedicated E2E tests, which check that tabs are being restored after refresh of browser tab. That beheviour was treated as important, so as it's quite usual situation when user has a lot of opened files, and from some reasons has lost connection to server, or workspace has stopped by timeout. And it's expected user would not need to find and reopen files after restoring access to his workspace.

@tolusha
Copy link
Contributor

tolusha commented Nov 27, 2019

@dmytro-ndp
Is it used to work before?

@dmytro-ndp
Copy link
Contributor Author

@tolusha: looks like it doesn't work after restart of workspace #14717

@dmytro-ndp
Copy link
Contributor Author

There is related problem appeared after refresh #15332

@l0rd
Copy link
Contributor

l0rd commented Nov 27, 2019

Ok thanks for the explanation @dmytro-ndp. In this case, if it's not a workaround to bypass some other problem, I think we should fix this issue (and hopefully #15332 would address it).

@Katka92
Copy link
Contributor

Katka92 commented Dec 11, 2019

The PR seems to be merged, but I can still reproduce on nightly Che.

@RomanNikitenko
Copy link
Member

RomanNikitenko commented Dec 11, 2019

I investigated the issue #15332 and found that the cause of the problem was related to task schema and validation system for tasks. It was fixed within the corresponding PRs to theia and che-theia projects.

I think here is another cause of the problem, so it's still relevant issue.

@azatsarynnyy
Copy link
Member

Closing as I cannot reproduce it anymore. Feel free to reopen if needed.

@SkorikSergey
Copy link
Contributor

This issue reproduces on 7.8.0-SNAPSHOT.

Screencast:
screencast-che-eclipse-che 10 33 177 124 nip io-2020 01 14-15_53_56

@SkorikSergey SkorikSergey reopened this Jan 14, 2020
@azatsarynnyy
Copy link
Member

Thanks @SkorikSergey for checking it!

@vzhukovs vzhukovs assigned vzhukovs and unassigned SkorikSergey Jan 15, 2020
@vzhukovs vzhukovs added the status/in-progress This issue has been taken by an engineer and is under active development. label Jan 15, 2020
@vzhukovs vzhukovs removed the status/in-progress This issue has been taken by an engineer and is under active development. label Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/editor/theia Issues related to the che-theia IDE of Che kind/bug Outline of a bug - must adhere to the bug report template. severity/P2 Has a minor but important impact to the usage or development of the system.
Projects
None yet
Development

No branches or pull requests

10 participants