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

Issue: Errors in configuration file prevent extension loading #390

Closed
skamansam opened this issue Aug 31, 2022 · 2 comments
Closed

Issue: Errors in configuration file prevent extension loading #390

skamansam opened this issue Aug 31, 2022 · 2 comments
Labels
bug Something isn't working Project: v8.1.0

Comments

@skamansam
Copy link

Describe the bug
If there are any validation errors in the frontmatter.json file, the extension fails to load anything but the sidebar icon and panel. When the panel is opened, there is a visible indeterminate progress bar but nothing else happens. Attempts to show the dashboard cause VSCode to throw an error that the frontmatter.dashboard command doesn't exist.

To Reproduce
Steps to reproduce the behavior:

  1. Open frontmatter.json
  2. add a comma at the end of a dictionary or invalidate the json is some other way.
  3. reload the window

Expected behavior

  1. A typical VSCode error notification is displayed upon extension load that says the frontmatter.json file has errors, and clicking on that notification will display the errors, as is typical for error reporting.
  2. The extension will load properly and all the default values are loaded instead.
  3. When going to the frontmatter dashboard, a notice is given that there a fontmatter.json file exists and that there are problems with it.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Linux (Fedora 36)
  • Browser n/a
  • Version: all
@skamansam skamansam added the bug Something isn't working label Aug 31, 2022
@estruyf
Copy link
Owner

estruyf commented Sep 1, 2022

@skamansam, thanks for opening an issue on this. We'll check what we can do to make the experience better.

@estruyf
Copy link
Owner

estruyf commented Sep 2, 2022

@skamansam, a new parser will be used to prevent these issues. Also, when it might happen again, it shows a message there is an issue with the frontmatter.json config and loads the default configuration.

estruyf added a commit that referenced this issue Sep 2, 2022
@estruyf estruyf added this to v8.1.0 Sep 2, 2022
@estruyf estruyf moved this to In Progress in v8.1.0 Sep 2, 2022
@estruyf estruyf removed this from v8.1.0 Sep 2, 2022
@estruyf estruyf closed this as completed Sep 22, 2022
@estruyf estruyf mentioned this issue Sep 22, 2022
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Project: v8.1.0
Projects
None yet
Development

No branches or pull requests

2 participants