Settings from settings.json lost when updated to Version: 1.7.1033.0 #13498

Closed
opened 2026-01-31 03:44:19 +00:00 by claunia · 12 comments
Owner

Originally created by @miwojc on GitHub (Apr 16, 2021).

Windows Terminal version (or Windows build number)

1.7.1033.0

Other Software

No response

Steps to reproduce

  1. Windows Terminal installed via Microsoft Store
  2. Saved settings to settings.json file:
  • defaults for profiles: fontFace, colorScheme
  • anaconda prompt profile
  1. Updated via Microsoft Store to Version: 1.7.1033.0
  2. Lost defaults and anaconda profile

Expected Behavior

Keep user defined settings on update.

Actual Behavior

Lost user defined settings on update

Originally created by @miwojc on GitHub (Apr 16, 2021). ### Windows Terminal version (or Windows build number) 1.7.1033.0 ### Other Software _No response_ ### Steps to reproduce 1. Windows Terminal installed via Microsoft Store 2. Saved settings to settings.json file: * defaults for profiles: fontFace, colorScheme * anaconda prompt profile 3. Updated via Microsoft Store to Version: 1.7.1033.0 4. Lost defaults and anaconda profile ### Expected Behavior Keep user defined settings on update. ### Actual Behavior Lost user defined settings on update
Author
Owner

@htcfreek commented on GitHub (Apr 17, 2021):

For me the setting to hide azure profile is lost

@htcfreek commented on GitHub (Apr 17, 2021): For me the setting to hide azure profile is lost
Author
Owner

@zadjii-msft commented on GitHub (Apr 19, 2021):

This is curious. Could you share your setting.json file? It should be in somewhere like:

C:\Users\<username>\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json
@zadjii-msft commented on GitHub (Apr 19, 2021): This is curious. Could you share your setting.json file? It should be in somewhere like: ``` C:\Users\<username>\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json ```
Author
Owner

@miwojc commented on GitHub (Apr 19, 2021):

Attached are: current settings.json (after update and added color thme and font) and backup before the update (this is system autobackup i think)

settings.zip

@miwojc commented on GitHub (Apr 19, 2021): Attached are: current settings.json (after update and added color thme and font) and backup before the update (this is system autobackup i think) [settings.zip](https://github.com/microsoft/terminal/files/6335897/settings.zip)
Author
Owner

@zadjii-msft commented on GitHub (Apr 29, 2021):

Interesting. When you open the Terminal, and hit the settings button, and open the json file from the settings, what's the path of that file?

@zadjii-msft commented on GitHub (Apr 29, 2021): Interesting. When you open the Terminal, and hit the settings button, and open the json file from the settings, what's the path of _that_ file?
Author
Owner

@miwojc commented on GitHub (Apr 29, 2021):

C:\Users\miwoj\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState

@miwojc commented on GitHub (Apr 29, 2021): C:\Users\miwoj\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState
Author
Owner

@zadjii-msft commented on GitHub (Apr 29, 2021):

Hmm. Curious. We had a theory that you were running into the bug where the OS decides to break your package and run the Terminal unpackaged. That would have led to a different path for the settings.json file, but that busts that theory.

Did you ever try editing the settings with the Settings UI? Maybe somehow we wrote out the default settings to the file, instead of your actual settings. Because the backup definitely has the settings you're missing, but I have no idea why they got lost. @carlos-zamora any ideas?

@zadjii-msft commented on GitHub (Apr 29, 2021): Hmm. Curious. We had a theory that you were running into the bug where the OS decides to break your package and run the Terminal unpackaged. That would have led to a different path for the `settings.json` file, but that busts that theory. Did you ever try editing the settings with the Settings UI? Maybe somehow we wrote out the default settings to the file, instead of your actual settings. Because the backup definitely has the settings you're missing, but I have no idea why they got lost. @carlos-zamora any ideas?
Author
Owner

@carlos-zamora commented on GitHub (Apr 30, 2021):

Here's what I've investigated so far:

  • CascadiaSettings::_WriteSettings():
    • We only ever write _userSettingsString and ToJson().
    • ToJson() was definitely called because we wrote out all the color schemes. So WriteSettingsToDisk was called, and that had to be from the Settings UI because that's the only place the API is called from.

A one thing that's throwing me off: Why is there a // "colorScheme": "One Half Dark", in your settings.json? We only write out comments in the actions because we literally copy/paste them from what you had before.

Could it be that you had the settings.json file open in a text editor somewhere? Added that comment in, and when WT got updated, you somehow pressed the Settings UI save button?

Idk, this feels like I'm grasping at straws haha. Let me know if any of that sounds right? :/

@carlos-zamora commented on GitHub (Apr 30, 2021): Here's what I've investigated so far: - `CascadiaSettings::_WriteSettings()`: - We only ever write `_userSettingsString` and `ToJson()`. - `ToJson()` was definitely called because we wrote out all the color schemes. So `WriteSettingsToDisk` was called, and that had to be from the Settings UI because that's the only place the API is called from. A one thing that's throwing me off: Why is there a `// "colorScheme": "One Half Dark",` in your settings.json? We _only_ write out comments in the actions because we literally copy/paste them from what you had before. Could it be that you had the settings.json file open in a text editor somewhere? Added that comment in, and when WT got updated, you somehow pressed the Settings UI save button? Idk, this feels like I'm grasping at straws haha. Let me know if any of that sounds right? :/
Author
Owner

@miwojc commented on GitHub (Apr 30, 2021):

Thank you for looking into that.
i had these two lines in settings json file so i could change color scheme by commenting out either dark or light theme. i used to had these in settings before update. after update these settings were lost. so i added these two lines of code (one with comment) after the update. but as you say difficult to find out what happened really. appreciate your help. i am fine closing this one. thank you again!

@miwojc commented on GitHub (Apr 30, 2021): Thank you for looking into that. i had these two lines in settings json file so i could change color scheme by commenting out either dark or light theme. i used to had these in settings before update. after update these settings were lost. so i added these two lines of code (one with comment) after the update. but as you say difficult to find out what happened really. appreciate your help. i am fine closing this one. thank you again!
Author
Owner

@zadjii-msft commented on GitHub (Nov 8, 2021):

@miwojc Any chance this is still happening to you? Especially on 1.12? We really shouldn't be losing profiles on saving the settings. But it's been a few releases of the Terminal now, and we've fixed a lot of other code in this area that might have taken care of this.

@zadjii-msft commented on GitHub (Nov 8, 2021): @miwojc Any chance this is still happening to you? Especially on 1.12? We really shouldn't be losing profiles on saving the settings. But it's been a few releases of the Terminal now, and we've fixed a lot of other code in this area that might have taken care of this.
Author
Owner

@ghost commented on GitHub (Nov 12, 2021):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Nov 12, 2021): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@miwojc commented on GitHub (Nov 12, 2021):

i had settings lost one more time after previous report

@miwojc commented on GitHub (Nov 12, 2021): i had settings lost one more time after previous report
Author
Owner

@zadjii-msft commented on GitHub (Feb 2, 2022):

Hmm. I think we made some changes in either 1.11 or 1.12 that should have mitigated this. I know you mentioned that this happened again for you, but any idea what version that was on? If it was before 1.11 then I suspect you haven't seen it since then.

I'm gonna close this out for now, since we haven't gotten any other reports. If you do notice this happening on 1.12+, lemme know and we'll reopen and reinvestigate. Thanks!

@zadjii-msft commented on GitHub (Feb 2, 2022): Hmm. I think we made some changes in either 1.11 or 1.12 that should have mitigated this. I know you mentioned that this happened again for you, but any idea what version that was on? If it was before 1.11 then I suspect you haven't seen it since then. I'm gonna close this out for now, since we haven't gotten any other reports. If you do notice this happening on 1.12+, lemme know and we'll reopen and reinvestigate. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#13498