MeetEasier icon indicating copy to clipboard operation
MeetEasier copied to clipboard

UnhandledPromiseRejectionWarning

Open TerrorSource opened this issue 5 years ago • 1 comments

I created 3 room mailboxes in an demo azure tenant. MeetingRoom1 MeetingRoom2 MeetingRoom3

Created a test meeting in all 3 room's which was automatically accepted. Created a Distribution List named "Rooms" and added all 3 meetingrooms in it New-DistributionGroup -Name "Rooms" -DisplayName "Rooms" -PrimarySmtpAddress "[email protected]" -RoomList Add-DistributionGroupMember -Identity "Rooms" -Member "Meetingroom1"

Added admin at xxx.onmicrosoft com with password and domain in the auth.js Added "Meetingroom1 @ xxx.onmicrosoft.com" to room-blacklist.js.

Creating some meetings in the meeting rooms and adding 1 meeting room to the blacklist should solve some issues according to other github issues/reply's

pi@raspberrypi:~/MeetEasier $ npm start

> meet-easier@ start /home/pi/MeetEasier
> node server

now we're cooking.
(node:24337) UnhandledPromiseRejectionWarning: TypeError: ews.TimeSpan.FromHours(...).asMilliseconds is not a function
    at /home/pi/MeetEasier/app/ews/rooms.js:118:141
    at Array.forEach (<anonymous>)
    at /home/pi/MeetEasier/app/ews/rooms.js:116:21
    at new Promise (<anonymous>)
    at getAppointmentsForRooms (/home/pi/MeetEasier/app/ews/rooms.js:109:19)
(node:24337) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:24337) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:24337) UnhandledPromiseRejectionWarning: TypeError: ews.TimeSpan.FromHours(...).asMilliseconds is not a function
    at /home/pi/MeetEasier/app/ews/rooms.js:118:141
    at Array.forEach (<anonymous>)
    at /home/pi/MeetEasier/app/ews/rooms.js:116:21
    at new Promise (<anonymous>)
    at getAppointmentsForRooms (/home/pi/MeetEasier/app/ews/rooms.js:109:19)
(node:24337) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)

While this is in the console, the webpage does show the "Rooms" under Locations but it keeps spinning.

TerrorSource avatar May 05 '19 20:05 TerrorSource

I've got the same issue, change it to the below it and it should work

var view = new ews.CalendarView(ews.DateTime.Now, new ews.DateTime(ews.DateTime.Now.TotalMilliSeconds + 864000000), 6);

Collie147 avatar Jul 12 '19 10:07 Collie147