An exception of class JSONException was not handled

This error usually appears if a hard reset was performed, or if there was a power failure/interruption while DesktopServer is running.

Usually, If you check the preferences file and it shows a size of 0 bytes, that means it's damaged. DesktopServer will not be able to open or load your .dev sites without repairing the preferences file. The good news is that your sites aren't really gone, DesktopServer just can't find them without the preferences file.

1. To start, open your preferences file. Instructions can be found in this link:  http://docs.serverpress.com/article/84-how-to-open-the-desktopserver-preferences-file

2. If you find it is empty, delete the damaged preferences file and start DesktopServer. It will create a new preferences file for you. This new preferences file has a "block"  that should look like this:

Here are some of the definitions in this block:

  • version: The DesktopServer version you're running 
  • edition: Premium or Limited 
  • webOwner: The computer username 
  • browser: The default browser that opens when you view a .dev site 
  • ds-plugins: Wlll contain the paths of any DesktopServer plugins you activate 
  • documents: The site root 
  • sites: This is where your sites info go

3. Create a new dev site using the www.example.dev site name unless you already have an existing site with that name. If you do name it www.example2.dev.

4. Once the new site has been created, stop DesktopServer web services and close DesktopServer. make sure that Apache and MySQL is closed. You can check in the Task Manager for Windows or Activity Monitor for Mac. Search http or mysql and make sure that it's not running. If this step is not done, any changes done to the preferences file will simply be overwritten.

5. Open the new preferences file. Notice that there is a new block with site details. In order to restore access to your sites, you will need to create the site info entries for each of your sites.

6. Copy the site block, paste it after the last block's bracket. Add a comma after the previous block's bracket.

7. Open Mac Finder or Windows Explorer and go to the local sites root(sitePath).

8. Copy the dev site name from your site root folder and paste it onto the SiteName.

9. If you're using the default site root, simply replace the site name at the end of the path with the site you provided for the SiteName. Otherwise, please enter the path to your site root.

10. Open the site root and view the wp-config.php file. it should have the info you need to fill out the rest of the site block. Near the top of the wp-config file, you should see a block that shows the DB name and password.

11. Copy the DB_NAME and past it over to your preferences file's dbName and dbUser.

12. Copy the DB_PASSWORD from the config file and paste it onto the dbPass in your preferences file.

13. Do the same for all the sites you want to restore access to

14. Save the preferences file and restart DesktopServer

15. Go visit your sites to make sure they are all hooked back up.