BotFramework-Composer: Cannot start Composer 1.2.1 desktop version

Describe the bug

Cannot start Composer

Version

BotFramework-Composer-1.2.1-windows-setup.exe

Browser

  • Electron distribution
  • Chrome
  • Safari
  • Firefox
  • Edge

OS

  • macOS
  • Windows
  • Ubuntu

To Reproduce

Steps to reproduce the behavior:

Start Composer and see the frozen Welcome screen Screenshot 2020-12-03 110021

Expected behavior

Composer started after the Welcome screen, the Welcome screen disappears

Screenshots

Additional context

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 22 (15 by maintainers)

Most upvoted comments

Turns out that it was a malformed extensions.json file in the %APPDATA%/Roaming/BotFrameworkComposer/ app data folder.

Adding valid JSON to this file – {} – fixed the issue and @gbelenky is now able to start Composer.

We should consider writing some documentation on how to completely wipe the Composer installation to troubleshoot these issues.

After hopping on a call and debugging with @gbelenky , we figured out that there is an exception being thrown when Composer tries to read the JSON store (data.json).

Here is the exception:

SyntaxError: Unexpected token in JSON at position 0 at JSON.parse (<anonymous>) at JsonStore.readStore (C:\Users\gbelenky\AppData\Local\Programs\Bot Framework Composer\resources\app.asar\node_modules\@bfc\server\build\store\store.js:67:26) at JsonStore.get (C:\Users\gbelenky\AppData\Local\Programs\Bot Framework Composer\resources\app.asar\node_modules\@bfc\server\build\store\store.js:37:14) at ExtensionManagerImp.<anonymous> (C:\Users\gbelenky\AppData\Local\Programs\Bot Framework Composer\resources\app.asar\node_modules\@bfc\server\build\services\extensionManager.js:84:40) at Generator.next (<anonymous>) at fulfilled (C:\Users\gbelenky\AppData\Local\Programs\Bot Framework Composer\resources\app.asar\node_modules\tslib\tslib.js:111:62)

We checked the data.json file and it looks to be valid JSON. My hunch is that at some point, when we are writing the JSON to disk, it is prepending a byte order mark (BOM) to the front of the JSON file, which is causing JSON.parse() to throw. We faced a similar problem in the Emulator at one point.