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

DeprecationWarning: Calling an asynchronous function without callback is deprecated. #35

Open
CemreSuler opened this issue Mar 6, 2018 · 7 comments

Comments

@CemreSuler
Copy link

I get this error every time I run the script, the calendar works fine, but this thing is just irritating

@lesander
Copy link
Owner

lesander commented Mar 6, 2018

Could you please share the full output you see?

@CemreSuler
Copy link
Author

Terminal.txt

@jvdoorn
Copy link

jvdoorn commented Aug 23, 2018

If it works fine you can just ignore it, if you are bothered by the output you can try the following (I'm on Mac, it will probably work on Linux but I'm not sure about Windows):
your command > /dev/null
For me it is the following:
/usr/local/bin/node magister-calendar.js > /dev/null

I have a cron job that runs every 10 minutes or something which is what I'd recommend to you as well (of course you can use a different timeout and if cron is not available for your machine just use a similar piece of software).

@CemreSuler
Copy link
Author

Thank you!

@lesander
Copy link
Owner

My bad. Somewhere in the codebase I've called an async function without giving a callback function. I'll see if I can find the exact culprit.

On a side note: I don't recommend writing the output of the program to /dev/null, since this will prevent you from seeing any logs.

Generally, this error message can be ignored.

@lesander
Copy link
Owner

@CemreSuler Could you please run magister-calendar.js with the following flags: --trace-warnings or --trace-deprecation and share the output?

@jvdoorn
Copy link

jvdoorn commented Nov 23, 2018

Alright, I see two errors in here:

[!] 9:49:42 2705581 Error creating appointment. {"errors":[{"domain":"global","reason":"duplicate","message":"The requested identifier already exists."}],"code":409,"message":"The requested identifier already exists."}
[*] 9:49:42 2705581 Appointment is a duplicate, updating instead.

and

(node:96131) [DEP0013] DeprecationWarning: Calling an asynchronous function without callback is deprecated.

The first one I think is from clearing a cache manually, I don't think it is neccesary to investigate the issue further.

The second issue is most likely fixed in my PR that replaces the asyncronious function with a syncronious function #39.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants