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

getMessages() returns an empty array instead of the list of messages #333

Closed
myke-roly opened this issue Jun 13, 2024 · 3 comments
Closed

Comments

@myke-roly
Copy link

myke-roly commented Jun 13, 2024

When calling chatSDK.getMessages() in my React Native project, the method returns an empty array ([]) instead of the expected list of messages.

Implemetation


await chatSDK
  .getMessages()
  .then(messages => {
    console.log(messages)
  })
  .catch(e => {
    console.error('Error getting messages', e)
  })

Result []

The method chatSDK.getMessages() should return a list of messages instead of an empty array.

Environment Information

@microsoft/omnichannel-chat-sdk: 1.9.0
react-native: 0.71.11
react: 18.2.0

Devices: Tested on both Android and iOS

LOGS setDebug(true)

 LOG  [ScenarioMarker][startScenario]
 LOG  [AriaTelemetry][fillMobilePlatformData][Android]
 LOG  [AriaTelemetry][info] occhatsdk_events
 LOG  {"name": "occhatsdk_events", "priority": 3, "properties": {"CDNPackagesInfo": undefined, "CallId": "", "ChatId": "{ChatId}", "ChatSDKRuntimeId": "{ChatSDKRuntimeId}", "ChatSDKVersion": "1.9.0", "DeviceInfo_OsName": "Android", "DeviceInfo_OsVersion": 34, "Domain": "", "ElapsedTimeInMilliseconds": "", "Event": "GetMessagesStarted", "ExceptionDetails": "", "LogLevel": "INFO", "NPMPackagesInfo": "{\"OCSDK\":\"0.5.2\",\"IC3Core\":\"0.1.3\",\"ACSChat\":\"1.1.1\",\"ACSCommon\":\"1.1.0\",\"AMSClient\":\"0.1.6\"}", "OrgId": "{OrgId}", "OrgUrl": "{OrgUrl}", "PlatformDetails": "{\"Renderer\":\"ReactNative\",\"DeviceInfo_OsVersion\":34,\"DeviceInfo_OsName\":\"Android\"}", "RequestId": "{RequestId}", "WidgetId": "{WidgetId}"}}
 LOG  GetMessagesStarted
 LOG  [ScenarioMarker][startScenario]
 LOG  [AriaTelemetry][fillMobilePlatformData][Android]
 LOG  [AriaTelemetry][info] occhatsdk_acsclientevents
 LOG  {"name": "occhatsdk_acsclientevents", "priority": 3, "properties": {"ACSChatVersion": "1.1.1", "ChatId": "{ChatId}", "ChatSDKRuntimeId": "{ChatSDKRuntimeId}", "ElapsedTimeInMilliseconds": "", "Event": "GetMessagesStarted", "ExceptionDetails": "", "LogLevel": "INFO", "OrgId": "{OrgId}", "OrgUrl": "{OrgUrl}", "RequestId": "{RequestId}", "WidgetId": "{WidgetId}"}}
 LOG  GetMessagesStarted
 LOG  [ScenarioMarker][completeScenario]
 LOG  [AriaTelemetry][fillMobilePlatformData][Android]
 LOG  [AriaTelemetry][info] occhatsdk_acsclientevents
 LOG  {"name": "occhatsdk_acsclientevents", "priority": 3, "properties": {"ACSChatVersion": "1.1.1", "ChatId": "{ChatId}", "ChatSDKRuntimeId": "{ChatSDKRuntimeId}", "ElapsedTimeInMilliseconds": 998, "Event": "GetMessagesCompleted", "ExceptionDetails": "", "LogLevel": "INFO", "OrgId": "{OrgId}", "OrgUrl": "{OrgUrl}", "RequestId": "{RequestId}", "WidgetId": "{WidgetId}"}}
 LOG  GetMessagesCompleted
 LOG  [ScenarioMarker][completeScenario]
 LOG  [AriaTelemetry][fillMobilePlatformData][Android]
 LOG  [AriaTelemetry][info] occhatsdk_events
 LOG  {"name": "occhatsdk_events", "priority": 3, "properties": {"CDNPackagesInfo": undefined, "CallId": "", "ChatId": "{ChatId}", "ChatSDKRuntimeId": "{ChatSDKRuntimeId}", "ChatSDKVersion": "1.9.0", "DeviceInfo_OsName": "Android", "DeviceInfo_OsVersion": 34, "Domain": "", "ElapsedTimeInMilliseconds": 1001, "Event": "GetMessagesCompleted", "ExceptionDetails": "", "LogLevel": "INFO", "NPMPackagesInfo": "{\"OCSDK\":\"0.5.2\",\"IC3Core\":\"0.1.3\",\"ACSChat\":\"1.1.1\",\"ACSCommon\":\"1.1.0\",\"AMSClient\":\"0.1.6\"}", "OrgId": "{OrgId}", "OrgUrl": "{OrgUrl}", "PlatformDetails": "{\"Renderer\":\"ReactNative\",\"DeviceInfo_OsVersion\":34,\"DeviceInfo_OsName\":\"Android\"}", "RequestId": "{RequestId}", "WidgetId": "{WidgetId}"}}
 LOG  GetMessagesCompleted
 LOG  []

@myke-roly myke-roly changed the title chatSDK.getMessages() returns an empty array instead of the list of messages getMessages() returns an empty array instead of the list of messages Jun 13, 2024
@ferodom
Copy link

ferodom commented Sep 18, 2024

any ideas on this? I am having the same issue

@xTEddie
Copy link
Contributor

xTEddie commented Sep 20, 2024

Can you try to downgrade @azure/core-rest-pipeline to 1.14.0 and see if it works?

@xTEddie xTEddie closed this as completed Oct 10, 2024
@mikebds
Copy link

mikebds commented Oct 14, 2024

"I tried downgrading @azure/core-rest-pipeline to version 1.14.0 as suggested, but unfortunately, it didn’t resolve the issue.

I'm still encountering the following error:

{
   "HttpStatus":400,
   "errorCode":100,
   "subErrorCode":33,
   "errorType":"GraphMethodException",
   "errorMessage":"Unsupported get request. Object with ID 180443023291632 does not exist cannot be loaded due to missing permissions or does not support this operation"
}

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

4 participants