Closed doantruongminh closed 5 months ago
Is this similar to this issue? https://github.com/aws-amplify/amplify-ui/issues/5272
Is this similar to this issue? #5272
It's different. My logs show only a warning: An error was encountered in a non-retryable streaming request.
Because I get both a session and credentials from our server so I defined credential provider like this:
const credentialProvider = useCallback<AwsCredentialProvider>(async () => {
return credentials;
}, [credentials]);
Is this code valid?
Do you have any session ids we could look at?
@thaddmt You can try
{
region: "ap-northeast-1"
session_id: "392ca4f2-470a-448d-be9d-60427c4eb0d4"
}
I have a question. Currently, my API response has both session ID and credential. Does that cause problems with my credential declaration? Because as far as I know, it is asynchronous.
I have a question. Currently, my API response has both session ID and credential. Does that cause problems with my credential declaration? Because as far as I know, it is asynchronous.
Hi @doantruongminh, I have requested the server team to help check the logs per the session id you provided. As for your credentials setup, I think that looks good based on the code snippet you shared. Thanks!
@zchenwei Sorry to bother. Have you given a checking result for my issue yet?
@zchenwei Sorry to bother. Have you given a checking result for my issue yet?
Hey @doantruongminh, the team checked the logs with the provided session id. Create Liveness
was successful but we don’t see any logs for StartFaceLIveness
call. Did you see any errors related to StartFaceLIveness
call and/or ensure the call was invoked in your application code?
@zchenwei Sorry to bother. Have you given a checking result for my issue yet?
Hey @doantruongminh, the team checked the logs with the provided session id.
Create Liveness
was successful but we don’t see any logs forStartFaceLIveness
call. Did you see any errors related toStartFaceLIveness
call and/or ensure the call was invoked in your application code?
I didn't see any errors. My log just shows a warning: An error was encountered in a non-retryable streaming request.
Can you let me know how to check if StartFaceLIveness
is working?
@doantruongminh I see that you're passing onError={handleError}
but didn't see the implementation of handleError
. Does your handleError
actually print out the error? Something like
onError={(error) => {
console.error(error);
}}
If not, try adding that and let us know what the output is. Typically, when Create Session
is successful but Start Session
isn't, it indicates a mismatch in the regions or endpoints used in the respective calls.
@doantruongminh I see that you're passing
onError={handleError}
but didn't see the implementation ofhandleError
. Does yourhandleError
actually print out the error? Something likeonError={(error) => { console.error(error); }}
If not, try adding that and let us know what the output is. Typically, when
Create Session
is successful butStart Session
isn't, it indicates a mismatch in the regions or endpoints used in the respective calls.
I saw an error: It seems my server response did not return the correct datetime format. I will try to format it.
@eeatonaws @zchenwei I resolved my issue. Thank you for supporting me. I will close this issue.
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
React
Which UI component?
Liveness
How is your app built?
Next.js
What browsers are you seeing the problem on?
Chrome
Which region are you seeing the problem in?
ap-northeast-1
Please describe your bug.
I tried to implement FaceLiveness but it didn't work. It shows this error: And warning in my console:
An error was encountered in a non-retryable streaming request.
I'm using Next.js Page Router's latest version and Amplify UI's latest version.What's the expected behaviour?
Resolve this issue
Help us reproduce the bug!
Please check my code
Code Snippet
_app.tsx
FaceLivenessDetector.tsx
Console log output
An error was encountered in a non-retryable streaming request.
Additional information and screenshots