I have followed the guide, https://docs.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/overview-channel-integration-framework
and copied the same code https://docs.microsoft.com/en-us/dynamics365/customer-service/channel-integration-framework/search-open-records-incoming-conversations
everything is working as expected. however, the console shows me the below error on Chrome (only) whenever the mousemove in the widget, not in Edge.
onUserActivity event: in widget code
msdyn_ciLibrary.js:1247 Uncaught (in promise) Map(2) {"message" => "Cannot read property 'then' of undefined", "msdyn_name" => undefined}
(anonymous) @ msdyn_ciLibrary.js:1247
Promise.then (async)
(anonymous) @ msdyn_ciLibrary.js:1239
sendMessage @ msdyn_ciLibrary.js:1236
onUserActivity @ msdyn_ciLibrary.js:1230
msdyn_ciLibrary.js:1247 Uncaught (in promise) Map(2) {"message" => "Cannot read property 'then' of undefined", "msdyn_name" => undefined}
(anonymous) @ msdyn_ciLibrary.js:1247
Promise.then (async)
(anonymous) @ msdyn_ciLibrary.js:1239
sendMessage @ msdyn_ciLibrary.js:1236
onUserActivity @ msdyn_ciLibrary.js:1230
msdyn_ciLibrary.js:1247 Uncaught (in promise) Map(2) {"message" => "Cannot read property 'then' of undefined", "msdyn_name" => undefined}
(anonymous) @ msdyn_ciLibrary.js:1247
Promise.then (async)
(anonymous) @ msdyn_ciLibrary.js:1239
sendMessage @ msdyn_ciLibrary.js:1236
onUserActivity @ msdyn_ciLibrary.js:1230
msdyn_ciLibrary.js:1225 onUserActivity event: in widget code
msdyn_ciLibrary.js:1247 Uncaught (in promise) Map(2) {"message" => "Cannot read property 'then' of undefined", "msdyn_name" => undefined}
(anonymous) @ msdyn_ciLibrary.js:1247
Promise.then (async)
(anonymous) @ msdyn_ciLibrary.js:1239
sendMessage @ msdyn_ciLibrary.js:1236
onUserActivity @ msdyn_ciLibrary.js:1230
msdyn_ciLibrary.js:1225 onUserActivity event: in widget code
msdyn_ciLibrary.js:1247 Uncaught (in promise) Map(2) {"message" => "Cannot read property 'then' of undefined", "msdyn_name" => undefined}
(anonymous) @ msdyn_ciLibrary.js:1247
Promise.then (async)
(anonymous) @ msdyn_ciLibrary.js:1239
sendMessage @ msdyn_ciLibrary.js:1236
onUserActivity @ msdyn_ciLibrary.js:1230
msdyn_ciLibrary.js:1225 onUserActivity event: in widget code
msdyn_ciLibrary.js:1247 Uncaught (in promise) Map(2) {"message" => "Cannot read property 'then' of undefined", "msdyn_name" => undefined}
(anonymous) @ msdyn_ciLibrary.js:1247
Promise.then (async)
(anonymous) @ msdyn_ciLibrary.js:1239
sendMessage @ msdyn_ciLibrary.js:1236
onUserActivity @ msdyn_ciLibrary.js:1230
msdyn_ciLibrary.js:1225 onUserActivity event: in widget code
msdyn_ciLibrary.js:1247 Uncaught (in promise) Map(2) {"message" => "Cannot read property 'then' of undefined", "msdyn_name" => undefined}
(anonymous) @ msdyn_ciLibrary.js:1247
Promise.then (async)
(anonymous) @ msdyn_ciLibrary.js:1239
sendMessage @ msdyn_ciLibrary.js:1236
onUserActivity @ msdyn_ciLibrary.js:1230
msdyn_ciLibrary.js:1225 onUserActivity event: in widget code
msdyn_ciLibrary.js:1247 Uncaught (in promise) Map(2) {"message" => "Cannot read property 'then' of undefined", "msdyn_name" => undefined}
(anonymous) @ msdyn_ciLibrary.js:1247
Promise.then (async)
(anonymous) @ msdyn_ciLibrary.js:1239
sendMessage @ msdyn_ciLibrary.js:1236
onUserActivity @ msdyn_ciLibrary.js:1230
msdyn_ciLibrary.js:1225 onUserActivity event: in widget code
msdyn_ciLibrary.js:1247 Uncaught (in promise) Map(2) {"message" => "Cannot read property 'then' of undefined", "msdyn_name" => undefined}
(anonymous) @ msdyn_ciLibrary.js:1247
Promise.then (async)
(anonymous) @ msdyn_ciLibrary.js:1239
sendMessage @ msdyn_ciLibrary.js:1236
onUserActivity @ msdyn_ciLibrary.js:1230
msdyn_ciLibrary.js:1225 onUserActivity event: in widget code
msdyn_ciLibrary.js:1247 Uncaught (in promise) Map(2) {"message" => "Cannot read property 'then' of undefined", "msdyn_name" => undefined}
(anonymous) @ msdyn_ciLibrary.js:1247
Promise.then (async)
(anonymous) @ msdyn_ciLibrary.js:1239
sendMessage @ msdyn_ciLibrary.js:1236
onUserActivity @ msdyn_ciLibrary.js:1230
I have done a bit debugging. the library ORGI.crm6.dynamics.com/.../msdyn_ciLibrary.js has following code
document.removeEventListener(Constants.OnKeyDownEvent, keyDownEvent); document.addEventListener(Constants.OnKeyDownEvent, keyDownEvent); document.removeEventListener("onclick", onUserActivity); document.removeEventListener("mousemove", onUserActivity); document.removeEventListener("touchstart", onUserActivity); document.addEventListener("onclick", onUserActivity); document.addEventListener("mousemove", onUserActivity); document.addEventListener("touchstart", onUserActivity);
it tracks the user's activity, onUserActivity, it send message to the global window. the global window replied with the above error in processMessage.
I tested this is only happen in Chrome, i don't see it in Edge.
anyone else experiences this issue?