Sunday, January 18, 2015

Visual Studio Cordova "The certificate specified has expired"

If you have been using a recent CTP of Visual Studio Tools for Apache Cordova to target Windows 8 apps, you may have recently hit this error on build:

Error 104 The certificate specified has expired. For more information about renewing certificates, see

It turns out that this is an issue with the underlying Cordova support for Windows 8, which contains a recently expired certificate - as explained here. The certifcate expired on 11/11/2014.

UPDATE 1/18/2015: It appears the issue appeared again with another expired certificate. Please see this post for details on how to correct the issue for a single project (option 1) and for all projects (option 2)

The VS Tools for Apache Cordova (CTP3) picks up this certificate file on build from a subfolder in the \Users\ directory, and this is what fixed the issue for me...
  1. For CTP3, go to the following directory:


  2. Using Visual Studio, create a new Windows Store "Universal App" - this will provide you with an unexpired key file, which will be located in the \BlankShared.Windows subfolder of the project.

    Make a copy of this file:

    ... and rename it to

  3. Backup the following PFX file (just in case) and then copy over the newly created PFX file in its place -


  4. Back in VS, do a build / Clean and then a Rebuild. 
Anyway, that worked for me. Good luck!