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

Windows Terminal may not open if profiles.json is corrupted #1499

Closed
Karl-WE opened this issue Jun 23, 2019 · 7 comments
Closed

Windows Terminal may not open if profiles.json is corrupted #1499

Karl-WE opened this issue Jun 23, 2019 · 7 comments
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Fix-Available It's available in an Insiders build or a release

Comments

@Karl-WE
Copy link

Karl-WE commented Jun 23, 2019

Environment

Windows build number: Windows 10 1903

Windows Terminal version (if applicable): 0.2.1715.0

Any other software?

Steps to reproduce

edit profiles.json e.g. I tried to copy and paste some schemas from this templated
https://gist.github.com/mehulmpt/16826be279bb9bf70310b465ca9c5de3

After saving everything was fine and I really took care about not doing a mistake in the json formatting. However after closing and reopening Windows terminal

copy line 63 to 131 at the appropriate spot in profiles.json
https://gist.github.com/fcharlie/7530d36175bc5249f1ae92be536238cd

Expected behavior

The file should be checked for errors on startup of Windows Terminal. If there is an error it should fallback to a default config
also see #1404

Actual behavior

Windows Terminal does not start. no error message.

workaround

fully reset the app in app and features

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Jun 23, 2019
@celsojr
Copy link

celsojr commented Jun 24, 2019

IHMO an option like "restore defaults" would be great as well

@Shorotshishir
Copy link

Shorotshishir commented Jun 24, 2019

As of now, I couldn't find the fallback values implemented in the source. I believe it is directly dependent on the profile.json, which is really a good thing for testing,
UPDATE : they are in the DefaultSettings.h,
There should be a file that keeps the default values as it comes. the profile.json should be the file that overrides the default.json so that, while the user goes full-on experimental on the profile the functionality doesn't hamper. Just warn them that which part is falling back to default. thus giving a regular user quite a good range of customizability without fear and a power user the ultimate access.

@DHowett-MSFT
Copy link
Contributor

We are fairly sure we added a dialog for this... if you’re not seeing it, that’s pretty surprising.

We have an issue tracking having a defaults file. #754

@DHowett-MSFT DHowett-MSFT added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jun 24, 2019
@Shorotshishir
Copy link

@DHowett what I really wanted to point out is to have a separate file with default values like we now have a profile.json.

@yodurr yodurr added Area-Settings Issues related to settings and customizability, for console or terminal Product-Terminal The new Windows Terminal. Issue-Bug It either shouldn't be doing this or needs an investigation. labels Jun 25, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 25, 2019
@Karl-WE
Copy link
Author

Karl-WE commented Jun 25, 2019

We are fairly sure we added a dialog for this... if you’re not seeing it, that’s pretty surprising.

We have an issue tracking having a defaults file. #754

Hi @DHowett I can confirm the dialog is popping up in some certain conditions.
see this image:
image

example:
prerequisited: Windows Terminal is opened
user edits xml e.g. Notepad++ or code write uwp app
proflle.json gets edited and contains a parsing error
hit the save button in your editor > terminal will make a popup

possible problems:
editors with no code highlighting might be an issue - user problem
the error message will popup as a modal window, however if a user has terminal in the background he might not be aware about this
additionally the modal window will NOT prevent to close the Terminal from the taskbar (right click > close)

current situation:
there seems to be a fix since my report. Terminal will open with default settings
image

suggestion:
prevent closing the terminal app with an active modal window that is warning you about a json parsing error.

implement a button to reset the profile.json. in case it is corrupted there is no other way than Windows apps reset at the moment

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jun 25, 2019
@DHowett-MSFT
Copy link
Contributor

This'll be helped in part by #1348. The dialog should be working in all cases. Feel free to open a new issue if the dialog really isn't working.

@DHowett-MSFT DHowett-MSFT added Resolution-Fix-Available It's available in an Insiders build or a release and removed Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 27, 2019
@Karl-WE
Copy link
Author

Karl-WE commented Jun 28, 2019

Agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings Issues related to settings and customizability, for console or terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Fix-Available It's available in an Insiders build or a release
Projects
None yet
Development

No branches or pull requests

5 participants