brrd / abricotine

Markdown editor with inline preview
GNU General Public License v3.0
2.63k stars 156 forks source link

Bad config.json at change speelling to spanish on linux #87

Closed aeroreyna closed 5 years ago

aeroreyna commented 8 years ago

I changed the spelling to Spanish, and then close the app. When I try to open another file or just the app again it show an alert that said:

Uncaught Exception: Error: Error parsing your configuration file: [/home/aeromint/.config/chromium/Abricotine/app/config.json]: Unexpected token } at File.loadSync (/home/aeromint/Downloads/Abricotine-linux-x64/resources/app.asar/node_modules/nconf/lib/nconf/stores/file.js:153:11) at Provider.add (/home/aeromint/Downloads/Abricotine-linux-x64/resources/app.asar/node_modules/nconf/lib/nconf/provider.js:137:23) at Provider.file (/home/aeromint/Downloads/Abricotine-linux-x64/resources/app.asar/node_modules/nconf/lib/nconf/provider.js:63:15) at createConfig (/home/aeromint/Downloads/Abricotine-linux-x64/resources/app.asar/app/abr-window.js:36:10) at Object.AbrWindow (/home/aeromint/Downloads/Abricotine-linux-x64/resources/app.asar/app/abr-window.js:52:19) at Object.AbrApplication.open (/home/aeromint/Downloads/Abricotine-linux-x64/resources/app.asar/app/abr-application.js:86:17) at Object.AbrApplication.run (/home/aeromint/Downloads/Abricotine-linux-x64/resources/app.asar/app/abr-application.js:99:14) at /home/aeromint/Downloads/Abricotine-linux-x64/resources/app.asar/app/theme-loader.js:36:29 at /home/aeromint/Downloads/Abricotine-linux-x64/resources/app.asar/app/files.js:162:17 at FSReqWrap.oncomplete (fs.js:82:15)

If I remove the config.json it works, but if I put Spanish spelling it happen again.

First time trying to report an issue, I hope I did well. Blessings

aeroreyna commented 8 years ago

I check the config file, it add two }} at the end, when change the spelling, delete them and it works again with the spanish spelling. Also it do not add them again if you close an open the app. So it has to be somewhere in the config.json save file part of the script.

brrd commented 8 years ago

Waow! This one is weird :open_mouth: Thanks for reporting.

brrd commented 8 years ago

I used to reproduce this issue but for some reason I can't do it any more. Do you still get this error? Did you try to start Abricotine with the --reset flag (which clears the whole config directory).