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

postUserComment gives no err callback. #239

Open
karpov-stas opened this issue Nov 15, 2019 · 2 comments
Open

postUserComment gives no err callback. #239

karpov-stas opened this issue Nov 15, 2019 · 2 comments

Comments

@karpov-stas
Copy link

What I am trying to do:
Post a comment on a user's profile.
Expected behaviour:
The comment gets successfully posted OR I get an error callback in case something bad happened.
Actual behaviour:
The comment does not get posted and I do not get an error callback, not even null. But not only that, I do not get any callback at all. Just like console.log or if-else don't exist; i.e. 'some error' or 'no error' are not printed. What's weird is that this piece of the code has worked flawlessly until I updated my NodeJS (or node-steamcommunity (or both)) to the most recent version(s).
Additional notes:
I am sure this code worked before the updates. I have made no changes to the code. However, I am unsure if the bug is related to NodeJS itself or node-steamcommunity. I wish I could debug it myself, but I have no experience in debugging NodeJS codes.
Code itself:

const SteamUser = require('steam-user');
const client = new SteamUser();
var SteamCommunity = require('steamcommunity');
var community = new SteamCommunity();
//*some code unrelated to callbacks and node-steamcommunity
community.postUserComment('765611XXXXXXXXXXX', 'some funny comment', err => {
   	 if (err) {
   		 console.log('some error')
   		 console.log(err)
   	 } else {
   		 console.log('no error')
   		 }
 });
@karpov-stas
Copy link
Author

Looks like the issue is related to nodejs13. By installing the LTS version of nodejs, I've been able to resolve the issue without any other tweaks.

@DoctorMcKay
Copy link
Owner

There is no code path that wouldn't result in the callback being invoked (provided it's been supplied). I suspect there was some bug in the Node.js 13.x version you tried.

Did you have any trouble with any other callbacks?

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