- Newest
- Most votes
- Most comments
A 30% error rate for StartFaceLivenessSession is not normal and indicates there's a significant issue that needs to be addressed. Based on your description, where the component gets stuck at "Connecting..." and fails to progress to the TensorFlow download phase, this does appear to be connection-related rather than an implementation error.
Here are several areas to investigate and improve:
Connection and Network Considerations:
- The fact that users need multiple attempts (up to 5) and that you see better results under ideal network conditions strongly suggests network quality issues. Consider implementing retry logic with exponential backoff for the initial connection phase.
- WebSocket connections can be sensitive to network conditions, proxies, and corporate firewalls. Even though you've tested without VPNs and firewalls, your end users may be on various network configurations.
- Mobile networks can be particularly unstable, with varying signal strength and bandwidth, which could explain why even high-end devices like Galaxy S23/S25 experience failures.
Recommendations:
-
Session Timeout Configuration: Review your session timeout settings. If the connection phase is taking too long, consider adjusting timeout values to fail faster and allow for quicker retries.
-
User Experience: Implement better error handling and user feedback. When the ValidationException occurs, provide clear guidance to users about checking their connection and trying again.
-
Monitoring and Diagnostics: Add more detailed client-side logging to capture network conditions, connection timing, and specific failure points before the WebSocket connection is established.
-
Challenge Type: Ensure you're using the recommended 'FaceMovementAndLightChallenge' setting for the highest accuracy and best user experience.
-
SDK Versions: While your versions appear current, ensure all authentication calls are properly configured with AWS signing mechanism and that IAM roles are correctly set up.
-
Progressive Enhancement: Consider implementing a connection quality check before initiating the Face Liveness session, or provide users with guidance about optimal conditions (stable WiFi, good lighting, etc.).
The issue is likely related to the initial WebSocket connection establishment rather than your implementation, but improving error handling, retry logic, and user guidance should help reduce the impact on your users.
Sources
Face Liveness Shared Responsibility Model - Amazon Rekognition
Relevant content
- asked a year ago
