Skip to content

settings.json seems not functioning as expected #4263

Closed

Description

@Oliver-Weng-Sorcerer

OS/Web Information

  • Web Browser: Chrome latest
  • Local OS:
  • Remote OS: GCP Ubuntu 20.04
  • Remote Architecture:
  • code-server --version: 3.12.0

Steps to Reproduce

  1. use gcp compute engine unbuntu image to spin up the vm machine.
  2. install latest 3.12.0
  3. put the below content at /home/xxx/.local/share/code-server/User/settings.json
{
    "workbench.colorTheme": "Monokai",
    "terminal.integrated.shell.linux": "/bin/bash",
    "workbench.startupEditor": "readme",
    "terminal.integrated.defaultProfile.linux": "bash"
}

Expected

the welcome page should not show up when the folder has the read me.

Actual

the welcome page showed up regardless of the "workbench.startupEditor": "readme"

Activity

  1. jsjoeio commented on Sep 28, 2021

    @jsjoeio
    Contributor

    I just tested and it works as expected.

    • Open a Folder without readme -> shows Welcome
    • Open a Folder with a readme -> shows readme

    image

    Are you sure your folder has a readme? I used readme.md and it worked. What's the folder tree look like for that folder you're trying?

    Are there any logs in the browser?

  2. Oliver-Weng-Sorcerer commented on Sep 29, 2021

    @Oliver-Weng-Sorcerer
    Author

    It's still reproducible on my end.

    here is the screen shots.
    Screen Shot 2021-09-29 at 1 21 17 PM
    Screen Shot 2021-09-29 at 1 25 30 PM

  3. jsjoeio commented on Sep 29, 2021

    @jsjoeio
    Contributor

    I don't know if casing is important. Your file is called README but I tried with readme because that's how you spelled it in settings.json. Can you try that?

    Also, those service worker errors happen if you're running code-server in an insecure environment (i.e. not using HTTPS).

  4. added
    waiting-for-infoWaiting for more information from submitter
    and removed
    needs-investigationThis issue needs to be further investigated
    on Sep 29, 2021
  5. Oliver-Weng-Sorcerer commented on Sep 29, 2021

    @Oliver-Weng-Sorcerer
    Author

    to reproduce, I think all you need to do is open it in incog mode.

    I think it's reading the setting from browser storage, instead of the server side. (Or maybe it got overriden due to certain timing difference.)

    Please let me know if you can reproduce it via incog mode.

    @jsjoeio

  6. jsjoeio commented on Sep 29, 2021

    @jsjoeio
    Contributor

    Okay I just tested in incognito and I cannot reproduce :( I wonder if it's related to you not using a secure environment. Can you please try with code-server running via HTTPS? You can use code-server --link

    Screen.Recording.2021-09-29.at.12.22.16.PM.mov
  7. Oliver-Weng-Sorcerer commented on Sep 29, 2021

    @Oliver-Weng-Sorcerer
    Author

    Hi @jsjoeio ,

    I made an example of how to reproduce and sent an email to

    Let me know if you can reproduce with the link I sent.

  8. jsjoeio commented on Sep 29, 2021

    @jsjoeio
    Contributor

    @OliverwengFiltered ahh... do you mind posting here instead? That way, it's all documented in public and others will be able to see it. (that's my personal email and shouldn't be used, I only use it for commits so everything is tied to the same address. joe@coder.com should be used but only if I ask you too)

  9. jsjoeio commented on Sep 29, 2021

    @jsjoeio
    Contributor

    @OliverwengFiltered Okay I took a look and I see what you mean but until we resolve other issues, I don't think we can isolate this down. Can you please try using HTTPS and seeing if the issue persists?

    Remember, you're telling VS Code to use a readme instead of the Welcome page. It renders the readme in a webview. Webviews are not guaranteed to work properly in insecure environments (i.e. HTTP), which is what you're using. I can't say that's forsure the issue, but unfortunately, you need to test and see if that resolves it, otherwise I won't be able to help!

  10. Oliver-Weng-Sorcerer commented on Sep 29, 2021

    @Oliver-Weng-Sorcerer
    Author

    @jsjoeio ,

    I'm sorry for the email thing.

    Back to the topic: I have a proxy on my local and it's https enabled, but can still produce the same issue.

    and also if I downgrade the version of the code server to previous one, it works fine.

  11. Oliver-Weng-Sorcerer commented on Sep 29, 2021

    @Oliver-Weng-Sorcerer
    Author

    it almost feels like this issue happens again: #2274

  12. jsjoeio commented on Sep 29, 2021

    @jsjoeio
    Contributor

    I'm sorry for the email thing.

    No worries at all! Happens all the time. Thanks for understanding!

    Back to the topic: I have a proxy on my local and it's https enabled, but can still produce the same issue.

    Interesting...so when you use the proxy + https, do the service workers go away?

    and also if I downgrade the version of the code server to previous one, it works fine.

    argh. that's no good. Hmm...is there anything else about your setup that might be related? i.e. what does your config.yaml look like or what flags are you using with code-server?

    I think @code-asher fixed an issue with this in the past. Maybe he has an idea

  13. code-asher commented on Oct 1, 2021

    @code-asher
    Member
  14. prabushi commented on Nov 11, 2021

    @prabushi

    I'm facing a similar issue.

    code-server: v3.12.0
    VS Code: v1.60.0
    Commit: 4cd55f94c0a72f05c18cea070e10b969996614d2
    Date: 2021-09-15T19:34:37Z (1 mo ago)
    Browser: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
    

    Have the following in User/setting.json

    {
        "workbench.startupEditor": "none"
    }
    

    It goes to the Getting Started walkthrough page at the start if I try the code-server on an incognito window.
    Screenshot 2021-11-11 at 13 46 21
    However, once I Mark Done on this walkthrough page and reload the window, VS Code behaves according to the defined settings in the current incognito view.
    If I close the incognito window and open a new incognito window, I get the Getting Started walkthrough page again. (Suppose the code-server uses browser storage to preserve states)

    @jsjoeio @code-asher
    Could you please let me know if there's a way to skip this Getting Started walkthrough page at the start?

  15. jsjoeio commented on Nov 12, 2021

    @jsjoeio
    Contributor

    User/setting.json

    Looks like you have a typo -> should be settings.json. Does that fix it?

    Otherwise, @code-asher just fixed this in our e2e test suite with that same setting and it worked. See here. There could be something else at play

  16. prabushi commented on Nov 13, 2021

    @prabushi

    Thanks for the reply.

    Looks like you have a typo -> should be settings.json. Does that fix it?

    My bad, it's settings.json.

    Otherwise, @code-asher just fixed this in our e2e test suite with that same setting and it worked. See here. There could be something else at play

    Will check once the new release is available.

  17. jsjoeio commented on Nov 15, 2021

    @jsjoeio
    Contributor

    Will check once the new release is available.

    Sorry, you shouldn't have to wait for a release to check this! We haven't added anything new. I'm saying that he fixed it in an e2e test meaning I know it's currently working as expected

  18. prabushi commented on Nov 30, 2021

    @prabushi

    Will check once the new release is available.

    Sorry, you shouldn't have to wait for a release to check this! We haven't added anything new. I'm saying that he fixed it in an e2e test meaning I know it's currently working as expected

    I tried with the codercom/code-server:latest docker image. Still, the behavior is the same.

    720.mov

    Once I clear the cache, the welcome page pops up for the first time even with the "workbench.startupEditor": "none" setting. But, it honors the setting when I reload the window. We are trying to avoid this welcome page popping up for the first time.

    I'm not sure if it's the same code-server version that is used in your e2e tests. Is there a way to access the version that is used in your e2e tests environment?

  19. jsjoeio commented on Nov 30, 2021

    @jsjoeio
    Contributor

    Once I clear the cache, the welcome page pops up for the first time even with the "workbench.startupEditor": "none" setting.

    Hmm this is very strange 🤔

    I'm not sure if it's the same code-server version that is used in your e2e tests

    Our e2e tests use the latest version (which isn't released). It will be 4.0.0 when it comes out.

    Is there a way to access the version that is used in your e2e tests environment?

    You could download the release-packages artifact from CI. It will have all the releases (it's a big file). Then you can run locally.

    # download folder
    cd release-packages 
    # example: macOS
    tar -xzf code-server-3.12.0-macos-amd64.tar.gz
    ./code-server-3.12.0-macos-amd64/ <pass flags here>
  20. benz0li commented on Dec 11, 2021

    @benz0li
    Contributor

    @prabushi #4263 (comment) (Repeated Getting Started walkthrough) has to do with #4212.

    With 'incognito mode'/'private windows' there is no way to skip the Getting Started walkthrough page, as this prevents storing browser data.

  21. code-asher commented on Dec 14, 2021

    @code-asher
    Member

    This is an interesting comment:

    https://github.com/microsoft/vscode/blob/25d0e27e292fad4454151b85521014d4c92a3aa7/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts#L53

    Looks like there are some conditions in which the welcome page will always show up regardless of startupEditor's value.

  22. kfriend commented on Feb 14, 2022

    @kfriend

    Per @code-asher's comment, and this line https://github.com/microsoft/vscode/blob/25d0e27e292fad4454151b85521014d4c92a3aa7/src/vs/workbench/contrib/welcome/page/browser/welcomePage.ts#L55, I would assume disabling telemetry would disable the welcome screen even for first-load incognito. Seems to work for me.

    "telemetry.enableTelemetry": false
    
  23. code-asher commented on Mar 12, 2024

    @code-asher
    Member

    Closing since I think this is working as intended at the moment. But let me know if I missed something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    waiting-for-infoWaiting for more information from submitter

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions