Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property 'match' of undefined on new message #13

Closed
MurzNN opened this issue Aug 15, 2017 · 7 comments
Closed

TypeError: Cannot read property 'match' of undefined on new message #13

MurzNN opened this issue Aug 15, 2017 · 7 comments

Comments

@MurzNN
Copy link

MurzNN commented Aug 15, 2017

Error in handleThirdPartyRoomMessage { TypeError: Cannot read property 'match' of undefined
    at deskypeify ( .local/matrix-puppets/matrix-puppet-skype/skypeify.js:22:15)
    at client.getConversation.then ( .local/matrix-puppets/matrix-puppet-skype/index.js:144:17)
    at 
    at process._tickCallback (internal/process/next_tick.js:188:7)
  [stack]: 'TypeError: Cannot read property \'match\' of undefined\n    at deskypeify ( .local/matrix-puppets/matrix-puppet-skype/skypeify.js:22:15)\n    at client.getConversation.then ( .local/matrix-puppets/matrix-puppet-skype/index.js:144:17)\n    at \n    at process._tickCallback (internal/process/next_tick.js:188:7)',
  [message]: 'Cannot read property \'match\' of undefined' } { roomId: '<redacted>',
  senderId: '<redacted>',
  senderName: '<redacted>',
  avatarUrl: '<redacted>',
  text: '<redacted>\r\nG9z4V5e2' } 
@Sorunome
Copy link
Member

what kind of message did you send to trigger this?

@MurzNN
Copy link
Author

MurzNN commented Aug 16, 2017

I receive common incoming message from Skype group chat, but this group chat don't shows in Matrix rooms, only shows errors in log :) So this error is repeating on next messages from this chat, here is another report with full message text:

Error in handleThirdPartyRoomMessage { TypeError: Cannot read property 'match' of undefined
    at deskypeify (matrix-puppet-skype/skypeify.js:22:15)
    at client.getConversation.then (matrix-puppet-skype/index.js:144:17)
    at 
    at process._tickCallback (internal/process/next_tick.js:188:7)
  [stack]: 'TypeError: Cannot read property \'match\' of undefined\n    at deskypeify (matrix-puppet-skype/skypeify.js:22:15)\n    at client.getConversation.then (matrix-puppet-skype/index.js:144:17)\n    at \n    at process._tickCallback (internal/process/next_tick.js:188:7)',
  [message]: 'Cannot read property \'match\' of undefined' } { roomId: 'MTk6NDlmMDM4ZGQ4MjQzNGNkM2FmZjJjM2FmZTRmNDM4Y2JAdGhyZWFkLnNreXBl',
  senderId: 'ODphbGV4aG90YmVk',
  senderName: 'Алексей',
  avatarUrl: 'https://avatar.skype.com/v1/avatars/alexhotbed?auth_key=-972783571',
  text: 'по ftp' } 

@MurzNN
Copy link
Author

MurzNN commented Aug 16, 2017

Seems this happens with unnamed chatrooms, I set name for this room and after this all messages received by Matrix normally.

@Sorunome
Copy link
Member

what do you mean "unnamed chatrooms", unnamed on which side? On the skype side?

@MurzNN
Copy link
Author

MurzNN commented Aug 16, 2017

Yes, the room created in skype side via creating untitled chat and inviting users to it, so Skype bridge in Matrix side don't create any new room in my account, only show errors.

@MurzNN
Copy link
Author

MurzNN commented Aug 16, 2017

Here is error report when I try to create new empty room in Skype on my side:

{ poll: An error happened while processing the polled messages
  caused by Error: Unknown ressource.messageType ("ThreadActivity/AddMember") for resource:
{
	"contentformat": "FN=MS%20Shell%20Dlg; EF=; CO=0; CS=0; PF=0",
	"messagetype": "ThreadActivity/AddMember",
	"originalarrivaltime": "2017-08-16T10:01:12.027Z",
	"type": "Message",
	"version": "1502877672027",
	"ackrequired": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/ALL/messages/1502877672027/ack",
	"origincontextid": "150287767081587622",
	"isactive": false,
	"from": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/contacts/19:[email protected]",
	"id": "1502877672027",
	"conversationLink": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/19:[email protected]",
	"counterpartymessageid": "1502877672027",
	"threadtopic": "murznn",
	"content": "15028776720278:murznn8:murznn",
	"composetime": "2017-08-16T10:01:12.027Z"
}
    at formatMessageResource (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:139:19)
    at formatEventMessage (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:241:24)
    at MessagesPoller. (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:310:43)
    at Generator.next ()
    at fulfilled (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:4:58)
    at 
    at process._tickCallback (internal/process/next_tick.js:188:7)
  name: 'poll',
  [_message]: 'An error happened while processing the polled messages',
  data: {},
  cause: 
   { Error: Unknown ressource.messageType ("ThreadActivity/AddMember") for resource:
   {
   	"contentformat": "FN=MS%20Shell%20Dlg; EF=; CO=0; CS=0; PF=0",
   	"messagetype": "ThreadActivity/AddMember",
   	"originalarrivaltime": "2017-08-16T10:01:12.027Z",
   	"type": "Message",
   	"version": "1502877672027",
   	"ackrequired": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/ALL/messages/1502877672027/ack",
   	"origincontextid": "150287767081587622",
   	"isactive": false,
   	"from": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/contacts/19:[email protected]",
   	"id": "1502877672027",
   	"conversationLink": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/19:[email protected]",
   	"counterpartymessageid": "1502877672027",
   	"threadtopic": "murznn",
   	"content": "15028776720278:murznn8:murznn",
   	"composetime": "2017-08-16T10:01:12.027Z"
   }
       at formatMessageResource (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:139:19)
       at formatEventMessage (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:241:24)
       at MessagesPoller. (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:310:43)
       at Generator.next ()
       at fulfilled (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:4:58)
       at 
       at process._tickCallback (internal/process/next_tick.js:188:7)
     [stack]: 'Error: Unknown ressource.messageType ("ThreadActivity/AddMember") for resource:\n{\n\t"contentformat": "FN=MS%20Shell%20Dlg; EF=; CO=0; CS=0; PF=0",\n\t"messagetype": "ThreadActivity/AddMember",\n\t"originalarrivaltime": "2017-08-16T10:01:12.027Z",\n\t"type": "Message",\n\t"version": "1502877672027",\n\t"ackrequired": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/ALL/messages/1502877672027/ack",\n\t"origincontextid": "150287767081587622",\n\t"isactive": false,\n\t"from": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/contacts/19:[email protected]",\n\t"id": "1502877672027",\n\t"conversationLink": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/19:[email protected]",\n\t"counterpartymessageid": "1502877672027",\n\t"threadtopic": "murznn",\n\t"content": "15028776720278:murznn8:murznn",\n\t"composetime": "2017-08-16T10:01:12.027Z"\n}\n    at formatMessageResource (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:139:19)\n    at formatEventMessage (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:241:24)\n    at MessagesPoller. (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:310:43)\n    at Generator.next ()\n    at fulfilled (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:4:58)\n    at \n    at process._tickCallback (internal/process/next_tick.js:188:7)',
     [message]: 'Unknown ressource.messageType ("ThreadActivity/AddMember") for resource:\n{\n\t"contentformat": "FN=MS%20Shell%20Dlg; EF=; CO=0; CS=0; PF=0",\n\t"messagetype": "ThreadActivity/AddMember",\n\t"originalarrivaltime": "2017-08-16T10:01:12.027Z",\n\t"type": "Message",\n\t"version": "1502877672027",\n\t"ackrequired": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/ALL/messages/1502877672027/ack",\n\t"origincontextid": "150287767081587622",\n\t"isactive": false,\n\t"from": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/contacts/19:[email protected]",\n\t"id": "1502877672027",\n\t"conversationLink": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/19:[email protected]",\n\t"counterpartymessageid": "1502877672027",\n\t"threadtopic": "murznn",\n\t"content": "15028776720278:murznn8:murznn",\n\t"composetime": "2017-08-16T10:01:12.027Z"\n}' },
  [_stack]: 'poll: An error happened while processing the polled messages\n  caused by Error: Unknown ressource.messageType ("ThreadActivity/AddMember") for resource:\n{\n\t"contentformat": "FN=MS%20Shell%20Dlg; EF=; CO=0; CS=0; PF=0",\n\t"messagetype": "ThreadActivity/AddMember",\n\t"originalarrivaltime": "2017-08-16T10:01:12.027Z",\n\t"type": "Message",\n\t"version": "1502877672027",\n\t"ackrequired": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/ALL/messages/1502877672027/ack",\n\t"origincontextid": "150287767081587622",\n\t"isactive": false,\n\t"from": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/contacts/19:[email protected]",\n\t"id": "1502877672027",\n\t"conversationLink": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/19:[email protected]",\n\t"counterpartymessageid": "1502877672027",\n\t"threadtopic": "murznn",\n\t"content": "15028776720278:murznn8:murznn",\n\t"composetime": "2017-08-16T10:01:12.027Z"\n}\n    at formatMessageResource (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:139:19)\n    at formatEventMessage (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:241:24)\n    at MessagesPoller. (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:310:43)\n    at Generator.next ()\n    at fulfilled (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:4:58)\n    at \n    at process._tickCallback (internal/process/next_tick.js:188:7)',
  [_stackContainer]: undefined,
  message: 'poll: An error happened while processing the polled messages\n  caused by Error: Unknown ressource.messageType ("ThreadActivity/AddMember") for resource:\n{\n\t"contentformat": "FN=MS%20Shell%20Dlg; EF=; CO=0; CS=0; PF=0",\n\t"messagetype": "ThreadActivity/AddMember",\n\t"originalarrivaltime": "2017-08-16T10:01:12.027Z",\n\t"type": "Message",\n\t"version": "1502877672027",\n\t"ackrequired": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/ALL/messages/1502877672027/ack",\n\t"origincontextid": "150287767081587622",\n\t"isactive": false,\n\t"from": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/contacts/19:[email protected]",\n\t"id": "1502877672027",\n\t"conversationLink": "https://bn2-client-s.gateway.messenger.live.com/v1/users/ME/conversations/19:[email protected]",\n\t"counterpartymessageid": "1502877672027",\n\t"threadtopic": "murznn",\n\t"content": "15028776720278:murznn8:murznn",\n\t"composetime": "2017-08-16T10:01:12.027Z"\n}\n    at formatMessageResource (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:139:19)\n    at formatEventMessage (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:241:24)\n    at MessagesPoller. (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:310:43)\n    at Generator.next ()\n    at fulfilled (matrix-puppet-skype/node_modules/skype-http/dist/lib-es2015/lib/polling/messages-poller.js:4:58)\n    at \n    at process._tickCallback (internal/process/next_tick.js:188:7)' } 

So room is not created in Matrix, and writing every message to this room in Skype shows match error like in issue title.

@MurzNN
Copy link
Author

MurzNN commented Aug 24, 2017

The main problem is with adding new member to room, described #15
Closing this as duplicate.

@MurzNN MurzNN closed this as completed Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants