Using the wrong data type for a setting in profiles.json gives misleading "Missing '}' or object member name" error #6044

Closed
opened 2026-01-31 00:28:27 +00:00 by claunia · 2 comments
Owner

Originally created by @icheatatlan on GitHub (Jan 19, 2020).

Originally assigned to: @zadjii-msft on GitHub.

Environment

Windows build number: 10.0.18362.0
Windows Terminal version (if applicable): 0.8.10091.0


Any other software? 

Steps to reproduce

  1. Edit profiles.json
  2. Add a setting value with an inappropriate data type, eg:
{
  // ...
  "profiles": [
    {
      "guid": "...",
      // ...
      "fontSize": "12"  // <-- string instead of number
    }
  ]
}

Expected behavior

The 'Failed to reload settings' message box should present a message explaining that the offending setting has the wrong type.

Actual behavior

The 'Failed to reload settings' message box presents the following:

Settings could not be reloaded from file. Check for syntax errors, including trailing commas.

  • Line 34, Column 9
    Missing '}' or object member name
    Temporarily using the Windows Terminal default settings.
Originally created by @icheatatlan on GitHub (Jan 19, 2020). Originally assigned to: @zadjii-msft on GitHub. <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. If this is an application crash, please also provide a Feedback Hub submission link so we can find your diagnostic data on the backend. Use the category "Apps > Windows Terminal (Preview)" and choose "Share My Feedback" after submission to get the link. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 0.8.10091.0 Any other software? ``` # Steps to reproduce 1. Edit profiles.json 2. Add a setting value with an inappropriate data type, eg: ``` { // ... "profiles": [ { "guid": "...", // ... "fontSize": "12" // <-- string instead of number } ] } ``` # Expected behavior The 'Failed to reload settings' message box should present a message explaining that the offending setting has the wrong type. # Actual behavior The 'Failed to reload settings' message box presents the following: > Settings could not be reloaded from file. Check for syntax errors, including trailing commas. > * Line 34, Column 9 > Missing '}' or object member name > Temporarily using the Windows Terminal default settings.
Author
Owner

@zadjii-msft commented on GitHub (Jan 19, 2020):

Yep that looks wrong to me. We should give better errors in this case.

This also includes #2440, which is this error but specific to the defaultProfile setting. We really should handle this generically.

@zadjii-msft commented on GitHub (Jan 19, 2020): Yep that looks wrong to me. We should give better errors in this case. This also includes #2440, which is this error but specific to the `defaultProfile` setting. We really should handle this generically.
Author
Owner

@ghost commented on GitHub (Apr 22, 2020):

:tada:This issue was addressed in #4961, which has now been successfully released as Windows Terminal Preview v0.11.1121.0.🎉

Handy links:

@ghost commented on GitHub (Apr 22, 2020): :tada:This issue was addressed in #4961, which has now been successfully released as `Windows Terminal Preview v0.11.1121.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v0.11.1121.0) * [Store Download](https://www.microsoft.com/store/apps/9n0dx20hk701?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6044