Jump to content
McKay Development

Recommended Posts

Posted

Hello!

I'm getting an empty object on setCookies callback, I need to generate an apiKey on Steam before?

client.on('webSession', (sessionID, cookies) => {
  manager.setCookies(cookies, (err) => {
    if (err !== null) {
      log.error('Could not set manager cookies', { err });
      process.exit(1);
      return;
    }

    log.info('Got API key', { apiKey: manager.apiKey });
  });

  community.setCookies(cookies);
});

 

Posted

What do you mean by an empty object? The err property will always be either null or an Error object.

That said, your problem is likely that your Steam account is limited, i.e. you haven't spent $5 yet.

Posted

That sounds suspiciously like you're trying to JSON.stringify the error object.

> let err = new Error('test')
undefined
> err
Error: test
    at repl:1:11
    at Script.runInThisContext (vm.js:123:20)
    at REPLServer.defaultEval (repl.js:384:29)
    at bound (domain.js:415:14)
    at REPLServer.runBound [as eval] (domain.js:428:12)
    at REPLServer.onLine (repl.js:700:10)
    at REPLServer.emit (events.js:208:15)
    at REPLServer.EventEmitter.emit (domain.js:471:20)
    at REPLServer.Interface._onLine (readline.js:314:10)
    at REPLServer.Interface._line (readline.js:691:8)
> JSON.stringify(err)
'{}'

 

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...