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

Unexpected end of stream error #445

Closed
GayathriGouni5 opened this issue May 25, 2023 · 2 comments · Fixed by #453
Closed

Unexpected end of stream error #445

GayathriGouni5 opened this issue May 25, 2023 · 2 comments · Fixed by #453
Assignees
Labels

Comments

@GayathriGouni5
Copy link

Hi, We are using Okta IDX SDK (version: 3.0.4) for auth and MFA in our android app. In both production & QA, we see the following particular error happening quite often:
com.okta.commons.http.HttpException: unexpected end of stream on https://qa.login.***.com. It’s thrown from Okta SDK functions.
This error has been thrown from Okta SDK functions, mostly when calling SDK to send challenge code to a selected factor (after userid/pass verified), secondly when calling SDK to verify the entered OTP. The SDK login call with userId/pass also recorded such error (less frequent than the other two).
Once getting such error, retrying the operation again seems to help. Close and reopen the app seems can help.

Please find the details and STR for one of the scenarios below:
Steps to reproduce:
Log in with username/password .
After successful idxAuthenticationWrapper.verifyAuthenticator(
authResponse.proceedContext,
VerifyAuthenticatorOptions(password)
) call, which returns two options email and mobile.
Click on either options really quick and this calls select Authenticator IDXAuthenticationWrapper.selectAuthenticator(ProceedContext proceedContext,com.okta.idx.sdk.api.client.Authenticator authenticator).

Issue:
Getting the below exception
com.okta.commons.http.HttpException: unexpected end of stream on https://qa.login.***.com/..

Please advise if it’s a known issue. Any help/ directions to fix this issue is appreciated.

Thank you!

@arvindkrishnakumar-okta
Copy link
Contributor

arvindkrishnakumar-okta commented Jun 9, 2023

Thanks for posting!

I'm unable to reproduce this issue in my local env.

Sounds like the client and server are not closing the connection after the API exchange.

Can you try adding httpHeaders.add("Connection", "close") below line https://github.com/okta/okta-idx-java/blob/master/api/src/main/java/com/okta/idx/sdk/api/client/BaseIDXClient.java#L649 and try rebuilding the SDK and use the rebuilt version as dep in your app?

@arvindkrishnakumar-okta
Copy link
Contributor

arvindkrishnakumar-okta commented Jun 21, 2023

Got confirmation from the client that this fixes the originally posted issue.

Merged fix PR #453 to master branch and released version 3.0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants