Jump to content
McKay Development

TypeError: Cannot set property 'rich_presence' of undefined


Recommended Posts

Posted

Hi, getting error when user change state

TypeError: Cannot set property 'rich_presence' of undefined
    at node_modules/steam-user/components/friends.js:724
    at processTicksAndRejections (internal/process/task_queues.js:86)
Posted

Might you be somehow modifying the SteamID object passed to the user event?

 

Try 4.12.1 and see if that fixes your problem.

it didn't fix a problem

Posted

Might you be somehow modifying the SteamID object passed to the user event?

 

Try 4.12.1 and see if that fixes your problem.

Can it work worse if i modificated user property persona_state ?

Posted (edited)

Might you be somehow modifying the SteamID object passed to the user event?

 

Try 4.12.1 and see if that fixes your problem.

sometimes happens that the "users" object is filled with empty objects. How can i reemit it ?

Edited by Ino
Posted

I think you're probably modifying objects that you shouldn't be.

Thank you for help. I have last problem, i have event "steamGuard" and option promptSteamGuardCode: false, but it want to prodive guard code from stdin, and through long time it loggedin using maFile, without stdin

Posted (edited)

I don't understand.

https://github.com/DoctorMcKay/node-steam-user#steamGuard

 

 

 

If no listener is bound to this event, then steam-user will prompt the user for a code via stdin.

I have listener "steamGuard" and i provided promptSteamGuardCode: false , but it still asks for the code through stdin. It does not always happen, but once from 10-15

Edited by Ino
Posted

Then you didn't bind the listener at the right time.

What's right time for bind listener ? Can you show the example ?

Posted (edited)

Before you call logOn.

I did it before, but sometimes get this bug. The problem with the empty object "users" is also relevant

image.png

And event "LoggedOn" can be emitted even if there was an error at the entrance, for example "RateLimitExceeded"

Edited by Ino
Posted

once is your problem. It'll only be fired once, then the listener is removed.

 

Also, promptSteamGuardCode has no function as of v4.

Okay, thank you. So can you fix that "LoggedOn" can be emitted if was error while logOn ?

Posted (edited)

once is your problem. It'll only be fired once, then the listener is removed.

 

Also, promptSteamGuardCode has no function as of v4.

if it not once event steamGuard could be emitted many times and account get error rateLimitExceed. The event steamguard work nicely, but it error because sometimes steamtotp generate wrong auth code, what can i do in this case not to get banned rateLimit and successfully auth to my account? 

Edited by Ino
Posted (edited)

If the steamGuard event is emitted and lastCodeWrong is true, then you should delay 30 seconds before you generate and return a code.

Thank you ! The last question, if a person is online from the phone - shows that he is offline, how can I fix it? And how can i know about person online from phone ?

Edited by Ino

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...