Comments (6)
HI Team
Finally I got solution
import AWS from "aws-sdk"
import "amazon-connect-streams";
import "amazon-connect-chatjs";
This is the procedure
from amazon-connect-chatjs.
Hi Team,
Can you please help me what I am doing wrong?
from amazon-connect-chatjs.
HI Team,
I got to know that, aws-sdk is giving problem, but I am not sure how to resolve it.
Scenario 2: Streams and ChatJS are used. You are importing the AWS SDK.
Import Streams, then ChatJS, then the SDK. Ensure that your AWS SDK includes the ConnectParticipant Service (it is relatively new, so make sure you have an up-to-date AWS SDK version [^2.597.0]).
I am using this scenario.
<script src="js/amazon-cognito-auth.min.js"></script><script type="text/javascript" src="js/amazon-connect-1.5.0.js"></script>
<script src="js/amazon-connect-chat-interface.js"></script>
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.597.0.min.js"></script>
here its is written like this,
A note for Scenarios 2 and 4.
When using the SDK and ChatJS, you may remove the SDK from ChatJS to ensure lack of import conflicts. However, this should not be relevant if the order in which you are importing these libraries is the order reflected above.
How do I remove aws-sdk from chatJS file ??
from amazon-connect-chatjs.
I am facing same error, can you please provide more details.
If I am using following code, what do I need to change?
<script type="text/javascript" src="js/connect-streams.js"></script><script type="text/javascript" src="js/amazon-connect-chat.js"></script>
<script type="module" src= js/aws-sdk-2.824.0.min.js></script>
from amazon-connect-chatjs.
Trying to connect connectParticipant service using aws-sdk but it giving error like below.
TypeError: aws_sdk__WEBPACK_IMPORTED_MODULE_5___default.a.ConnectParticipant is not a constructor
Please find the sample request below.
var params = {
ParticipantToken: ParticipantToken, // ParticipateToken from StartContactChat response
Type: [
"WEBSOCKET","CONNECTION_CREDENTIALS"
]
};
var connectparticipant = new AWS.ConnectParticipant({apiVersion: '2018-09-07'});
connectparticipant.createParticipantConnection(params, function(err, data) {
if (err) console.log(err, err.stack);
else console.log(data);
});
Could anyone help me with an example to resolve this issue.
from amazon-connect-chatjs.
HI Team Finally I got solution
import AWS from "aws-sdk" import "amazon-connect-streams"; import "amazon-connect-chatjs";
This is the procedure
Hello Swethamr402,
I am struggling with the problem as well. I follow the instruction https://github.com/amazon-connect/amazon-connect-chatjs.
The AWS-SDK is, by default, included in ChatJS as a "baked-in" dependency. You can view it at ./client/aws-sdk-connectparticipant.js. In ./client/client.js we import ConnectParticipant from this file. This file and import can be removed while using the AWS SDK imported through a script in the page file of your application, assuming that version of the AWS SDK has the ConnectParticipant service included. Incidentally, Amazon Connect Streams also contains a "baked-in" AWS SDK. This SDK cannot be removed, as it contains unreleased APIs that will not be available in the SDK you include as a script in the page file. Therefore, there are several occasions where implementations can run into AWS SDK issues.
Scenario 4: ChatJS only, with AWS SDK import.
Import ChatJS before the AWS SDK, and ensure the AWS SDK version you are using contains the ConnectParticipant Service.
However, it doesn't work. I am using the AWS SDK Version
https://sdk.amazonaws.com/js/aws-sdk-2.824.0.min.js
However, I still get the error such as
catch error for running contact.getAgentConnectionTypeError: AWS.ConnectParticipant is not a constructorException StackTypeError: AWS.ConnectParticipant is not a constructor
at new t (https://.../v2/web_site/js/amazon-connect-chat.js:1:17100)
at e.value (https://.../v2/web_site/js/amazon-connect-chat.js:1:16856)
at e.value (https://.../v2/web_site/js/amazon-connect-chat.js:1:16687)
at t.value (https://.../v2/web_site/js/amazon-connect-chat.js:1:42194)
at t.value (https://.../v2/web_site/js/amazon-connect-chat.js:1:41865)
at Object.create (https://.../v2/web_site/js/amazon-connect-chat.js:1:43880)
at createMediaInstance (https://.../v2/web_site/js/connect-streams.js:27073:50)
at Object.get (https://.../v2/web_site/js/connect-streams.js:27116:24)
at getMediaController (https://.../v2/web_site/js/connect-streams.js:27165:137)
at Object.get (https://.../v2/web_site/js/connect-streams.js:27184:24)
May I kindly ask you to share your solution. Where do you place the code, you mentioned it above? Thank you!
from amazon-connect-chatjs.
Related Issues (20)
- Message receipts are enabled by default only when setGlobalConfig() is invoked
- Message receipts fail when content is an Object instead of a String
- Incorrect documentation and type declarations of content types for ChatSession.sendEvent()
- Lax content type validation in ChatSession.sendEvent() and ChatSession.sendMessage()
- Specifying incorrect contactId in ChatSession.create() fails silently, events are not invoked
- Specifying incorrect participantId in ChatSession.create() fails silently, causes onDeliveredReceipt()/onReadReceipt() listeners to be invoked when they shouldn't
- TypeScript typings are outdated HOT 5
- Function is not allowing Inside connect.contact(()=>{}) HOT 2
- connectionDetails value not accessible, seems to not be assigned properly & types don't match HOT 2
- Typo on 'throttleTime' property when trying to call 'setGlobalConfig' HOT 2
- ReferenceError: connect is not defined in JS HOT 15
- React native CSM support HOT 4
- Facing Issue when working with multimedia messages HOT 3
- Send attachment throw error that signature does not match HOT 1
- Callbacks not called when its mounted next time HOT 2
- Download Attachment Returning Blob istead of S3 pre-signed URL HOT 1
- Avoid having to use "unsafe-inline" settings for CSS (style directive) HOT 1
- Want to send additional information with file in send Attachment method HOT 5
- StateError: There is no upstream conduit! HOT 1
- CSP Error on loadCsmScriptAndExecute() HOT 1
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 amazon-connect-chatjs.