relm Posted May 8, 2020 Report Posted May 8, 2020 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); }); Quote
Dr. McKay Posted May 9, 2020 Report Posted May 9, 2020 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. Quote
relm Posted May 9, 2020 Author Report Posted May 9, 2020 Oh thank you! The error value I'm getting is just `{}`. Quote
Dr. McKay Posted May 9, 2020 Report Posted May 9, 2020 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) '{}' Quote
relm Posted May 10, 2020 Author Report Posted May 10, 2020 Oh yes, sorry I forgot about it. I did the logger stringify the metadata xD Quote
Recommended Posts
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.