wultra / powerauth-mobile-sdk

PowerAuth mobile SDK adds capability for authentication and transaction signing into the mobile apps (iOS, tvOS, watchOS, Android).
https://www.wultra.com/product/wultra-mobile-security-suite/
Apache License 2.0
33 stars 13 forks source link

Random fail in android tests #606

Closed hvge closed 3 months ago

hvge commented 3 months ago

It seems that EEKTests from the battery of integration tests randomly fail at mysterious error:

07-25 12:09:45.938  6506  6533 D PowerAuthLibraryTests: Test HTTP Send POST to: http://10.0.2.2:8080/powerauth-java-server/rest/v3/activation/remove
07-25 12:09:45.948  6506  6533 D PowerAuthLibraryTests: Test HTTP Recv 200 from: http://10.0.2.2:8080/powerauth-java-server/rest/v3/activation/remove
07-25 12:09:45.951  1503  1503 I keystore: 1 0
07-25 12:09:45.954  6506  6533 E TestRunner: failed: testSetEEKAfterActivation(io.getlime.security.powerauth.integration.tests.EEKTests)
07-25 12:09:45.954  6506  6533 E TestRunner: ----- begin exception -----
07-25 12:09:45.955  6506  6533 E TestRunner: java.lang.Exception: Asynchronous operation failed with exception: Session is no longer valid.
07-25 12:09:45.955  6506  6533 E TestRunner:    at io.getlime.security.powerauth.integration.support.AsyncHelper.synchronizeImpl(AsyncHelper.java:172)
07-25 12:09:45.955  6506  6533 E TestRunner:    at io.getlime.security.powerauth.integration.support.AsyncHelper.await(AsyncHelper.java:135)
07-25 12:09:45.955  6506  6533 E TestRunner:    at io.getlime.security.powerauth.integration.tests.ActivationHelper.validateUserPassword(ActivationHelper.java:421)
07-25 12:09:45.955  6506  6533 E TestRunner:    at io.getlime.security.powerauth.integration.tests.EEKTests.testSetEEKAfterActivation(EEKTests.java:145)
07-25 12:09:45.955  6506  6533 E TestRunner:    at java.lang.reflect.Method.invoke(Native Method)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
07-25 12:09:45.955  6506  6533 E TestRunner:    at androidx.test.internal.runner.junit4.statement.RunAfters.evaluate(RunAfters.java:61)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
07-25 12:09:45.955  6506  6533 E TestRunner:    at androidx.test.ext.junit.runners.AndroidJUnit4.run(AndroidJUnit4.java:162)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.Suite.runChild(Suite.java:128)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.Suite.runChild(Suite.java:27)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
07-25 12:09:45.955  6506  6533 E TestRunner:    at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
07-25 12:09:45.955  6506  6533 E TestRunner:    at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:67)
07-25 12:09:45.955  6506  6533 E TestRunner:    at androidx.test.internal.runner.TestExecutor.execute(TestExecutor.java:58)
07-25 12:09:45.955  6506  6533 E TestRunner:    at androidx.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:446)
07-25 12:09:45.955  6506  6533 E TestRunner:    at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:2145)
07-25 12:09:45.955  6506  6533 E TestRunner: Caused by: io.getlime.security.powerauth.exception.PowerAuthErrorException: Session is no longer valid.
07-25 12:09:45.955  6506  6533 E TestRunner:    at io.getlime.security.powerauth.sdk.PowerAuthSDK.calculatePowerAuthSignature(PowerAuthSDK.java:1764)
07-25 12:09:45.955  6506  6533 E TestRunner:    at io.getlime.security.powerauth.sdk.PowerAuthSDK.-$$Nest$mcalculatePowerAuthSignature(Unknown Source:0)
07-25 12:09:45.955  6506  6533 E TestRunner:    at io.getlime.security.powerauth.sdk.PowerAuthSDK$1.getAuthorizationHeader(PowerAuthSDK.java:312)
07-25 12:09:45.955  6506  6533 E TestRunner:    at io.getlime.security.powerauth.networking.client.HttpRequestHelper.buildRequest(HttpRequestHelper.java:208)
07-25 12:09:45.955  6506  6533 E TestRunner:    at io.getlime.security.powerauth.networking.client.HttpClientTask.doInBackground(HttpClientTask.java:126)
07-25 12:09:45.955  6506  6533 E TestRunner:    at android.os.AsyncTask$2.call(AsyncTask.java:333)
07-25 12:09:45.955  6506  6533 E TestRunner:    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
07-25 12:09:45.955  6506  6533 E TestRunner:    at io.getlime.security.powerauth.sdk.impl.DefaultExecutorProvider$SerialExecutor$1.run(DefaultExecutorProvider.java:68)
07-25 12:09:45.955  6506  6533 E TestRunner:    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
07-25 12:09:45.955  6506  6533 E TestRunner:    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
07-25 12:09:45.955  6506  6533 E TestRunner:    at java.lang.Thread.run(Thread.java:764)
07-25 12:09:45.955  6506  6533 E TestRunner: ----- end exception -----
07-25 12:09:45.957  6506  6533 I TestRunner: finished: testSetEEKAfterActivation(io.getlime.security.powerauth.integration.tests.EEKTests)

java.lang.Exception: Asynchronous operation failed with exception: Session is no longer valid.
at io.getlime.security.powerauth.integration.support.AsyncHelper.synchronizeImpl(AsyncHelper.java:172)
at io.getlime.security.powerauth.integration.support.AsyncHelper.await(AsyncHelper.java:135)
at io.getlime.security.powerauth.integration.tests.ActivationHelper.validateUserPassword(ActivationHelper.java:421)
at io.getlime.security.powerauth.integration.tests.EEKTests.testSetEEKAfterActivation(EEKTests.java:145)
... 33 trimmed
Caused by: io.getlime.security.powerauth.exception.PowerAuthErrorException: Session is no longer valid.
at io.getlime.security.powerauth.sdk.PowerAuthSDK.calculatePowerAuthSignature(PowerAuthSDK.java:1764)
at io.getlime.security.powerauth.sdk.PowerAuthSDK.-$$Nest$mcalculatePowerAuthSignature(Unknown Source:0)
at io.getlime.security.powerauth.sdk.PowerAuthSDK$1.getAuthorizationHeader(PowerAuthSDK.java:312)
at io.getlime.security.powerauth.networking.client.HttpRequestHelper.buildRequest(HttpRequestHelper.java:208)
at io.getlime.security.powerauth.networking.client.HttpClientTask.doInBackground(HttpClientTask.java:126)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at io.getlime.security.powerauth.sdk.impl.DefaultExecutorProvider$SerialExecutor$1.run(DefaultExecutorProvider.java:68)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:764)