Closed ghena closed 1 year ago
Hello @ghena, and apologies for the delayed response on this issue. It looks like you may have been using the "legacy" chatbot that is deprecated. If you're still trying to implement this in a React Native app, can you see if upgrading to the most recent version of Amplify and walking through the updated docs for Getting Started with Interactions helps to get your chat bot up and running?
I'm not sure if you were trying to use this example of a React Native component, but you can also create your own component using the API's that Amplify-JS supplies. Keep in mind there's also a Lex V1 bot and a Lex V2 bot that have different instructions for implementation if you do a manual setup.
Let us know if you're still working on this, and apologies we didn't get back sooner!
@ghena, I'll close this issue for now since we haven't heard back... but please feel free to respond once you get a chance to review the above comment. Should you experience any issues trying to use the newer documentation for Interactions or with getting Lex V1/V2 bots up and running, we'll gladly reopen this issue and get you a more timely response on it!
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Interactions
Amplify Categories
interactions
Environment information
Describe the bug
using a standard implementation , I would like to use speech recognigtion: import voiceLibs from 'aws-amplify-react-native/dist/Interactions/ReactNativeModules';
<ChatBot voiceEnabled={true} voiceLibs={voiceLibs} conversationModeOn={true} botName={botName} welcomeMessage={welcomeMessage} onComplete={this.handleComplete} clearOnComplete={false} textEnabled={true} styles={StyleSheet.create({ itemMe: { color: 'red' } })} />
After Speech recognition I get ERROR [ERROR] 07:08.93 ChatBot {"error": {"code": "5", "message": "5/Client side error"}} WARN Possible Unhandled Promise Rejection (id: 0): Error: Cannot create URL for blob!
Expected behavior
Just pass speech to amplify Lex and reply.
Please attention that:
I updated \node_modules\aws-amplify-react-native\dist\Interactions\ReactNativeModules\index.js
using '@react-native-voice/voice' instead of 'react-native-voice' I suppose this is another bug of aws-amplify-react-native.
Reproduction steps
yarn install react-native run-android
Code Snippet
<ChatBot voiceEnabled={true} voiceLibs={voiceLibs} conversationModeOn={true} botName={botName} welcomeMessage={welcomeMessage} onComplete={this.handleComplete} clearOnComplete={false} textEnabled={true} styles={StyleSheet.create({ itemMe: { color: 'red' } })} />
Log output
aws-exports.js
/ eslint-disable / // WARNING: DO NOT EDIT. This file is automatically generated by AWS Amplify. It will be overwritten.
const awsmobile = { "aws_project_region": "eu-west-1", "aws_cognito_identity_pool_id": "xxxxxxx", "aws_cognito_region": "eu-west-1", "aws_user_pools_id": "eu-west-1_mG0N7xNII", "aws_user_pools_web_client_id": "yyyyyyyy", "oauth": {}, "aws_cognito_username_attributes": [ "EMAIL" ], "aws_cognito_social_providers": [], "aws_cognito_signup_attributes": [ "EMAIL" ], "aws_cognito_mfa_configuration": "OFF", "aws_cognito_mfa_types": [ "SMS" ], "aws_cognito_password_protection_settings": { "passwordPolicyMinLength": 8, "passwordPolicyCharacters": [] }, "aws_cognito_verification_mechanisms": [ "EMAIL" ], "aws_bots": "enable", "aws_bots_config": [ { "name": "ScheduleAppointment_dev", "alias": "$LATEST", "region": "eu-west-1" } ] };
export default awsmobile;
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response