-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Restore workspace open files across multiple instances #7983
Comments
The error is weird. We have a guard that if indexeddb is not available then we don't use it. It seems in your env there is indexeddb support but it throws internal errors. Could you dig what is causing internal errors? |
Maybe it's a generic issue with electron: electron/electron#10792 (comment) Edit: here is another useful comment:
|
Here is a partial solution:
In a couple places there's code using session.defaultSession to return the default session object, which I presume can be replaced by session.fromPartition("persist:partitionName"). However, in my initial tests, the websocket connection gets refused, indicating I'm missing something. |
Could you test whether it is still the issue with Electron 9? Here is a PR which we hope to land next month: #7968 |
I tested that PR branch this afternoon on RHEL 7.8. The issue still exists in Electron 9. Incidentally, as I do not have root access, I had to run that branch as
|
I am also interested in this issue and will try to share my findings here. |
The PR to allow electron-main process customization is almost a solution for us, except for the error below. If we set It looks like it's interpreting In the existing |
@gbodeen Do you get this error when running Theia from sources or is it from a bundled app? |
@gbodeen I think the issue you've reported has been fixed by the latest commit pushed on that branch/PR. |
Bug Description:
Expected: When re-opening a workspace, the editor pane should display the same open files as were open last time the workspace was in use.
Actual: Instances of Theia after the first open the workspace but do not restore tabs. This error appears in the console:
This becomes relevant when Theia is bundled as an application (for distribution similar to VS Code). Users will commonly try to launch multiple instances of the application, each for use with a different workspace, but currently this will not give the expected user experience.
I'm not 100% confident this is a bug rather than an intentional, temporary limitation. In any case, VS Code does not have this limitation.
Steps to Reproduce:
yarn && yarn start:electron
. Assuming you've previously opened multiple different workspaces, useFile > Open Recent Workspace
to launch new windows with those workspace. This works as expected, displaying the files that were last open. Close all instances.yarn start:electron
to start separate instances. The first instance will display the files that were last open; the second will not. UseFile > Open Recent Workspace
in each instance for additional examples; the first instance will continue to restore open files, because it has access to the indexedDB, and the second will not restore them.Additional Information
The text was updated successfully, but these errors were encountered: