There are many things that can go wrong with a SIS installation package and unfortunately the software installer component provides no logging mechanism for developers to be able to precisely pinpoint the point of failure. Even the errors returned by the installer engine are filtered out so that the UI layer gets the minimal set of rather generic error messages to display for the user. But while “Unable to install” tells all the user needs to know about the fact that the application will not show up in his/her Applications menu, that message offers no hint as to what exactly the application developer should be fixing in order to have a successful install.
Over time developers have created a comprehensive list of error messages and possible resolutions for the problem. In this blog post I will provide an up-to-date and hopefully complete list of errors as well as a nice little hack that will allow a bit more detailed resolution of the root cause of the error.
The hack, available on S60 3rd Edition Feature Pack 2 and later Symbian based devices, consists in creating one “flag” file, c:\temp\swierrors.txt. If this file exists the software installer’s UI will augment the error message with the actual error code which triggered the error message currently displayed. See below screen captures showing the same install time error without and then with the flag file created.
Here are the error messages and the extra bit of information that can be squeezed out of them:
4 Cannot overwrite file
43 An upgrade failed because the package being installed is not a valid upgrade of the package on the device.
45 The package contains an invalid eclipsing file which is already in the device other than ROM.
"Cannot install! This component is built-in!"
5 The file is already in ROM and cannot be eclipsed
"File is corrupted!"
17 File to install is not a recognized SISX file.
14 A file needed to proceed cannot be found.
13 A filename given inside the SISX package is not valid.
9 SISX file corrupt, checksums stored in file do not match computed value.
"Unable to install. Disk not present."
10 A removable media drive had no media while trying to access it.
"Cannot read file!"
11 We cannot read a file which is needed for us to proceed.
"Cannot delete file!"
12 We are forbidden to delete a certain file.
"Unable to install. Insufficient memory."
19 There is not enough free memory for installer’s UI components (e.g. drive selection dialog) to be constructed and displayed.
15 There was insufficient space left on the drive to perform an operation.
"Cannot grant capabilities requested by the application"
16 The applications requires system capability it is not signed for.
"Certificate check failed. Contact application supplier."
20 Cannot find the certificate.
21 An error has occurred during signature validation.
22 There is no signature to verify.
23 The signature could not be validated.
24 The certificate is not trusted for code signing usage.
25 Cannot find the certificate policies.
26 A signature resolving to one of the mandatory certificate cannot be found.
"Only signed applications can be installed. Check your Installation settings in Application Manager."
42 The signature validates correctly, but chains back to a self-signed root
36 Certificate expired"
Certificate validity dates do not match with the phone’s date. Check your date settings."
37 Certificate validity dates do not match with the phone’s date
"Online certificate check could not be conducted. Check your settings."
30 The OCSP server reply is invalid.
27 The OCSP server URL provided is invalid.
29 It was not possible to validate the OCSP server response signature.
"Online certificate check failed."
28 It is not possible to obtain the certificate status.
31 The certificate status information is invalid.
32 The certificate status is unknown.
35 The certificate status is unknown, but this is expected for self-signed.
33 The certificate has been revoked.
"Cannot install. Access denied."
34 Attempt to perform illegal operation
"Unable to install. Install the base package first."
18 A base package was missing when installing an augmentation or a partial upgrade
"Cannot uninstall partial upgrades"
41 Partial update package cannot be uninstalled.
"Cannot install a protected application from untrusted supplier"
36 The package contains a file with a protected SID which is not signed for.
40 The package contains a file with a protected VID which is not signed for.
44 The package uid is protected but not signed for.
"Unable to install. Constrained by the certificate."
38 Constraints imposed by a developer mode certificate have been exceeded.
"Unable to install" or "Uninstallation failed"
6 Missing a dependency.
7 A dependency exists on a specific version of an application which is different from the one installed.
8 A dependency requires a version of an application which is greater than the one installed.
3 Anything and everything else.
Of course, obeying Murphy’s law, most of the error messages we’re likely to see will be still "Unable to install (3)" so don’t forget to consult and update the developer contributed list of common PKG scripting mistakes.
Update: The attached sis file can be used to easily create (and remove) the flag file on/from your device. My only request would be not to deploy such hack (be it this or the errrd one) with your application. It might make some limited sense on beta deployments but there’s no need to "improve" end-user’s experience with it.
*Read "ultimate" as the best we have so far. Hopefuly at some point the installer will have a logging feature (currently enabled in debug builds only) which would let us read directly and exactly what the problem was and where.