Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Dynamics 365 Channel Integration Framework v1 onUserActivity event error in Chrome

Posted on by Microsoft Employee

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

pastedimage1605226282598v1.png

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. 

edge.PNG

anyone else experiences this issue?

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamics 365 Channel Integration Framework v1 onUserActivity event error in Chrome

    I am experiencing this same issue with any new development org I create.  It does not matter if I use the example code or a webpage I have created myself, the  promise issue persists and seems to be coming from one of the MSDynamics classes.  I experience the answer in chrome, edge and firefox; Is there any resolution for this issue

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans