Jump to content


Photo

TypeError: Cannot set property 'rich_presence' of undefined

node.js node-steam-user

  • Please log in to reply
20 replies to this topic

#1 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 15 July 2019 - 09:57 AM

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)


#2 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,166 posts

Posted 15 July 2019 - 02:22 PM

Are you up to date?



#3 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 15 July 2019 - 05:24 PM

Are you up to date?

version 4.12.0



#4 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,166 posts

Posted 16 July 2019 - 02:54 AM

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

 

Try 4.12.1 and see if that fixes your problem.



#5 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 16 July 2019 - 05:25 AM

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



#6 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 16 July 2019 - 05:54 AM

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 ?



#7 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 16 July 2019 - 08:10 AM

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, 16 July 2019 - 08:47 AM.


#8 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,166 posts

Posted 16 July 2019 - 03:52 PM

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



#9 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 17 July 2019 - 04:31 AM

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



#10 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,166 posts

Posted 17 July 2019 - 10:51 AM

I don't understand.



#11 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 17 July 2019 - 12:39 PM

I don't understand.

https://github.com/D...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, 17 July 2019 - 03:52 PM.


#12 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,166 posts

Posted 17 July 2019 - 04:09 PM

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



#13 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 17 July 2019 - 05:14 PM

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

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



#14 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,166 posts

Posted 17 July 2019 - 05:21 PM

Before you call logOn.



#15 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 17 July 2019 - 05:36 PM

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, 17 July 2019 - 06:10 PM.


#16 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,166 posts

Posted 17 July 2019 - 06:23 PM

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

 

Also, promptSteamGuardCode has no function as of v4.



#17 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 17 July 2019 - 06:34 PM

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 ?



#18 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,166 posts

Posted 17 July 2019 - 10:41 PM

loggedOn won't be emitted unless the logon was successful.



#19 Ino

Ino

    Advanced Member

  • Member
  • PipPipPip
  • 83 posts

Posted 18 July 2019 - 12:38 PM

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, 18 July 2019 - 01:46 PM.


#20 Dr. McKay

Dr. McKay

    Developer

  • Administrator
  • 2,166 posts

Posted 18 July 2019 - 02:45 PM

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







Also tagged with one or more of these keywords: node.js, node-steam-user

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users