Jump to content
McKay Development

Unable to get local issuer certificate


Harry

Recommended Posts

Hey!

I'm trying to make some requests with httpProxy, but I'm facing issues already with the initial connection.

This is my code:

import SteamUser from 'steam-user';

const client = new SteamUser({
  httpProxy: 'http://USER:[email protected]:60000',
  // webCompatibilityMode: true,
});

client.on('debug', (msg) => console.log(msg));
client.logOn({ anonymous: true });
client.on('loggedOn', async function (details) {
  console.log('Logged into Steam as ' + client.steamID.getSteam3RenderedID());
  console.log('with public ip: ' + client.publicIP);
  client.logOff();
  process.exit();
});

I'm using Node v16.20.2 and compared an older version of steam-user (4.19.4) and newer version (5.0.4) with a same/similar result.

4.19.4 debug log:

[T1] Connecting to TCP CM: 205.196.6.214:27018

and stays stuck here.

4.19.4 debug log with webCompatibilityMode: true:

Forcing protocol to EConnectionProtocol.WebSocket because webCompatibilityMode is enabled
[W1] Randomly chose WebSocket CM ext3-sto2.steamserver.net:27024
[W1] WebSocket disconnected with error: unable to get local issuer certificate
[W1] Handling connection close

and keeps repeating a similar message over and over again.

 

5.0.4 debug log:

GetCMListForConnect error: unable to get local issuer certificate

Emitted 'error' event on SteamUser instance at:
    at SteamUser._doConnection (/node_modules/.pnpm/[email protected]/node_modules/steam-user/components/09-logon.js:299:10)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
  proxyConnecting: false

Repeats the first line few times and then throws the error.

5.0.4 debug log with webCompatibilityMode: true:

Forcing protocol to EConnectionProtocol.WebSocket because webCompatibilityMode is enabled
GetCMListForConnect error: unable to get local issuer certificate

Emitted 'error' event on SteamUser instance at:
    at SteamUser._doConnection (/node_modules/.pnpm/[email protected]/node_modules/steam-user/components/09-logon.js:299:10)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
  proxyConnecting: false

Repeats the first 2 lines few times and then throws the error.

 

I'd happily provide any more details if necessary. I would really appreciate any directions or insight into what might cause the issue.

Edited by Harry
improved code formatting
Link to comment
Share on other sites

From what I can tell, that proxy provider is intended to MITM your traffic and solve/bypass captchas and other anti-bot tools for you. In order to do that, it needs to present its own (untrusted) HTTPS certificate.

I wouldn't recommend using that provider for this purpose, but if you really wanted to, you'd need to disable TLS certificate checking in Node. This is very much not recommended, but you can do so by setting the environment variable NODE_TLS_REJECT_UNAUTHORIZED to 0.

Link to comment
Share on other sites

Ah I see, I think it makes sense for that very specific product that the proxy provider offers. Thanks for the warning, I will look into their alternative solutions.

Is there any provider that you would personally recommend or maybe some that has been commonly used by others for Steam?

Thank you for the answer - it clarified the issue for me and I have now some concrete things to try & test. Appreciate it!

Link to comment
Share on other sites

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