Comments (15)
i will try to reproduce a minimum repo tomorrow, much thanks.
from amplify-ui.
Hi @zerokarafont thanks for creating this issue. Were you able to take a look at our troubleshooting guide? It outlines two common reasons for seeing the 'Session not found' error. It looks like you're setting the region to us-east-1
, so double check that the backend is using the same region.
Let us know if the guide doesn't help, and we can debug further from there.
from amplify-ui.
i am sure my lambda in the same region, the problem is it worked well on local dev, but not work when i deployed on aws. i have checked troublesshooting.
from amplify-ui.
Even if the lambda is in the same region, it's still possible that the region is being set incorrectly in the API calls to Rekogniton. Can you look for this line in the lambda code and see which region is getting set?
const client = new RekognitionClient({ region: <region> });
If the above doesn't address your issue, can you try removing the FaceLivenessDetectorCore
component and making the StartFaceLivenessSession call with the using the AWS JS SDK instead? Like this. You can use the sessionId returned from fetchCreateLiveness
. (Removing the UI component will help us better diagnose a root cause.)
from amplify-ui.
const stsClient = new STSClient({ region: 'us-east-1' })
,
const rekogClient = new RekognitionClient({ region: 'us-east-1' })
it's right in code. I got other helpful case, command GetSessionTokenCommand
works well locally but got Cannot call GetSessionToken with session credentials online.
package.json
"dev": "cdk synth --profile face-dev && sam local start-api --host 0.0.0.0 --port 9000 --container-host docker.for.mac.localhost --template cdk.out/*.template.json"
"deploy": "cdk deploy --profile face-dev --platform linux/amd64"
from amplify-ui.
My CDK config
const stsPolicy = new iam.PolicyStatement({ actions: [ "sts:GetCallerIdentity", "sts:GetSessionToken" ], resources: ['*'], });
const rekognitionPolicy = new iam.PolicyStatement({ actions: ['rekognition:*'], resources: ['*'], });
fn.role?.attachInlinePolicy(new iam.Policy(this, 'FaceDev', { statements: [rekognitionPolicy, stsPolicy] }));
from amplify-ui.
@zerokarafont Can you please try calling StartFaceLivenessSession from your frontend using the sessionId from your deployed lambda?
from amplify-ui.
I tried, not work
from amplify-ui.
@zerokarafont can send us what you tried and what error message you got, and we'll try to help you get it working.
from amplify-ui.
@reesscot @esauerbo https://github.com/zerokarafont/aws-liveness-issue-replay , i made a replay repo please check thanks!
from amplify-ui.
hello, any update?
from amplify-ui.
Hi @zerokarafont looks like this repo is using the FaceLivenessDetectorCore
component. Can you attempt a reproduction without the UI component? You can use the StartFaceLivenessSession command to call the Recognition API directly using the session Id from fetchCreateLiveness
.
I believe you mentioned that you tried this and it didn't work, so if you're able to tell us what you tried and what error you got we can help from there.
This issue typically indicates a configuration issue, so using the StartFaceLivenessSession api directly will help us find the root cause.
from amplify-ui.
@zerokarafont here's a sample repo showing how to make this API call. You'll likely need to make some modifications but can you try pulling this down and see if you get the same error? https://github.com/esauerbo/rekognition-sdk-repro/tree/main
You can retrieve the required credentials by going to Isengard -> Console Roles -> Click the copy button to access AWS console/temporary credentials
from amplify-ui.
@esauerbo tried this repo https://github.com/esauerbo/rekognition-sdk-repro/tree/main, it works on my credential, but got error if i fill in sessionId from my lambda
, it seems like prod configuration problem, i have already checked all cases, dont know how to fix it.
from amplify-ui.
avoid using custom credentials provider
from amplify-ui.
Related Issues (20)
- bug(StorageManager/a11y): Upload status is not announced to screen readers
- SERVER_ERROR: Signature expired: 20240614T145057Z is now earlier than 20240614T154633Z HOT 1
- Allow further customization of Amplify
- onFileRemove does not receive updated key from processFile in StorageManager
- [FR] provide file to StorageManager event callbacks
- Wrong error message validation on "Email verification" when signin HOT 1
- Amplify Studio tutorial feedback HOT 2
- Make the loading screen or that rainbow color customizable HOT 2
- Cannot get accessToken within Authenticator element
- Showing Passoword in the place of Email HOT 8
- Auto close the "Verifying..." loader HOT 5
- useAuthenticator is making me unauthenticated. HOT 10
- Accessibility Bug: "X" button in search component is not accessible via keyboard
- Liveness showing not live on production HOT 1
- Accessibility bug - Input fields are not described by their error messages HOT 2
- Authenticator Override Function calls for handleResetPassword and handleConfirmResetPassword are missing HOT 2
- processFile in StorageManager causing endless uploads HOT 10
- Translations for password error messages HOT 1
- Performance Warning in amplify-liveness: Canvas2D getImageData should use willReadFrequently
- Customize Login Page HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplify-ui.