Giter Club home page Giter Club logo

covid-19-app-android-ag-public's Introduction

Covid-19 exposure app

Setup

To access the private GitHubPackages repository that hosts the remote configurations for all environments, your Github username has to be set in your global gradle.properties file:

  • gpr.user is your Github username

Furthermore, you have to create a personal access token issued by GitHub. For the scope, use at least read:packages and write:packages. This token has to be stored in the Keychain for MacOS users or the Credential Manager for Windows users.

Add your personal access token to the Keychain (MacOS)

  1. Open Keychain Access
  2. Select login from Default Keychain from the left panel
  3. Go to File > New Password Item…
    1. Service (Keychain Item Name) should be ukhsa-collaboration
    2. Account is your Github username
    3. As Password enter your personal access token

Add your personal access token to the Credential Manager (Windows)

First the token has to be stored.

  1. Open Credential Manager
  2. Go to Add a generic credential
    1. Internet or work address should be ukhsa-collaboration
    2. User name is your Github username
    3. As Password enter your personal access token

To enable PowerShell to read from the Credential Manager, the CredentialManager module needs to be installed.

  1. Open a PowerShell instance with Administrator privileges
  2. Enter Install-Module -Name CredentialManager
  3. (optional) Troubleshooting
    1. Install-Module uses NuGet. If NuGet is not pre-installed, install it with Install-PackageProvider -Name NuGet from PowerShell
    2. Installing NuGet might fail due to inappropriate TLS settings. Enforcing TLS 1.2 to install NuGet fixes this potential issue: Enter [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 into PowerShell to enforce usage of TLS 1.2

Optional: Setup path to isolation model in global gradle.properties

In order to get a direct link to the related isolation rule in case of a failing isolation test, you need to add the path to the repo hosting the rules in the global gradle.properties file:

  • isolationModel.repo = https://<insert path to repo here>

Dev actions

  1. Device setup

    Make sure all animations are turned off on the device (not an emulator) that is running the tests. https://developer.android.com/training/testing/espresso/setup#set-up-environment

  2. Run linter:

    ./gradlew ktlintFormat
  3. Run build and tests:

    ./gradlew

covid-19-app-android-ag-public's People

Contributors

nhs-covid19 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

covid-19-app-android-ag-public's Issues

Support BLE beacons

Supporting BLE beacons for collecting where a user has been ( as well as a QR code) would mean users wouldn't have to pull out their phone in order to scan a QR code, it could also mean you could track when the user leaves that area. From what I understand, the QR code contains all the information needed for the app to know it's details... and there's no round trip to "register" you (your BLE mac address) to that location, it's all done using the app locally. So if a location had a BLE beacon, and you were around that BLE beacon for a predetermined amount of time (lets say 2 minutes).. that means you weren't just walking past a shop.... you could then register that user as being there, without any interaction needed by the end user, and you also know when they left - not just assuming they were there until midnight.

This could be implemented for iOS too.

Is the configuration repo up to date?

Describe the bug
The current latest commit in this repository refers to configuration_version = "1.0.23-SNAPSHOT".
https://github.com/nhsx/covid-19-app-android-ag-public/blob/01f790a0ebefe20ba6ff7925e56dfd88911741bf/app/build.gradle#L148

But the current latest public commit on the configuration repo is set to version = "1.0.15-SNAPSHOT".

https://github.com/nhsx/covid-19-app-configuration-public/blob/59f08d62c4070496cd279de8d5a8d93c8387f3f6/build.gradle#L15-L37

Are these two repositories out of sync?
I am getting the following "Unresolved reference" error during a ./gradlew run of this repository.

bencord0@localhost ~/src/covid-19-app-android-ag-public $ ./gradlew                                                   
                                                                                                                      
> Configure project :app                                                                                              
                                                                                                                      
> Task :app:compileScenariosDebugKotlin FAILED              
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/ExposureApplication.kt: (17, 30): Unresolved reference: qrCodesSignatureKey                                                         
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/ExposureApplication.kt: (86, 21): Unresolved reference: qrCodesSignatureKey                                                         
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/di/module/AppModule.kt: (8, 30): Unresolved reference: SignatureKey                                                                 
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/di/module/AppModule.kt: (29, 38): Unresolved reference: SignatureKey                                                                
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/di/module/AppModule.kt: (79, 39): Unresolved reference: SignatureKey                                                                
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/di/module/NetworkModule.kt: (105, 16): Unresolved reference: signatureKeys
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/di/module/SignatureValidationInterceptor.kt: (10, 30): Unresolved reference: SignatureKey
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/di/module/SignatureValidationInterceptor.kt: (20, 37): Unresolved reference: SignatureKey
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/qrcode/QrCodeParser.kt: (6, 30): Unresolved reference: SignatureKey
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/qrcode/QrCodeParser.kt: (25, 31): Unresolved reference: SignatureKey
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/qrcode/QrCodeParser.kt: (78, 29): Unresolved reference: it
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/main/java/uk/nhs/nhsx/covid19/android/app/qrcode/QrCodeParser.kt: (78, 45): Unresolved reference: it
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/scenarios/java/uk/nhs/nhsx/covid19/android/app/DebugActivity.kt: (38, 30): Unresolved reference: qrCodesSignatureKey
e: /home/bencord0/src/covid-19-app-android-ag-public/app/src/scenarios/java/uk/nhs/nhsx/covid19/android/app/DebugActivity.kt: (226, 25): Unresolved reference: qrCodesSignatureKey
                                                                                                                      
FAILURE: Build failed with an exception.                                                                              

Has the qrCodesSignatureKey been published?
Is the configuration repository https://github.com/nhsx/covid-19-app-configuration-public out of date?

To Reproduce
Steps to reproduce the behavior:

  1. Clone the configuration repository, and reconfigure maven to publish locally
$ git clone https://github.com/nhsx/covid-19-app-configuration-public
$ cd covid-19-app-configuration-public
$ patch -p1 < ../mavenlocal-configuration.patch # (see below)

This is the patch that I'm using. It disables the remote check, as I will only be using the local maven cache to get the build working locally.

diff --git a/build.gradle b/build.gradle
index 2523120..349c0ee 100644
--- a/build.gradle
+++ b/build.gradle
@@ -18,14 +18,7 @@ subprojects {
     ext.version = '1.0.15-SNAPSHOT'
     publishing {
         repositories {
-            maven {
-                name = "GitHubPackages"
-                url = uri("https://maven.pkg.github.com/nhsx/covid-19-app-configuration-public")
-                credentials {
-                    username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
-                    password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
-                }
-            }
+            mavenLocal()
         }
         publications {
             gpr(MavenPublication) {
  1. Publish the configurations snapshot locally.
$ ./gradlew publishToMavenLocal

This is a workaround because the current packages are not published.
https://github.com/nhsx/covid-19-app-configuration-public/packages <- this is empty.

image

  1. Clone this repository, also patch out the remote maven repository to get the build working.
$ cd ../
$ git clone https://github.com/nhsx/covid-19-app-android-ag-public
$ cd covid-19-app-android-ag-public
$ patch -p1 < ../mavenlocal-android.patch # (see below)
diff --git a/app/build.gradle b/app/build.gradle
index 76ad9d5..00a9789 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -10,13 +10,7 @@ apply plugin: "com.github.triplet.play"
 apply from: '../jacoco.gradle'
 
 repositories {
-    maven {
-        url = 'https://maven.pkg.github.com/nhsx/covid-19-app-configuration-public'
-        credentials {
-            username = project.findProperty("gpr.user") ?: System.getenv("PACKAGES_ACCESS_ACTOR")
-            password = project.findProperty("gpr.key") ?: System.getenv("PACKAGES_ACCESS_TOKEN")
-        }
-    }
+    mavenLocal()
 }
 
 def buildNumber = new File('app/buildNumber').text as Integer
diff --git a/build.gradle b/build.gradle
index 0b532e5..6e65184 100644
--- a/build.gradle
+++ b/build.gradle
@@ -24,13 +24,7 @@ allprojects {
     repositories {
         google()
         jcenter()
-        maven {
-            url = 'https://maven.pkg.github.com/nhsx/covid-19-app-configuration-public'
-            credentials {
-                username = findProperty("gpr.user") ?: System.getenv("REPOS_ACCESS_ACTOR")
-                password = findProperty("gpr.key") ?: System.getenv("REPOS_ACCESS_TOKEN")
-            }
-        }
+        mavenLocal()
     }
 }
  1. Build with ./gradlew

Expected behaviour
The application should build.

Actual behaviour
Unresolved reference: qrCodesSignatureKey

This line imports code which is not available publically.
https://github.com/nhsx/covid-19-app-android-ag-public/blob/01f790a0ebefe20ba6ff7925e56dfd88911741bf/app/src/main/java/uk/nhs/nhsx/covid19/android/app/ExposureApplication.kt#L19

import uk.nhs.covid19.config.qrCodesSignatureKey

Desktop:

Risky venues circuit breaker leaks private data

The risky venues circuit breaker functions by submitting the venue IDs of each risky venue that a user has visited to an API endpoint. This partially exposes the user's venue check-in history based on which venue IDs are submitted, and is contrary to the various documentation which states that the user's recorded venue IDs will never leave their device.

This data could be used for gathering statistics and performing analyses without users' knowledge or consent. In conjunction with the user's IP address, the data could also be linked to a specific user. Similar data could also theoretically be gathered for any specific non-risky venue by placing it on the risky venues list and deactivating the circuit breaker for that venue to prevent a notification from being triggered.

This breaks the security model around which the app is built, being that all processing should happen on the user's device and no sensitive (i.e. non-analytic) data should ever be uploaded thereby abating possible concerns that the app may be used for mass data gathering or espionage by making it technically impossible to do so. In the interest of transparency, the risky venues circuit breaker component should be removed or redesigned in a way that does not expose the user's data or, if this is not feasible, a clear notice about the operation of this function should be given in the documentation.

Self isolation instructions differ from gov.uk website

I reported a fever (after having measured my temperature at 38.2 and pulse 99), and the app said I should get a test and my household should self-isolate for 11 days.

But there was no place to report that I had the AstraZeneca vaccine yesterday. According to https://www.gov.uk/government/publications/regulatory-approval-of-covid-19-vaccine-astrazeneca/information-for-uk-recipients-on-covid-19-vaccine-astrazeneca#possible-side-effects "If your fever is high and lasts longer than two or three days ... you should follow appropriate advice" doesn't that mean I don't need to worry if it's been 18 hours since my vaccine and no other symptoms?

If we must self-isolate then my wife would have to cancel her vaccine appointment for tomorrow. But I'm not convinced this matches the actual official advice for people who've just had the vaccine and experience known side effects.

Deprecated/missing(?) methods being used on ExposureNotificationClient

https://github.com/nhsx/covid-19-app-android-ag-public/blob/01f790a0ebefe20ba6ff7925e56dfd88911741bf/app/src/main/java/uk/nhs/nhsx/covid19/android/app/exposure/GoogleExposureNotificationApi.kt#L42-L60

Looking at google's API docs, use of some methods don't seem right, unless the implementation is from an earlier version:

  1. exposureNotificationClient.temporaryExposureKeyHistory - Doesn't exist / typo ? getTemporaryExposureKeyHistory
  2. exposureNotificationClient.provideDiagnosisKeys - This particular overload is deprecated
  3. exposureNotificationClient.getExposureInformation - Deprecated, docs say to use different API
  4. exposureNotificationClient.getExposureSummary - Deprecated, docs say to use different API

Application crashes on launch

Describe the bug
The application is crashing on launch.

To Reproduce
Steps to reproduce the behavior:

  1. Try and open the app.

Expected behavior
App to open correctly.

Screenshots
None

Desktop (please complete the following information):
Android

Smartphone (please complete the following information):

  • Pixel 3 XL - Running Android 11

Additional context
When launching the app it's crashing with a KeyStoreException (Downloaded from the store).

2020-09-29 12:24:36.788 19044-19044/? E/AndroidRuntime: FATAL EXCEPTION: main Process: uk.nhs.covid19.production, PID: 19044 java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://_master_key_strongbox_ exists but is unusable at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717) at android.app.ActivityThread.access$1300(ActivityThread.java:237) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) Caused by: java.security.KeyStoreException: the master key android-keystore://_master_key_strongbox_ exists but is unusable at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268) at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228) at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121) at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186) at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145) at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136) at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130) at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118) at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109) at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107) at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712) at android.app.ActivityThread.access$1300(ActivityThread.java:237)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)  at android.os.Handler.dispatchMessage(Handler.java:106)  at android.os.Looper.loop(Looper.java:223)  at android.app.ActivityThread.main(ActivityThread.java:7656)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)  Caused by: java.security.InvalidKeyException: Keystore operation failed at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378) at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388) at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54) at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89) at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265) at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109) at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984) at javax.crypto.Cipher.tryCombinations(Cipher.java:2891) at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796) at javax.crypto.Cipher.chooseProvider(Cipher.java:773) at javax.crypto.Cipher.init(Cipher.java:1143) at javax.crypto.Cipher.init(Cipher.java:1084) at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69) at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226) at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160) at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259) 2020-09-29 12:24:36.788 19044-19044/? E/AndroidRuntime: ... 20 more Caused by: android.security.KeyStoreException: Too many operations at android.security.KeyStore.getKeyStoreException(KeyStore.java:1301) ... 35 more

Possible COVID-19 Exposure notification should click through to more information

Describe the bug
The "Possible COVID-19 Exposure" notification does not click through to any useful information about why it was generated.

To Reproduce
An exposure is generated which falls below the threshold for further action, but is notified to the user by the operating system.

Expected behaviour
If the notification cannot be suppressed, clicking should take the user to a view which explains that this exposure is below the threshold for further action.

Screenshots
image

Smartphone (please complete the following information):

  • Device: Pixel 2
  • OS: Android 11
  • Version Build number RP1A.200720.009
  • App Version 3.6.2(73)

Additional context
Also reported on the iOS app ukhsa-collaboration/covid-19-app-ios-ag-public#11

"Unfortunately, you can't run this app" on several Android phones

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'NHS covid 19' (I have also tried to give as many permissions as I can to this app)
  2. Click on 'Continue'->'I Am OVER 16'
  3. Scroll down to 'I agree'
  4. Enter my postcode district
  5. Click on 'Continue'
  6. See error: 'Unfortunately, you can't run this app. This could be due to: A restriction in your settings(for example, if this is a company phone). Another app on your phone is using the same technology and stopping this app from working.'

Expected behavior
Now the APP should function normally.

Smartphone 1(Mi10 Ultra):

  • Device: Mi10 Ultra
  • OS: MIUI, Android
  • Browser: Mi browser, BAIDU
  • Version: (Android) 10; MIUI 120.10Stable 12.0.10.0

Smartphone 2(HUAWEI P20):

  • Device: HUAWEI P20
  • OS: EMUI, Android
  • Browser: HUAWEI browser, BAIDU
  • Version: (Android) 10; EMUI version 10.0.0

Smartphone 3(HUAWEI P9):

  • Device: HUAWEI P9
  • OS: EMUI, Android
  • Browser: HUAWEI browser, BAIDU
  • Version: (Android) 8.0.0; EMUI version 8.0.0

Additional context
I have also tried to give as many permissions as I can to this app, but failed. I tried three phones, all failed.

Some text strings missing in the app

Describe the bug
Symptoms checkboxes are empty in the app, and the local covid alert level screen also misses all text.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Select symptoms' or 'Local Covid Alert Level'

Expected behavior
Some or all text is missing, as demonstrated by the attached screenshots:

Screenshots
Screenshot_20201018-165049_NHS Covid-19
Screenshot_20201018-165056_NHS Covid-19

If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S10e, Sony Xperia X Compact
  • OS: Android 10, Android 8
  • Version: 3.7.2 (85)
  • Locale: cs_CZ (I'm guessing this may be relevant)

Unable to enter negative test result

Users are reporting that it is not possible to enter a negative test result after entering symptoms into the app, which has been published here >> https://www.bbc.com/news/amp/technology-54307526

If positive symptoms are entered the self isolation countdown begins, however if a test is carried out and gives a negative result, there is no facility to enter this into the app and cancel the self isolation countdown.

The countdown can currently only be cancelled by clearing app data, which is obviously a poor workaround.

I'm unable to test entering a negative test result into the "Enter test result" screen as I haven't taken a test.

Tested symptoms reporting and data clearing on:

Model: Samsung Galaxy S20 Ultra
Android Version: 10
App Version: 3.6 (68) then 3.6 (69)

Provide the ability to Sign Out of a Venue.

At the moment there only appears to be an option to sign in to a Venue.

There should be the option to sign out so that if someone visits the same Venue but hours apart then they are not automatically seen as being there at the same time and at high risk of transmission.

e.g. Athletics events

Scenario 1:

  • parent accompanying an athlete arrive at a venue at 9am and leaves at 11am

  • second parent who test positive arrives at the same venue at 1pm and leaves at 2pm

  • No Match

Scenario 2:

  • parent accompanying an athlete arrive at a venue at 9am and leaves at 11am

  • second parent who test positive arrives at the same venue at 10am and leaves at 11:30

  • Possible Match

It should be easy to sign out of a Venue when signing in to another one and either scan a QR Code or have a "Leave Venue" button in app to sign out when leaving.

Export check in history

I am not a coder, but would it be possible to export your check in history and then upload the resulting export to the track and trace if needed

Venue QRCodes are not deep-links

Describe the bug
The QR doesn't direct users to install the App. This means that it doesn't piggyback on the years of effort to teach the general public that QR codes direct users to content. I've watched three people today try scan the App with their camera, see it fail to link them anywhere and give up on the process.

When you scan the QR code with native camera app you get the following details:

image

As I understand the QR is a piece of text, with 3 payloads (split by the ":" character) with a JWT token encoded as Base64. What I'm recommending is that you place it within a URL which the App declares a deep link and universal link.

To Reproduce
Steps to reproduce the behavior:

  1. Scan a QR code at a venue with your native camera
  2. Get confusing link

Expected behavior
What I expected is something like the following. This is a QR code that deep-links into Twitter. Twitter understands the query param and uses it, or provides a web version.

image

The NHS App would look something like this.

image

If the App is installed, then the user flow is as before, with the App activating to handle the URI deep-link from the native Camera app. If the app is not installed then the NHS App should redirect users to a webpage to download the app at this point for their platform.

I apprectiate the user flow at this point might just be to continue and not go through the starting process, but at least we've guided the user into starting the install flow.

Desktop (please complete the following information):

  • OS: Android
  • Browser: N/A
  • Version: N/A

Smartphone (please complete the following information):

  • Device: Samsung 10e.
  • OS: Android
  • Browser N/A

Anything else:

  • A few of my comments are echoed in this blog which talks about a few ways the QR could be less dense which would also help uptake.

  • The QR codes I've generated from here are smaller than the ones generated from here. This is because I have a lower error-correction (given there's rarely something occluding the code).

  • I used this site to debug the QR codes.

Exposure notifications disappear and no countdown clock

Describe the bug
User receives a notification saying they might have been in contact with someone who has tested positive for COVID-19 and they need to self isolate. They then click on the notification which causes the app to open. When the app opens, the notification disappears related to issue #32 and there is no countdown clock to tell you when your self isolation ends. There is no information telling you where or when the exposure might have happened (was it a month ago or yesterday?). There are many reports of this happening.

To Reproduce
Steps to reproduce the behavior:

  1. Download NHS contact tracing app
  2. Wait for possible exposure notification
  3. Click on notification
  4. App opens and no information is provided about possible exposure or isolation.

Expected behavior
User receives a possible COVID-19 exposure notification and that they need to self isolate. User clicks on notification which opens the app and provides them with more information about the possible exposure and a countdown clock on when their self isolation should end. Where users have not been exposed to COVID-19, they receive no exposure notifications.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: Google Pixel 2
  • OS: Android 11
  • Version 3.7.2 (85)

Additional context
There are reports on twitter and in the media that if a user receives one of these notifications, and it disappears when the user clicks on it, that it might be a bug in the app and the user has not actually been exposed to COVID-19. Along with a bug fix, clear guidance should be released on how to treat different notification messages and expected behavior of alerts.

Dagger injection for Activities should happen before super.

Describe the bug
According to the Dagger documentation injection in Activities should happen before the call to super.onCreate(). In most (all?) of the Activities in the project injection is done after the call to super.onCreate().

To Reproduce
Steps to reproduce the behavior:
Open any Activity in the project.

Expected behavior
Dagger injection for Activities follows guidance from Dagger project and is done before any call to super.onCreate().

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context

  1. I don't think this is a massive issue by the way. It's just not according to the Dagger docs.

  2. I haven't found any Fragments yet but the injection call should be in onAttach before the call to super unless you've hooked up a FragmentFactory that allows for constructor injection 😸 .

Terry's Welsh Bar is actually an Indian take away

Describe the bug
The text underneath the example QR code in the Welsh version of QR code help poster should probably be blurred in the same way that the text in the English version is blurred.

At the very least the good people of Briton Ferry deserve to have an accurate representation of their high street. The location is currently occupied by a fine Indian takeaway. With a pretty decent menu and prices from what I can see 😋 .

To Reproduce
Steps to reproduce the behavior:

  1. Open Welsh version of QR code help poster.
  2. Observe example venue location below the QR code.

Expected behavior
Example venue location should either be blurred or completely made up / non-existent.

Screenshots
See Welsh version of QR code help poster.

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
Obviously..... obviously..... this is very low priority 😸 .

Is is possible to build it on my own device?

To access the private GitHubPackages repository that hosts the remote configurations for all environments

It suggests that I need to access some privatge repositories.

Is there a way for me to build and run it without it?

Or maybe the code presented here is just for public inspection, not for the actual running of the app?

Code: is infectiousness (based on days from symptom onset) "double-counted"?

Thank you for the detailed explanation in issue #6 . Is there a problem in ExposureWindow.riskScore()?

riskScoreCalculator.calculate() calculates infectiousness from days from onset, using a formula. We then multiply this by infectiousnessFactor().

infectiousnessFactor() is calculated from ExposureWindow.infectiousness. But I think this is also calculated from days from onset.

I think this would cause the infectiousness curve to fall faster than it is supposed to.

  getInfectiousness() Infectiousness of the TEK that caused this exposure, computed from the days since onset of symptoms using the daysToInfectiousnessMapping.

    private fun ExposureWindow.riskScore(
        config: RiskScoreCalculatorConfiguration,
        riskCalculation: V2RiskCalculation
    ): Double {
        val scanInstances = scanInstances.map { it.toNHSScanInstance() }
        val riskScoreCalculator = riskScoreCalculatorProvider.riskScoreCalculator(config)
        return 60 * riskScoreCalculator.calculate(scanInstances) * infectiousnessFactor(
            riskCalculation
        )
    }

https://github.com/nhsx/covid-19-app-android-ag-public/blob/36ba4bd/app/src/main/java/uk/nhs/nhsx/covid19/android/app/exposure/encounter/calculation/ExposureWindowRiskCalculator.kt#L55

I believe the daysToInfectiousness values used are defined here:

      "v2RiskCalculation": {
        "daysSinceOnsetToInfectiousness":[0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,2,2,2,1,1,1,1,1,1,0,0,0,0,0],
        "infectiousnessWeights": [0.0, 0.4, 1.0],

ukhsa-collaboration/covid19-app-system-public@621f1c8#diff-c2b1334f0a4a1bf2207e788ffdfd602d5177f43bdd515b726a7b69fda25e88b5R64

Postal district suggestion during onboarding

https://github.com/nhsx/covid-19-app-android-ag-public/blob/ce3fe43da16392f9d8325656a64aa2df7d0b5cf8/app/src/main/res/values/strings.xml#L56

Although this is dummy data, it's potentially confusing to users as it's not an obvious-looking postal district that people will be familiar with. There only a few districts in London with letter suffixes.

Given the new validation against real districts in ce3fe43, I'd suggest it might be better to use real-world examples when onboarding new users (such as E2, L36, PO30 as used in string valid_post_code_is_required, areas where the app is currently being trialled).

Venue check-in option no longer available

Hi, I tried to use the "Venue Check-in" option to scan a QR code that was on display at a small business in England, but the option was not listed as available. I'm running NHS Covid-19 version 4.26.1 (280) on Android 12 on a Samsung S21.

I haven't found any obvious announcement that the venue check-in option has been withdrawn in England, nor do I see anything obvious in the commit log, although I haven't checked every line of the code. The app still talks about "NHS QR Codes" in the "About this app" option.

If the option has been withdrawn then I'm wondering if I should advise our local small business to remove their now non-functioning QR code. (Due to language issues they might not have been keeping on top of every instruction they received officially.)

Isolation date from app is incorrect - should be based on testing info - currently too long

Describe the bug
The isolation date in the app is (sometimes?) incorrect and does not match the actual isolation date, at least for symptomatic

To Reproduce
Steps to reproduce the behavior:

  1. Get covid-19 from a person without the app - have some identifiable symptom e.g. a headache or fatigue - remember the date when it starts
  2. Do not get any notification from contact tracing
  3. Get a test e.g. because your local council tells you to - enter the date your symptoms started
  4. Wait for test result - test result code comes in text message
  5. Enter test result code into app

Expected behavior
An isolation date should be displayed which matches the dates that the testing system gives. In the case of a symptomatic patient that is ten days from the date that they declared that their symptoms started on.

Screenshots
N.A. due to private data - but imagine a big red 6 in the middle of the screen.

Desktop (please complete the following information):
N.A.

Smartphone (please complete the following information):
problem verified on both Android and iOS (separate users)

Additional context
This was verified with a test provided in a regional testing centre with a DIY testing kit - thus pillar 2 by my understanding.

This problem may encourage people to delete their app from their phone and lose data in order that they are not shown as having to isolate when in fact they do not need to. As such, although it's just an interface problem it does have some serious implications.

also reported by feedback.

Android app worldwide availability

Hello,
I'm wondering why the Android app version has been published only on the UK store. Foreign people may have lot of troubles trying to downloading the app because usually everyone tends to keep set its own country into the Play Store.
Other contact-tracing apps like the Italian Immuni are available everywhere.
I am aware that iOS is able to understand in which region the user is and automatically manage different apps instead Android needs user input, but this is a very big issue for both foreign people who lives in UK and who's coming from abroad to spend a short time in UK.

I remember the Play Store allows the country switch only one time per year.

Thanks.

App fails to launch

After initial installation I was able to set the post code.
Now the app fails to launch after seeing the splash screen.
Pixel 3
Android 11
Version 3.6(68)

Stacktrace from logcat in androidstudio

2020-09-24 22:38:47.645 19709-19709/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 19709
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
at com.google.crypto.tink.shaded.protobuf.GeneratedMessageLite.parsePartialFrom(GeneratedMessageLite.java:1566)
at com.google.crypto.tink.shaded.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:1664)
at com.google.crypto.tink.proto.Keyset.parseFrom(Keyset.java:957)
at com.google.crypto.tink.integration.android.SharedPrefKeysetReader.read(SharedPrefKeysetReader.java:84)
at com.google.crypto.tink.CleartextKeysetHandle.read(CleartextKeysetHandle.java:58)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.read(AndroidKeysetManager.java:321)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewKeyset(AndroidKeysetManager.java:280)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:230)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:123)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
2020-09-25 01:16:37.015 5862-5862/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 5862
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 02:22:11.519 15414-15414/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 15414
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero).
at com.google.crypto.tink.shaded.protobuf.GeneratedMessageLite.parsePartialFrom(GeneratedMessageLite.java:1566)
at com.google.crypto.tink.shaded.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:1664)
at com.google.crypto.tink.proto.Keyset.parseFrom(Keyset.java:957)
at com.google.crypto.tink.integration.android.SharedPrefKeysetReader.read(SharedPrefKeysetReader.java:84)
at com.google.crypto.tink.CleartextKeysetHandle.read(CleartextKeysetHandle.java:58)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.read(AndroidKeysetManager.java:321)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewKeyset(AndroidKeysetManager.java:280)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:230)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:123)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
2020-09-25 02:37:21.419 17618-17618/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 17618
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 02:37:24.977 17911-17911/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 17911
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 03:17:11.429 20293-20293/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 20293
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 03:17:14.732 20331-20331/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 20331
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 10:12:50.258 7510-7510/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 7510
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 14:08:26.164 9560-9560/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 9560
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 17:55:16.389 11590-11590/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 11590
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 17:55:19.399 11620-11620/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 11620
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 18:19:32.908 13685-13685/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 13685
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 18:19:36.427 13723-13723/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 13723
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 18:20:20.560 14145-14145/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 14145
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 18:20:23.545 14183-14183/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 14183
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 18:20:26.257 14209-14209/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 14209
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 18:20:29.032 14234-14234/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 14234
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 19:03:23.377 22885-22885/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 22885
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 19:48:44.218 30020-30020/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 30020
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 19:48:47.556 30307-30307/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 30307
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-25 22:07:10.087 13555-13555/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 13555
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-26 01:00:02.440 2211-2211/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 2211
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-26 01:16:12.933 6359-6359/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 6359
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:110)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:108)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:49)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-26 09:01:42.605 6454-6454/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 6454
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:110)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:108)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:49)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-26 09:01:57.252 6716-6716/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 6716
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:110)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:108)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:49)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-26 09:02:48.171 7433-7433/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 7433
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-26 09:02:51.858 7474-7474/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 7474
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-26 09:03:26.662 7700-7700/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 7700
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-26 09:05:27.761 8134-8134/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 8134
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-26 14:52:34.462 6925-6925/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 6925
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)
2020-09-26 15:32:37.280 13069-13069/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: uk.nhs.covid19.production, PID: 13069
java.lang.RuntimeException: Unable to create application uk.nhs.nhsx.covid19.android.app.ExposureApplication: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6717)
at android.app.ActivityThread.access$1300(ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.security.KeyStoreException: the master key android-keystore://master_key_strongbox exists but is unusable
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:268)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.build(AndroidKeysetManager.java:228)
at androidx.security.crypto.EncryptedSharedPreferences.create(EncryptedSharedPreferences.java:121)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences$app_productionRelease(EncryptionUtils.kt:186)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createStrongBoxBackedEncryptedSharedPreferences(EncryptionUtils.kt:145)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.createEncryptedSharedPreferences(EncryptionUtils.kt:136)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences(EncryptionUtils.kt:130)
at uk.nhs.nhsx.covid19.android.app.util.EncryptionUtils.tryCreateEncryptedSharedPreferences$default(EncryptionUtils.kt:118)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent(ExposureApplication.kt:109)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.buildAndUseAppComponent$default(ExposureApplication.kt:107)
at uk.nhs.nhsx.covid19.android.app.ExposureApplication.onCreate(ExposureApplication.kt:48)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6712)
at android.app.ActivityThread.access$1300(ActivityThread.java:237) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1913) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:223) 
at android.app.ActivityThread.main(ActivityThread.java:7656) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) 
Caused by: java.security.InvalidKeyException: Keystore operation failed
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1378)
at android.security.KeyStore.getInvalidKeyException(KeyStore.java:1388)
at android.security.keystore.KeyStoreCryptoOperationUtils.getInvalidKeyExceptionForInit(KeyStoreCryptoOperationUtils.java:54)
at android.security.keystore.KeyStoreCryptoOperationUtils.getExceptionForCipherInit(KeyStoreCryptoOperationUtils.java:89)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.ensureKeystoreOperationInitialized(AndroidKeyStoreCipherSpiBase.java:265)
at android.security.keystore.AndroidKeyStoreCipherSpiBase.engineInit(AndroidKeyStoreCipherSpiBase.java:109)
at javax.crypto.Cipher.tryTransformWithProvider(Cipher.java:2984)
at javax.crypto.Cipher.tryCombinations(Cipher.java:2891)
at javax.crypto.Cipher$SpiAndProviderUpdater.updateAndGetSpiAndProvider(Cipher.java:2796)
at javax.crypto.Cipher.chooseProvider(Cipher.java:773)
at javax.crypto.Cipher.init(Cipher.java:1143)
at javax.crypto.Cipher.init(Cipher.java:1084)
at com.google.crypto.tink.integration.android.AndroidKeystoreAesGcm.encrypt(AndroidKeystoreAesGcm.java:69)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.validateAead(AndroidKeystoreKmsClient.java:226)
at com.google.crypto.tink.integration.android.AndroidKeystoreKmsClient.getAead(AndroidKeystoreKmsClient.java:160)
at com.google.crypto.tink.integration.android.AndroidKeysetManager$Builder.readOrGenerateNewMasterKey(AndroidKeysetManager.java:259)

Subtract mu (-0.3) from number of days as stated in equation 3

https://github.com/nhsx/covid-19-app-android-ag-public/blob/01f790a0ebefe20ba6ff7925e56dfd88911741bf/app/src/main/java/uk/nhs/nhsx/covid19/android/app/exposure/encounter/InfectiousnessFactorCalculator.kt#L12-L17

Changes to this function needed for results to be inline with the equation.

  1. Make daysFromOnset a decimal/fractional data type for better accuracy of the duration part and use the correct start and end timestamps.
  2. Add 0.3 to daysFromOnset as stated in the equation,

val step1 = (daysFromOnset + 0.3) / sigma

App notification persists with notification text stating "Loading..."

Describe the bug

In the notification drawer, a notification labelled 'NHS Covid-19' persists continuously with the text 'Loading...'. An app icon badge indicating 1 notification also appears on the NHS Covid-19 app icon in the home screen. This bug has been reported anecdotally by other Android users. Appears to disappear for around 60 minutes if phone is restarted.

To Reproduce
Steps to reproduce the behavior:

  1. Turn on exposure notifications for the app
  2. Wait until keys are fetched
  3. Observe that the 'Loading...' notification persists and no exposure checks are logged

Expected behavior
The notification persists for a few seconds then is dismissed as data is loaded. The timestamp for the exposure check is logged.

Screenshots
20210113_003840

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S10
  • OS: Android
  • Version: 10 (Samsung One UI version 2.5)
  • Kernel Version: 4.14.113-20034833

Additional context
I am unsure if bugfix PRs are made publicly so will also report this via the NHSX feedback form.

"Background work" notification is alerting and has misleading action button

Describe the bug
The BACKGROUND_WORK notification created by getUpdatingDatabaseNotification is alerting by default (meaning it appears in the status bar as if there's something the user needs to act on), and also includes a misleading action titled "Loading…" which just launches the app when tapped.

To Reproduce

  1. Install the app
  2. Wait a while
  3. Observe occasional notifications from the app that just say "Loading…" and go away after a few seconds

Expected behavior

  • Apps shouldn't display notifications unless absolutely necessary (especially since the app's icon is quite recognisable, and users might worry that the notification indicates something they need to do something about)
  • Notifications which the user can't do anything about (and in fact doesn't need to know about at all) shouldn't show up in the notification bar
  • The "Loading…" text (notification_text_updating_database) should just be text, not a clickable button (and should probably be more descriptive, like "Updating…", to make it clear that the notification won't populate with useful information in the future)

I know Android restricts what you can do in terms of notifications when you're running a foreground service, so removing the notification may not be possible, but the "Loading…" text definitely shouldn't be a clickable button.

Screenshots
Hard to obtain one, since the notification goes away quite quickly.

Smartphone

  • Device: Moto G8 Power
  • OS: Android 10

Notifications are not persistent enough.

I received an exposure notification from the COVID-19 Android App today however when clicking on the notification in the notification bar it is dismissed and the app is loaded, the notification is then lost forever and you are unable to re-read the notification or see historic notifications. I know Android by default has a notification log, however this is removed from the build for Samsung phones and hence Samsung users are unable to read the entire notification as it is dismissed when clicking on it and only the first portion of the message is viewable in the notification bar. Ideally this needs fixing.

Privacy Notice link doesn't load because of a 301 redirect loop

Describe the bug
On install, a "Privacy Notice" link is shown on the device. Tapping it takes me to an error page because of a redirect loop:
https://www.gov.uk/government/publications/nhs-covid-19-app-privacy-information/nhs-test-and-trace-app-early-adopter-trial-august-2020-privacy-notice 301s to /government/publications/nhs-covid-19-app-privacy-information/nhs-covid-19-app-privacy-notice which itself 301s back to /government/publications/nhs-covid-19-app-privacy-information/nhs-test-and-trace-app-early-adopter-trial-august-2020-privacy-notice

Also, the use of 301s means that these will be indefinitely cached client-side, so once a client has requested either of these links, it will be hard to make either work.

To Reproduce
Steps to reproduce the behavior:

  1. Install app, open
  2. On "This app helps us keep each other safe" screen, press "Continue"
  3. Confirm "I am over 16"
  4. On "Protecting your privacy" screen, scroll down and tap "Privacy Notice"

Expected behavior
A webview to load with a privacy notice

Screenshots
Screenshot_20200924-002000

Smartphone (please complete the following information):

  • Device: Google Pixel 2
  • OS: Android 10 (build QQ3A.200805.001)
  • Browser Stock Chrome

I got the wrong notification

Just received this:
IMG_1781

It's the end of my isolation after being contact-traced, but I didn't have a covid test - so this is super-misleading.

I'm on iOS.

How many doses is fully vaccinated, nowadays?

Describe the bug
After an exposure, I'm taken though a wizard which asks whether I'm fully vaccinated. However, it doesn't clarify what that means. Does one need to have had a booster to be fully vaccinated?

To Reproduce
Steps to reproduce the behaviour:

  1. Be exposed to someone who has tested positive for Covid-19.
  2. Wait to be notified by the app.
  3. Try to follow the wizard to determine whether you should isolate or not.
  4. Be asked whether you're fully vaccinated.
  5. Wonder whether you now need to have had a booster to be fully vaccinated.

Expected behavior
I expect the questions I'm asked to be unambiguous.

Smartphone:

  • Device: Pixel 4a
  • OS: Android 12

Add documentation about whether and how public contributions to this app are requested

The issue template as shown below suggests that the project maintainers want feedback through the NHS site rather than here:

In any case, since Github offers the public the chance to make issue reports and pull requests, it would be useful to have a note in the project readme file to say whether or not the project maintainers want these sort of contributions, or if Github is being used as a publishing platform only.

If contributions through github are wanted some guidance about how best to collaborate with others working on the project would useful - perhaps in a contributing.md file similar to https://gist.github.com/PurpleBooth/b24679402957c63ec426

Thank you for your interest in this project
We welcome feedback about the Test and Trace App, and this can be sent to us via the
https://faq.covid19.nhs.uk/create-case/ page on the website.

The way to change the entered postcode is non-obvious

Describe the bug
On first installation, the app asks for a (partial) postcode. Once this is entered, there is no way to later change it, for example if you are moving house, without clearing all of the app data.

[Edit: There is a way, it's just not particularly easy to find]

To Reproduce
Steps to reproduce the behavior:

  1. Install the app
  2. Open the app
  3. Complete the initial configuration, including entering a partial postcode
  4. Search through all of the menus
  5. Fail to find any way to change the postcode

Expected behavior
It should be possible to change the postcode without clearing all of the app data and losing potential exposure notifications

Smartphone (please complete the following information):

  • Device: Samsung Galaxy S20
  • OS: 10

Android app name is missing

Describe the bug

The android app title is not available anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Download the recent version of the app on the Google Play Store
  2. Scroll through apps on device
  3. The app does not have a name only the icon

Expected behavior
The app should have a name.

Screenshots
signal-2021-09-20-121050.jpg
signal-2021-09-20-121120.jpg
signal-2021-09-20-121105.jpg

Smartphone (please complete the following information):

  • Device: OnePlus Nord
  • OS: Android 11 (AC2003_14_210313)
  • Browser: Chrome
  • App Version: 4.17

Transferring the COVID-19 app to a new phone loses all the data

Describe the bug
When you setup a new Android phone you normally transfer your apps and settings from your old phone as part of that set up. This is achieved easily via the setup wizard, which just asks you to attach a cable between the two phones, and it goes ahead and transfers the apps and data from the old phone automatically.

Unfortunately, unlike properly written apps, the COVID-19 app does not allow its data to be transferred. When you come to use the COVID-19 app on the new phone, it is as if you have just installed it for the first time - it walks you through the age check, and the postcode entry, and none of your previous checkins are maintained.

To Reproduce
Steps to reproduce the behavior:

  1. Install the COVID-19 app on your existing phone. Use it as normal, so you will accumulate a history of checkins.
  2. Buy a new phone
  3. Turn it on, and follow the instructions to transfer your apps and settings from the old phone.
  4. Start the COVID-19 app on the new phone - it has forgotten all your settings and checkins.

Expected behavior
The new phone retains all your settings such as the postcode, and all your checkins.

Screenshots
n/a

Smartphone (please complete the following information):

  • Stock Android (on a Pixel device)

Additional context
I think this is because the Android manifest file has this line in it:
android:allowBackup="false"
That line should not be present in properly written apps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.