Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash with .getProductInfo() for certain packages #335

Closed
srgraham opened this issue Dec 11, 2020 · 2 comments
Closed

Crash with .getProductInfo() for certain packages #335

srgraham opened this issue Dec 11, 2020 · 2 comments
Labels

Comments

@srgraham
Copy link

Describe the bug

I'm using client.getProductInfo() to lookup apps and packages. All apps always seem to work, but some packages are causing a crash.

I'm swapping out the code in node-steam-user/examples/databasedownloader.js:

// app lookups work fine
result = await client.getProductInfo([440, 730], []); // ok

// sub lookups for most packages ids work fine
result = await client.getProductInfo([], [326, 379]); // ok

// bad package crashes
result = await client.getProductInfo([], [26017]); // Crash!

26017 and 28320 are example packages that always crash for me. They exist on steamdb, though:
https://steamdb.info/sub/26017/
https://steamdb.info/sub/28320/

Versions

[email protected]
[email protected]

Screenshots and Error Logs

(node:23296) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'toBuffer' of null
    at Object.exports.parse (\node_modules\binarykvparser\index.js:23:13)
    at \node_modules\steam-user\components\apps.js:281:36
    at Array.forEach (<anonymous>)
    at SteamUser.<anonymous> (\node_modules\steam-user\components\apps.js:277:26)
    at SteamUser._handleMessage (\node_modules\steam-user\components\messages.js:569:34)
    at SteamUser._handleNetMessage (\node_modules\steam-user\components\messages.js:506:7)
    at SteamUser.processMulti (\node_modules\steam-user\components\messages.js:598:9)
    at SteamUser.<anonymous> (\node_modules\steam-user\components\messages.js:592:16)
    at \node_modules\steam-user\components\classes\HandlerManager.js:37:12
    at Array.forEach (<anonymous>)
    at HandlerManager.emit (\node_modules\steam-user\components\classes\HandlerManager.js:36:12)
    at SteamUser._handleMessage (\node_modules\steam-user\components\messages.js:571:24)
    at SteamUser._handleNetMessage (\node_modules\steam-user\components\messages.js:506:7)
    at TCPConnection._readMessage (\node_modules\steam-user\components\connection_protocols\tcp.js:193:12)
    at Socket.emit (events.js:315:20)
    at emitReadable_ (_stream_readable.js:569:12)
    at processTicksAndRejections (internal/process/task_queues.js:79:21)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:23296) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:23296) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
^C

This is the content of the variable body right before the crash:

{
  apps: [],
  unknown_appids: [],
  packages: [
    {
      packageid: 28320,
      change_number: 9590989,
      missing_token: true,
      sha: null,
      buffer: null,
      size: null
    }
  ],
  unknown_packageids: [],
  meta_data_only: false,
  response_pending: false,
  http_min_size: null,
  http_host: null
}
@srgraham srgraham added the bug label Dec 11, 2020
@AndreasWJ
Copy link

AndreasWJ commented Dec 22, 2020

How does your 730 result look like?

result = await client.getProductInfo([440, 730], []); // ok

This might be unrelated but I keep receiving "missingToken: true" when fetching product info for 730, even when inclTokens is set to true.

Edit: Nevermind. It was an issue with the Steam account.

@DoctorMcKay
Copy link
Owner

Thanks for the report. This is now fixed in v4.19.1. The issue was caused when info was requested for a package that requires a token which the current account does not own, if the PICS cache was not enabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants