-
Notifications
You must be signed in to change notification settings - Fork 1
Troubleshooting: Deployment and Updating
The following bugs can commonly occur when updating the app after a new deploy. For silent crashes, refer to the Windows Event Viewer to diagnose errors.
This is a common bug found when updating the app. To avoid this, it’s best to update the app by clicking the “setup” icon under the Touch Table file stream folder, which will automatically install the latest published version, as opposed to uninstalling the app before updating.
You can fix the error by clearing the OneClick cache:
- Clear the following folder: C:\users[username]\AppData\Local\Apps\2.0
If doing this from the file explorer, you will have to make hidden folders visible: "Control Panel -> Appearance and Personalization -> Show hidden files and folders"- Optional: you may want to uninstall the app. I haven’t tested if this is necessary for the fix
- Restart your computer after deleting the contents of the “..\Apps\2.0” folder
- Try running “setup” again from the Touch Table file stream folder
If the problem persists, make sure you have done the following under the “properties” tab when publishing the app from Visual Studio:
- Security: This is a full trust application
- Publish: The application is available offline as well
- Publish: Increment the Publish Version
- Signing: Sign the ClickOnce manifests
Searching the internet for this error also returns a good bit of results; however, many of them deal with troubleshooting apps deployed to the web.
During 2024 app update, the app was not allowed to install immediately as an update to existing app due to the source location changing (Shared Drive folder change from "Citizen Science" to "Science Engagement". Install updates can also happen if the signing certificate has changed (e.g., due to loss or expiry of old cert). The solution in any case is to uninstall the app and install fresh by clicking the "setup" file. Note: the local backend DB is stored separate from the app (in Documents) so you will not lose data when uninstalling.
There's currently an error where SQLite files are not copied to the x64 and x86 Application Files of a production build. This is an easy fix, and solutions are found here and here.
Basically, with each deployment you will have to create an x64 and x86 folder at the root of the project and manually insert the SQLite.Interop.dll
file found in the bin/Debug/x64
and bin/Debug/x86
folders (respectively) of a build. This is necessary for the SQLite functionality used by the app's local database.
An error occurred while signing: Failed to sign bin\Debug\app.publish\\setup.exe. SignTool Error: The signer's certificate is not valid for signing
, or something similar
This error might occur if your signing certificate is expired. Hence another issue with using ClickOnce for publishing. You can check if the certificate is expired by going to the Properties/Signing section of the project and clicking "More Details" under the Certificate section. Test certificates, which we use, are free and last for one year. You can learn more information about certificate expiration through this Microsoft doc.
However, as Microsoft tends to delete older docs, this is the process in a nutshell:
- ClickOnce certificates expire after a year. Test certificates state "Unknown publisher" when installing, while purchased certificates state the name of the publisher. Will choose to use a test certificate since it is free and easy and we only have one touch table using the app on the Adler floor.
- After a certificate expires, you will either have to create a new test certificate or renew the old certificate using RenewCert. The RenewCert code is rather old, but this ExtendClickOnceCertificate repo provides a modern, working version of the program. When renewing with RenewCert, you must know the original certificate password, which is in our Passbolt under "Galaxy Zoo Touch Table Key". See the "renew" folder on the Desktop of the Surface Laptop for the RenewCert application.
- If going the route of creating a completely new certificate through Visual Studio, there is the potential of having to uninstall and reinstall the app on a device when updating to a build with a new certificate. This is because the original install looks for the previous certificate it trusts and could error when a new certificate is used with an update. However, this shouldn't be an issue as we're targeting a newer .NET version (v4.6.1). That said, this is why many people online advocate using RenewCert since it would be inconvenient to tell all their users to uninstall and reinstall an app due to a new update. However, creating a new certificate is no big deal if we only have one device using the app.
- Cliff renewed the certificate in August 2024 for 150 years using the new ExtendClickOnceCertificate version of RenewCert, so renewal should no longer be an issue.