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

UnhandledPromiseRejectionWarning #57

Open
TerrorSource opened this issue May 5, 2019 · 1 comment
Open

UnhandledPromiseRejectionWarning #57

TerrorSource opened this issue May 5, 2019 · 1 comment

Comments

@TerrorSource
Copy link

TerrorSource commented May 5, 2019

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.

@Collie147
Copy link

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);

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