question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Event 'appOwnershipCached' not getting Emited.

See original GitHub issue

My code

const SteamTotp = require('steam-totp');
const SteamUser = require('steam-user');

const client = new SteamUser();

// If enabled, then node-steam-user will internally cache data about all apps and packages that it knows about.
client.enablePicsCache = true;

// An object containing details for this logon
const logOnOptions = {
  accountName: process.env.STEAM_USERNAME,
  password: process.env.STEAM_PASSWORD,
  twoFactorCode: SteamTotp.generateAuthCode(process.env.STEAM_SHARED_SECRET)
};

// Logs onto Steam
client.logOn(logOnOptions);

// Emitted when you're successfully logged into Steam.
client.on('loggedOn', details => {
  console.log('Logged into Steam!');

  // const steamID64 = client.steamID.getSteamID64();

  client.setPersona(SteamUser.Steam.EPersonaState.LookingToTrade);
});

// Emitted once we have all data required in order to determine app ownership. You can now safely call getOwnedApps, ownsApp, getOwnedDepots, and ownsDepot.
// This is only emitted if enablePicsCache is true.
client.on('appOwnershipCached', function() {
  console.log(client.getOwnedApps());
});

Can anyone please tell me whats wrong?

My Node and NPM versions

anupkrbid@DESKTOP-MG2N75J:/mnt/e/Projects/web/steam-bot$ node -v
v8.11.2
anupkrbid@DESKTOP-MG2N75J:/mnt/e/Projects/web/steam-bot$ npm -v
6.1.0

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DoctorMcKaycommented, Aug 27, 2018

You’re not enabling enablePicsCache properly. You need to do it like:

const client = new SteamUser({"enablePicsCache": true});
0reactions
DoctorMcKaycommented, Aug 27, 2018

setOptions is supposed to work all the time, but there’s a bug preventing you from changing enablePicsCache until after your licenses list is received (licenses event).

You should use https://dev.doctormckay.com for future questions and the like.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chapter 4. Service Worker Lifecycle and Cache Management
Once the event is over, the service worker may be terminated by the browser before the response comes back. This will leave no...
Read more >
None of my discord.js guildmember events are emitting, my ...
Firstly, my guildMemberAdd , guildMemberRemove , and guildMemberUpdate events simply stopped doing anything. No errors are appearing, and when ...
Read more >
Caching in GitLab CI/CD
A cache is one or more files a job downloads and saves. Subsequent jobs that use the same cache don't have to download...
Read more >
Getting Started | Caching Data with Spring
This guide assumes that you chose Java. Click Dependencies and select Spring cache abstraction. Click Generate. Download the resulting ZIP file, ...
Read more >
Apps/files do not open when the re… | Apple Developer Forums
I have been able to reproduce a scenario where apps/files do not open when I subscribe to ES_EVENT_TYPE_AUTH_OPEN and set caching to true...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found