seishun / node-steam

Interface directly with Steam servers from Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

steamClient never connected

dasyah opened this issue · comments

this is weird or maybe I do wrong? its look like steamClient never connected even already do steamClient.connect();

here is my code

var Steam = require('steam');
var steamClient = new Steam.SteamClient();
var steamUser = new Steam.SteamUser(steamClient);
steamClient.connect();
console.log("trying");
steamClient.on('connected', function() {

steamUser.logOn({
account_name: 'secret',
password: 'secret'
});
});

steamClient.on('logOnResponse', res => {
const eresult = res.eresult;
console.log("getting response");
if (eresult === Steam.EResult.OK) {
console.log("Logged in!");
}
});

just print trying in console log never Logged in!

username&password true tested manual login with disable 2fa

Might be outdated server list, see #434. To mitigate, install from git (npm install seishun/node-steam) or follow the instructions in my comment.

cant install get this error

npm ERR! prepareGitDep 2> npm WARN install Usage of the --dev option is deprecated. Use --only=dev instead.
npm ERR! prepareGitDep npm ERR! prepareGitDep 1>
npm ERR! prepareGitDep npm ERR! prepareGitDep > steam-resources@1.2.0 prepare C:\Users\dash\AppData\Roaming\npm-cache_cacache\tmp\git-clone-4ebd93e5
npm ERR! prepareGitDep npm ERR! prepareGitDep > svn checkout https://github.com/SteamDatabase/Protobufs/trunk protobufs && svn checkout https://github.com/SteamRE/SteamKit/trunk/Resources/Protogen protogen && svn checkout https://github.com/SteamRE/SteamKit/trunk/Resources/SteamLanguage steam_language
npm ERR! prepareGitDep npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! prepareGitDep 2> npm WARN install Usage of the --dev option is deprecated. Use --only=dev instead.
npm ERR! prepareGitDep npm ERR! prepareGitDep 'svn' is not recognized as an internal or external command,
npm ERR! prepareGitDep npm ERR! prepareGitDep operable program or batch file.
npm ERR! prepareGitDep npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
npm ERR! prepareGitDep npm ERR! prepareGitDep npm ERR! errno 1
npm ERR! prepareGitDep npm ERR! prepareGitDep npm ERR! steam-resources@1.2.0 prepare: svn checkout https://github.com/SteamDatabase/Protobufs/trunk protobufs && svn checkout https://github.com/SteamRE/SteamKit/trunk/Resources/Protogen protogen && svn checkout https://github.com/SteamRE/SteamKit/trunk/Resources/SteamLanguage steam_language
npm ERR! prepareGitDep npm ERR! prepareGitDep npm ERR! Exit status 1
npm ERR! prepareGitDep npm ERR! prepareGitDep npm ERR!
npm ERR! prepareGitDep npm ERR! prepareGitDep npm ERR! Failed at the steam-resources@1.2.0 prepare
script.
npm ERR! prepareGitDep npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! prepareGitDep npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR! prepareGitDep npm ERR! C:\Users\dash\AppData\Roaming\npm-cache_logs\2019-03-02T16_01_23_524Z-debug.log
npm ERR! prepareGitDep npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! premature close
npm ERR! prepareGitDep
npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
npm ERR! prepareGitDep npm ERR! C:\Users\dash\AppData\Roaming\npm-cache_logs\2019-03-02T16_01_23_705Z-debug.log
npm ERR! prepareGitDep
npm ERR! premature close

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dash\AppData\Roaming\npm-cache_logs\2019-03-02T16_01_24_011Z-debug.log

in log :

0 info it worked if it ends with ok
1 verbose cli [ 'C:\Program Files\nodejs\node.exe',
1 verbose cli 'C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'seishun/node-steam' ]
2 info using npm@6.4.1
3 info using node@v10.15.1
4 verbose npm-session c4770d1ff0dacf3d
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 verbose prepareGitDep undefined: installing devDeps and running prepare script.
8 error prepareGitDep 2> npm WARN install Usage of the --dev option is deprecated. Use --only=dev instead.
8 error prepareGitDep npm ERR! prepareGitDep 1>
8 error prepareGitDep npm ERR! prepareGitDep > steam-resources@1.2.0 prepare C:\Users\dash\AppData\Roaming\npm-cache_cacache\tmp\git-clone-4ebd93e5
8 error prepareGitDep npm ERR! prepareGitDep > svn checkout https://github.com/SteamDatabase/Protobufs/trunk protobufs && svn checkout https://github.com/SteamRE/SteamKit/trunk/Resources/Protogen protogen && svn checkout https://github.com/SteamRE/SteamKit/trunk/Resources/SteamLanguage steam_language
8 error prepareGitDep npm ERR! prepareGitDep
8 error prepareGitDep npm ERR! prepareGitDep
8 error prepareGitDep npm ERR! prepareGitDep 2> npm WARN install Usage of the --dev option is deprecated. Use --only=dev instead.
8 error prepareGitDep npm ERR! prepareGitDep 'svn' is not recognized as an internal or external command,
8 error prepareGitDep npm ERR! prepareGitDep operable program or batch file.
8 error prepareGitDep npm ERR! prepareGitDep npm ERR! code ELIFECYCLE
8 error prepareGitDep npm ERR! prepareGitDep npm ERR! errno 1
8 error prepareGitDep npm ERR! prepareGitDep npm ERR! steam-resources@1.2.0 prepare: svn checkout https://github.com/SteamDatabase/Protobufs/trunk protobufs && svn checkout https://github.com/SteamRE/SteamKit/trunk/Resources/Protogen protogen && svn checkout https://github.com/SteamRE/SteamKit/trunk/Resources/SteamLanguage steam_language
8 error prepareGitDep npm ERR! prepareGitDep npm ERR! Exit status 1
8 error prepareGitDep npm ERR! prepareGitDep npm ERR!
8 error prepareGitDep npm ERR! prepareGitDep npm ERR! Failed at the steam-resources@1.2.0 prepare script.
8 error prepareGitDep npm ERR! prepareGitDep npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
8 error prepareGitDep npm ERR! prepareGitDep
8 error prepareGitDep npm ERR! prepareGitDep npm ERR! A complete log of this run can be found in:
8 error prepareGitDep npm ERR! prepareGitDep npm ERR! C:\Users\dash\AppData\Roaming\npm-cache_logs\2019-03-02T16_01_23_524Z-debug.log
8 error prepareGitDep npm ERR! prepareGitDep
8 error prepareGitDep npm ERR! premature close
8 error prepareGitDep
8 error prepareGitDep npm ERR! A complete log of this run can be found in:
8 error prepareGitDep npm ERR! C:\Users\dash\AppData\Roaming\npm-cache_logs\2019-03-02T16_01_23_705Z-debug.log
9 silly fetchPackageMetaData error for github:seishun/node-steam premature close
10 timing stage:rollbackFailedOptional Completed in 1ms
11 timing stage:runTopLevelLifecycles Completed in 19720ms
12 verbose stack Error: premature close
12 verbose stack at PassThrough.onclose (C:\Program Files\nodejs\node_modules\npm\node_modules\end-of-stream\index.js:47:67)
12 verbose stack at PassThrough.emit (events.js:194:15)
12 verbose stack at emitCloseNT (internal/streams/destroy.js:59:8)
12 verbose stack at process._tickCallback (internal/process/next_tick.js:63:19)
13 verbose cwd C:\Users\dash\Desktop\bot
14 verbose Windows_NT 10.0.17134
15 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "seishun/node-steam"
16 verbose node v10.15.1
17 verbose npm v6.4.1
18 error premature close
19 verbose exit [ 1, true ]

npm ERR! prepareGitDep npm ERR! prepareGitDep 'svn' is not recognized as an internal or external command,

Do you have svn installed? Per the README:

Note: installing from git requires svn to fetch Steam resources (Protobufs and SteamLanguage) and curl to fetch the server list.

ok my bad thanks

work fine now

how you install the svn?