Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IllegalStateException when multiple requests are received subsequently #76

Open
spheroid opened this issue Jun 10, 2022 · 1 comment
Open
Labels
library For issues related to the Identity Credential library

Comments

@spheroid
Copy link
Contributor

Expected Behavior

While it would not make much sense to send a second request before the previous has been answered and the ISO standard implicitly states that the request should be followed by a response (and then further back and forth communication may resume), I think the library still shouldn't crash if that happens.

Actual Behavior

If the verifier application sends multiple requests in sequence, before the response has been sent, the identity-credential library crashes with:

java.lang.IllegalStateException: SessionTranscript already set
        at com.android.identity.SoftwarePresentationSession.setSessionTranscript(SoftwarePresentationSession.java:98)
        at com.android.identity.PresentationHelper$1.onMessageReceived(PresentationHelper.java:451)
        at com.android.identity.DataTransport.lambda$reportMessageReceived$6(DataTransport.java:343)
        at com.android.identity.DataTransport$$ExternalSyntheticLambda8.run(Unknown Source:4)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:233)
        at android.app.ActivityThread.main(ActivityThread.java:8030)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:631)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:978)

Steps to Reproduce the Problem

  1. Pair the devices and send a request
  2. Before accepting the request, send another request from the verifier
  3. Holder app crashes because the session transcript is attempted to re-set
@davidz25
Copy link
Contributor

Yes, we should fix this bug... and I could actually see this kind of pipelining happening even it it's more correct to have multiple DocRequests in a single DeviceRequest.

@davidz25 davidz25 added the library For issues related to the Identity Credential library label May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
library For issues related to the Identity Credential library
Projects
None yet
Development

No branches or pull requests

2 participants