xLeeJYx Posted August 19, 2017 Report Posted August 19, 2017 Sometimes i will restart my wifi and when i restart it will return this error. Anyidea how to fix ? TypeError: Cannot read property 'type' of null Quote
Dr. McKay Posted August 19, 2017 Report Posted August 19, 2017 Need more detail. Please show the entire output, and your code. Quote
xLeeJYx Posted August 19, 2017 Author Report Posted August 19, 2017 Code : community.on("sessionExpired", function(err) { if(client.steamID == null){ client.relog((err) => { if (err) { console.log(error + err.message) } }); } else { client.webLogOn((err) => { if (err) { console.log(error + err.message) } }) } }); Error : C:\Users\JingYong-PC\Desktop\CSGO-TF2bot\node_modules\steam-user\components\logon.js:254 if (this.steamID.type == SteamID.Type.INDIVIDUAL && (!this._logOnDetails || !this._logOnDetails.should_remember_password || !this._logOnDetails.login_key)) { ^ TypeError: Cannot read property 'type' of null at SteamUser.relog (C:\Users\JingYong-PC\Desktop\CSGO-TF2bot\node_modules\steam-user\components\logon.js:254:18) at SteamCommunity.<anonymous> (C:\Users\JingYong-PC\Desktop\CSGO-TF2bot\start.js:130:10) at emitOne (events.js:96:13) at SteamCommunity.emit (events.js:188:7) at SteamCommunity._notifySessionExpired (C:\Users\JingYong-PC\Desktop\CSGO-TF2bot\node_modules\steamcommunity\components\http.js:85:7) at C:\Users\JingYong-PC\Desktop\CSGO-TF2bot\node_modules\steamcommunity\components\confirmations.js:21:10 at C:\Users\JingYong-PC\Desktop\CSGO-TF2bot\node_modules\steamcommunity\components\confirmations.js:272:4 at SteamCommunity._checkHttpError (C:\Users\JingYong-PC\Desktop\CSGO-TF2bot\node_modules\steamcommunity\components\http.js:90:3) at Request._callback (C:\Users\JingYong-PC\Desktop\CSGO-TF2bot\node_modules\steamcommunity\components\http.js:50:61) at self.callback (C:\Users\JingYong-PC\Desktop\CSGO-TF2bot\node_modules\request\request.js:188:22) Quote
Dr. McKay Posted August 19, 2017 Report Posted August 19, 2017 You can only relog while connected. If you're not connected, you need to login again. Quote
xLeeJYx Posted August 19, 2017 Author Report Posted August 19, 2017 (edited) You can only relog while connected. If you're not connected, you need to login again.So i should login again with client.logOn but not client.relogin Edited August 19, 2017 by xLeeJYx Dr. McKay 1 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.