E3Kit is a security framework that simplifies work with Virgil services and presents the easiest way to add full end-to-end security to your chat application to become HIPAA and GDPR compliant and more.
Describe the bug
E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-1
Process: io.getstream.thestream, PID: 2087
com.virgilsecurity.keyknox.exception.KeyknoxServiceException: Virgil-Keyknox-Previous-Hash header is invalid.
at com.virgilsecurity.keyknox.client.HttpClient.send(HttpClient.kt:101)
at com.virgilsecurity.keyknox.client.KeyknoxClient.pushValue(KeyknoxClient.kt:126)
at com.virgilsecurity.keyknox.KeyknoxManager$pushValue$operation$1.invoke(KeyknoxManager.kt:84)
at com.virgilsecurity.keyknox.KeyknoxManager$pushValue$operation$1.invoke(KeyknoxManager.kt:53)
at com.virgilsecurity.keyknox.KeyknoxManager.run(KeyknoxManager.kt:167)
at com.virgilsecurity.keyknox.KeyknoxManager.pushValue(KeyknoxManager.kt:95)
at com.virgilsecurity.android.common.storage.cloud.CloudTicketStorage.store$ethree_common_release(CloudTicketStorage.kt:83)
at com.virgilsecurity.android.common.manager.GroupManager.store$ethree_common_release(GroupManager.kt:70)
at com.virgilsecurity.android.common.worker.GroupWorker$createGroup$1.get(GroupWorker.kt:71)
at com.virgilsecurity.android.common.worker.GroupWorker$createGroup$1.get(GroupWorker.kt:59)
at io.getstream.thestream.services.VirgilService.init(VirgilService.kt:41)
at io.getstream.thestream.MainActivity$onCreate$1$1.invokeSuspend(MainActivity.kt:33)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
To Reproduce
The last line of this function throws this error:
fun init(context: Context, user: String) {
val params = EThreeParams(user, BackendService::getVirgilToken, context)
eThree = EThree(params)
try {
if(!eThree.hasLocalPrivateKey()) {
eThree.register().execute()
}
} catch (e: EThreeException) {
if (e.description != EThreeException.Description.USER_IS_ALREADY_REGISTERED) {
// if user is already registered, we can safely ignore, otherwise rethrow
throw e
}
}
val otherUsers = BackendService.getUsers()
userCards =
if (otherUsers.isEmpty()) {
FindUsersResult()
} else eThree.findUsers(
otherUsers,
forceReload = true,
checkResult = false
).get()
userTimelineGroup = eThree.createGroup("feed-group-${user}", userCards).get()
}
Platform (please complete the following information):
Describe the bug E/AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-1 Process: io.getstream.thestream, PID: 2087 com.virgilsecurity.keyknox.exception.KeyknoxServiceException:
Virgil-Keyknox-Previous-Hash
header is invalid. at com.virgilsecurity.keyknox.client.HttpClient.send(HttpClient.kt:101) at com.virgilsecurity.keyknox.client.KeyknoxClient.pushValue(KeyknoxClient.kt:126) at com.virgilsecurity.keyknox.KeyknoxManager$pushValue$operation$1.invoke(KeyknoxManager.kt:84) at com.virgilsecurity.keyknox.KeyknoxManager$pushValue$operation$1.invoke(KeyknoxManager.kt:53) at com.virgilsecurity.keyknox.KeyknoxManager.run(KeyknoxManager.kt:167) at com.virgilsecurity.keyknox.KeyknoxManager.pushValue(KeyknoxManager.kt:95) at com.virgilsecurity.android.common.storage.cloud.CloudTicketStorage.store$ethree_common_release(CloudTicketStorage.kt:83) at com.virgilsecurity.android.common.manager.GroupManager.store$ethree_common_release(GroupManager.kt:70) at com.virgilsecurity.android.common.worker.GroupWorker$createGroup$1.get(GroupWorker.kt:71) at com.virgilsecurity.android.common.worker.GroupWorker$createGroup$1.get(GroupWorker.kt:59) at io.getstream.thestream.services.VirgilService.init(VirgilService.kt:41) at io.getstream.thestream.MainActivity$onCreate$1$1.invokeSuspend(MainActivity.kt:33) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)To Reproduce The last line of this function throws this error:
Platform (please complete the following information):