Skip to content

[Bug]: Unable to reproduce last opened file in Firefox privacy mode #5043

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

Closed
3 tasks done
AliceSync opened this issue Mar 30, 2022 · 11 comments
Closed
3 tasks done

[Bug]: Unable to reproduce last opened file in Firefox privacy mode #5043

AliceSync opened this issue Mar 30, 2022 · 11 comments
Labels
bug Something isn't working
Milestone

Comments

@AliceSync
Copy link

AliceSync commented Mar 30, 2022

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser:Firefox 98
  • Local OS:Windows 10
  • Remote OS:Centos
  • Remote Architecture:amd64
  • code-server --version:4.2.0

Steps to Reproduce

1.open dir
2.open file
3.refresh your browser

Expected

Reproduce all files that were open before I refreshed the browser

Actual

Welcome screen opened

Logs

null

Screenshot/Video

null

Does this issue happen in VS Code?

  • I cannot reproduce this in VS Code.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

I'm guessing it happened because some version after 3.4 you changed the code of vscode which caused it to record the last opened saved file somewhere in the browser, but this is not desirable because you There's no guarantee you're always using the same client, it should be saved in the server, not the client, in previous versions it worked fine, I guess this change is a very unfortunate one, it loses portability isn't it? We should keep all data on the server so we can access it anytime to keep our development environment consistent forever.

A digression: in edge, if you enable https without configuring a certificate and use ip to access the web page, an error will occur that the view is loaded abnormally, and the color display in the code edit box is unavailable. I don't know if you care about this error, but I think I should tell you that through the tool I found that there was a certificate error when loading the two js, so this happened, it was initiated by a js,changing this may solve the error

@AliceSync AliceSync added bug Something isn't working triage This issue needs to be triaged by a maintainer labels Mar 30, 2022
@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 30, 2022

I believe it's stored in localStorage which is why it wouldn't work across different browsers 🤔 But I think that's how it's handled in VS Code so I believe you'd have to change it in VS Code itself. @code-asher can correct me if that's wrong.

in edge, if you enable https without configuring a certificate and use ip to access the web page, an error will occur that the view is loaded abnormally

I don't think we can do much about this. Most of code-server/VS Code uses service workers for main features so we need HTTPS or a secure context in order for the browser to enable service workers. We don't have control of this.

@code-asher
Copy link
Member

code-asher commented Mar 30, 2022

It is still opening the last directory/workspace, just not the files inside it right? @jsjoeio is right about those being stored in the browser. I looked into patching this to use the remote file system but it appeared non-trivial and we generally try to stay in line with upstream. We could submit the issue upstream with a reproduction on vscode.dev.

@code-asher
Copy link
Member

However if someone does come up with a minimal patch that fixes this we would definitely be happy to merge it!

@jsjoeio jsjoeio added help-wanted and removed triage This issue needs to be triaged by a maintainer labels Mar 30, 2022
@jsjoeio jsjoeio added this to the Backlog milestone Mar 30, 2022
@AliceSync
Copy link
Author

It is still opening the last directory/workspace, just not the files inside it right? @jsjoeio is right about those being stored in the browser. I looked into patching this to use the remote file system but it appeared non-trivial and we generally try to stay in line with upstream. We could submit the issue upstream with a reproduction on vscode.dev.

Yes, it behaves like that, very much hope this problem can be solved well

@AliceSync
Copy link
Author

I believe it's stored in localStorage which is why it wouldn't work across different browsers 🤔 But I think that's how it's handled in VS Code so I believe you'd have to change it in VS Code itself. @code-asher can correct me if that's wrong.

in edge, if you enable https without configuring a certificate and use ip to access the web page, an error will occur that the view is loaded abnormally

I don't think we can do much about this. Most of code-server/VS Code uses service workers for main features so we need HTTPS or a secure context in order for the browser to enable service workers. We don't have control of this.

https is just a digression, I just found the problem while doing coverage testing and it can be ignored.

@AliceSync
Copy link
Author

thank dedication :)

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 30, 2022

Yes, it behaves like that, very much hope this problem can be solved well

Do you want to open an issue upstream in vscode?

@AliceSync
Copy link
Author

Yes, it behaves like that, very much hope this problem can be solved well

Do you want to open an issue upstream in vscode?

This decision is up to you, I am a loyal codeserver user. :)

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 30, 2022

This decision is up to you, I am a loyal codeserver user. :)

Hahaha well, if you do it, and we fix in vscode, then we can upgrade and get it in code-server so it'll help everyone :) We'd love for you to open it there since that could help both the vscode and the code-server community!

@benz0li
Copy link
Contributor

benz0li commented Apr 4, 2022

Related to #4212.

@code-asher
Copy link
Member

Close in favor of #4212

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants