Giter Site home page Giter Site logo

chat-sdk-javascript's People

Contributors

ajaygajra avatar gajraajay avatar kaushikritik avatar ketanyekale avatar mayur-bhandari avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chat-sdk-javascript's Issues

Video and Audio Call End (Button) not close call-screen

Hi, I use comet-chat-pro for my Angular 7.2.0 application. Everything works ver well but When I click end button console show errors and call-screen close too late. Please help me what is the problem ? I use comet-chat-pro => 1.8.13

SDK crashes on startcall()

there is an error on call start. Please check startCall() method.

Uncaught TypeError: Cannot read property 'getType' of undefined
   at s.startCall (CometChat.js:1)
   at Function.i.startCall (CometChat.js:1)
   at cc_action.js:591
   at index.js:8
   at Object.startCall (CCCall.js:39)
   at CCCall.componentDidMount (CCCall.js:15)
   at commitLifeCycles (react-dom.development.js:15961)
   at commitAllLifeCycles (react-dom.development.js:17262)
   at HTMLUnknownElement.callCallback (react-dom.development.js:149)
   at Object.invokeGuardedCallbackDev (react-dom.development.js:199)

Error while sending Media Message

There is issue with respect to Media message,

Cannot send media message.

SDK version : 1.3.0

Error received : {"code":"ERR_BAD_REQUEST","message":"Failed to validate the data sent with the request.","details":{"data":["The data field is required."]}}

Callback errors for CometChat.init()

Even with the call backs, Cometchat.init does not give out success value, nor catches the error if init failed(due to wrong appID), instead react native throws a unhandled promise rejection warning.

Blocked a frame with origin "https://caesar.cometchat.com" from accessing a cross-origin frame.

I reviewed https://www.cometchat.com/tutorials/angular-voice-video-chat/ this example project and I upgraded comet-chat-pro version to 1.8.13 and same problem is occurred in here. First time, end button works fine but If you try it more than one, browser gives this error => [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>: UnhandledError: null Script: null Line: null Column: null StackTrace: Error: Strophe: User connection callback caused an exception: SecurityError: Blocked a frame with origin "https://caesar.cometchat.com" from accessing a cross-origin frame.

Cannot end properly a video call, javascript error and no effetcs

With last 1.8 release (1.8.12) I have JS errors in console (with both Chrome and Firefox) and no effets when click on then red button "end video call" :

lib-jitsi-meet.min.js?v=3387:6 [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>:  UnhandledError: null Script: null Line: null Column: null StackTrace:  Error: Strophe: TypeError: Failed to execute 'postMessage' on 'Window': 2 arguments required, but only 1 present.
    at r.window.APP.connection.addEventListener (15705171300c7dccb596aac05ff4f92488db2697d69a8ef7d8:891)

It happend just after the

Sending out message message in console.
Looking to code sending by the https://caesar.cometchat.com page it seems that the trouble is here :

this['window']['APP'].connection.addEventListener(
       JitsiMeetJS.events.connection.CONNECTION_DISCONNECTED,
       ()=>{
          console.log("parent window", window.parent);
            //console.error("diconnection");
            // window.close();
           console.log("Sending out message",{window})
            window.postMessage(parent.postMessage(JSON.stringify({
            'type': 'hangup',
            'message': 'Message text from iframe.'
            })),"*");

the window.postMessage also need the "*" second parameter like it is already done for parent.postMessage and about 10 lines after into the page code.

How can I get only the unread user's messages from the groups he joined?

I'm trying to create some kind of visual notification alerting the user when is back online and I need to know if there are unread new messages for the user in the groups he joined.

How can I accomplish that?

When I use the listener 'onMessageDelivered' on a group, at the start it returns also the old messages that I marked with markMessageAsRead:

CometChat.addMessageListener("listenerId", new CometChat.MessageListener({
  onMessageDelivered: (messageReceipt) => {
    console.log("MessageDeliverd", {messageReceipt});
  },onMessageRead: (messageReceipt) => {
    console.log("MessageRead", {messageReceipt});
  }
}));

Screenshot 2019-04-16 at 20 49 04

How does it work 'markMessageAsRead' for a group message?

CometChat.markMessageAsRead(message);

Is it correct if I ask these kind of questions here?

Thank you, m.

Leave Group - user leaving the group is not notified via GroupListener

When a user leaves the group via https://prodocs.cometchat.com/v2.0/reference#user-leavegroup, they do not receive the action via CometChat.GroupListener. Other users see the action message via onGroupMemberLeft but not the user who is leaving the group. If the user does a subsequent call to fetchPrevious() they do see the action message { action: "left" } but there is currently no active listener event to notify that the user has left the group.

I would expect the user leaving the group to also receive a onGroupMemberLeft via the CometChat.GroupListener to let them know they have been removed from the group.

Pagination is not working for user request.

I am using cometchat-pro(version : 1.8.7) in my Angular-7 app.
Problem: Pagination is not working for user request. it comes data for the first time only. when i am trying to fetch next then it brings empty array.

User status updates not being sent when friends mode is enabled

When switched to 'show friends only' in the dashboard settings, the app loses its ability to detect online/offline status in the user event listeners -- even after the user logs out and logs back in again. This doesn't happen when 'all users' is selected in the dashboard.

setSearchKeyword function not available in SDK

let usersRequest = new CometChat.UsersRequestBuilder()
.setLimit(limit)
.setSearchKeyword("abc")
.build();

This code return:

Unhandled promise rejection TypeError: (intermediate value).setSearchKeyword is not a function

Not able to initialize the App

I have the folder directory similar to the image shown below :
Capture

I have installed the node module using npm.

Now, when I try to run the following code block by importing the module in html code the file test.html, I don't see anything in the console output.

<html>
<head>
</head>
<body>
<script type="text/html">
import { CometChat } from "./node_modules/@cometchat-pro/chat";
var appID = "MY_APP_ID";
CometChat.init(appID).then(
  hasInitialized => {
    console.log("Initialization completed successfully", hasInitialized);
    // You can now call login function.
  },
  error => {
    console.log("Initialization failed with error:", error);
    // Check the reason for error and take apppropriate action.
  }
);
</script>

</body>
</html>

If possible, can you redirect me to a working javascript code for the same..since it lacks in the documentation/Github repo as well

Module not found: Can't resolve 'react-native'

I am getting a warning when run a react app with cometchat dependency:
Compiled with warnings.

./node_modules/@cometchat-pro/chat/CometChat.js
Module not found: Can't resolve 'react-native' in 'C:...\node_modules@cometchat-pro\chat'

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

Chrome Ending Audio and Video Calling Error

I have ending calling error now and I updated latest version (1.8.13). Please help me about this issue

When I clicked end button for finish calling, I got this error
[react/features/base/redux/StateListenerRegistry.js] <Object._listener>: TypeError: Cannot read property 'updateView' of undefined

[1.8.8] Inconsistency in naming for action message for Scope changed

Describe the bug*
On Android, we get "System made Joe Doe admin" text
On iOS, we get "Joe Doe's scope changed from participant to participant" text

Expected behavior
Action message should be the same.

Actual behavior
getting different action message for the same action.

subscribePresenceForFriends feature not working

When the presence for friends is subscribed using the AppSettings class as

CometChat.AppSettingsBuilder().subscribePresenceForFriends().setRegion('eu').build()

The presence for friends is not received in the onUserOnline() and onUserOffline() methods of the UserListener class.

Message Listener problem

image

  1. when I initiate a chat or group chat with unique id its not creating a unique listener with the id
  2. when I initiate a chat with unique id I am also removing listener after chat view change, but listener is not removed from local storage and then when I initiate a chat with another user or group chat I am still receiving message from previous chat

Customizable Calling UI.

Hi all, I was integrating cometchat-pro in my application and integration went well. But when i make a video call to another user on the video call screen at the bottom right there is a div with user visual as Comet chat user. Any idea why it is being shown on the screen and how to get rid of it from the UI? Thanks.
Screenshot from 2019-09-16 18-21-41

Push notification not working in 2.0.0beta4

  • I've integrated push notifications in my vuejs app using cometchat 2.0.0-beta. But getting error like The selected app id is invalid but using same app id cometchat messaging and calling working in my same app.

image

image

Group Read Receipts not working in 2.0.0-beta6

Hello. I recently upgraded to 2.0-beta6 of the JS SDK since I was encountering markAsRead issues on group chats on v1.8.12. Seems to be working fine for the last couple of days until now. My unread count for group chats isn't updating when markAsRead function is called. Seems to working fine on 1:1 messaging. Double checked the parameters that I pass to the markAsRead function and they seem to be correct. Is this a bug with the sdk?

Error when using the production command "ionic cordova run browser —prod"

After compiling (ionic-app-scripts 3.2.2 + Angular 4.4.3) with production command "ionic cordova run browser —prod”, when I try to login the user the error “Cannot set property ‘endpoint’ of undefined” is raised.

vendor.js:1 ERROR Error: Uncaught (in promise): TypeError: Cannot set property 'endpoint' of undefined TypeError: Cannot set property 'endpoint' of undefined at vendor.js:1 at t.invoke (polyfills.js:3) at Object.onInvoke (vendor.js:1) at t.invoke (polyfills.js:3) at r.run (polyfills.js:3) at polyfills.js:3 at t.invokeTask (polyfills.js:3) at Object.onInvokeTask (vendor.js:1) at t.invokeTask (polyfills.js:3) at r.runTask (polyfills.js:3) at c (polyfills.js:3) at polyfills.js:3 at t.invokeTask (polyfills.js:3) at Object.onInvokeTask (vendor.js:1) at t.invokeTask (polyfills.js:3) at r.runTask (polyfills.js:3) at o (polyfills.js:3) at e.invokeTask [as invoke] (polyfills.js:3) at p (polyfills.js:2) at XMLHttpRequest.v (polyfills.js:2)

The code:

return t.prototype.getEndpointData = function(t) {
                    var e = this;
                    return new Promise(function(n, s) {
                        o.LocalStorage.getInstance().get(i.APP_SETTINGS.APP_SETTINGS).then(function(o) {
                            if (r.isFalsy(o)) {
                                var s = void 0;
                                e.uriEndpoints.hasOwnProperty(t) && (s.endpoint = (s = e.uriEndpoints[t]).hasOwnProperty(["isAdminApi"]) ? e.adminApiUrl + e.adminApiVersion + "/" + s.endpoint : e.baseUrl + e.apiVersion + "/" + s.endpoint),
                                n(s)
                            } else
                                s = void 0,
                                e.uriEndpoints.hasOwnProperty(t) && (s.endpoint = (s = e.uriEndpoints[t]).hasOwnProperty(["isAdminApi"]) ? "https://" + o[i.APP_SETTINGS.KEYS.ADMIN_API_HOST] + "/" + e.adminApiVersion + "/" + s.endpoint : "https://" + o[i.APP_SETTINGS.KEYS.CLIENT_API_HOST] + "/" + e.apiVersion + "/" + s.endpoint),
                                n(s)
                        }, function(r) {
                            var i;
                            e.uriEndpoints.hasOwnProperty(t) && (i.endpoint = (i = e.uriEndpoints[t]).hasOwnProperty(["isAdminApi"]) ? e.adminApiUrl + e.adminApiVersion + "/" + i.endpoint : e.baseUrl + e.apiVersion + "/" + i.endpoint),
                            n(i)
                        })
                    }
                    )
                }

The error is generated inside the first else:

e.uriEndpoints.hasOwnProperty(t) && (s.endpoint = (s = e.uriEndpoints[t]).hasOwnProperty(["isAdminApi"]) ? "https://" + o[i.APP_SETTINGS.KEYS.ADMIN_API_HOST] + "/" + e.adminApiVersion + "/" + s.endpoint : "https://" + o[i.APP_SETTINGS.KEYS.CLIENT_API_HOST] + "/" + e.apiVersion + "/" + s.endpoint), n(s)

It seem it can’t write to local storage. In fact checking the local storage there isn’t the app_settings.

In dev mode, compiling with "ionic serve" or "ionic cordova run browser" the code works without problems and the app_settings is correctly created in the local storage.

Thank you, m.

Getting error when using joinGroup().

This seem to happen only when the group is dynamically created.

  1. A creates a group (public)
  2. B joins a group (via rest-api)
  3. B sends a message
  4. A receives message
  5. A replies
  6. FAIL: B doesn't receive the message despite having added a MessageListener (no error message, it really just doesn't receive anything)
    In comparison:
  7. A creates group
  8. B joins group via client javascript-sdk
  9. ERROR: Network tab shows success but sdk throws an entity undefined error (see screenshot)

It seems like, the javascript-sdk doesn't know, (wasn't updated) when a group gets created making step 6:ScenarioA and step 3:ScenarioB fail. If I tweak my code to make B create the group, A was then failing. Hitting refresh, magically fixes everything. Refreshing the page might be forcing javascript-sdk to update something that makes listeners work again.

image

Call listners not working - javascript

calllistner-compile error

Initially the call-listener function throws an error saying it would accept only string as its parameter and after removing the "cometchat.d.ts" file from the node modules, I see that none of the incoming listeners are working.

eg: when I make a call from my web app, the call works and rings, but if the attender attends it there is no response in the call listener. Also I do not get any incoming call as well.

You may also test other cases to make sure its working.

NOTE: am developing the web app in angular6+

Video conference issue

Made a group video call from user "X". After I left the account, again tried to go, but for some reason no reaction after that was not followed.
The console displays an error.
Through other user tried to enter, everything is good, but each time when I cancel the notification of a video call from the user "X" and again I am authorized, again climbs out the notification from the user "X".
And this happens with every user. But log in to the user "X" is not possible. Is the latest version from Github.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.