pepzwee / node-csgo-web-tradebot

Web based CS:GO trade bot. Similar to CSGOSell.
MIT License
147 stars 59 forks source link

Same trade problem pursue #166

Closed Suchismit4 closed 4 years ago

Suchismit4 commented 4 years ago

'use strict'

module.exports = {
    appID: 252490,
    contextID: 2, 
    bots: {
        bot_1: {
            siteName: 'Bot 1',  
            accountName: '',   
            password: '',      
            twoFactorCode: '=', 
            identitySecret: '//', 
            steamID64: '', 
            personaName: 'RustyRaids #1',  
        },
    },
    steamApiKey: '', 
    SteamApisKey: '',
    domain: 'localhost:3000',
    SteamApisCompactValue: 'safe_ts.last_30d', // Use safe price calculated from 30 days of data, more info: https://steamapis.com/developers (Market Items - Optional Query Parameters "compact_value")
    site: {
        header: 'CSG0.Trade', // Name/header/title of website. Prefix for  <title></title> (For more: /index.html line: 9) 
        steamGroup: '#',
        copyrights: 'Copyright © csg0.trade 2017',  // Copyright text
    },
    website: 'http://localhost:3000',    // Website URL, follow the example (do not add / at the end)
    websitePort: 3000,    // Website PORT, don't change it unless you're using a reverse proxy
    tradeMessage: 'Trade offer from csg0.trade | If you did not request this offer or the offer looks invalid please decline.', // Quite obvious
    rates: {
        ignoreItemsBelow: 0.00, // Ignore items below this price (price * rate < ignoreItemsBelow) - shows (Too Low) for user
        trashPriceBelow: 0.0,   // Items below this price are considered trash, the trash rate modifier will be applied
        // Items
        user: {
            key: 1,
            knife: 0.95,
            rare_skin: 0.95,
            weapon: 0.9,
            misc: 0.85,
            trash: 0.7,
        },
        bot: {
            key: 1.05,
            knife: 1,
            rare_skin: 1,
            weapon: 0.95,
            misc: 0.9,
            trash: 0.8,
        },
    },
}

Capture

iDefineHD commented 4 years ago

From past issues, that is because of no polls, and json file. Did you update to my latest version, should have auto generate it for you. Also, fill in the info on the config, with your steamapis key, steam api key from https://steamcommunity.com/dev/apikey dont forget the secrets and what not, i will no longer be giving support as all problems you have can be fixed by reading past issues and following the guide.

Tdwyd1 commented 4 years ago

@iDefineHD Not sure if this might be related but with your recent update to auto gen the polls folder and bot file I have been getting this error Error: Error: EEXIST: file already exists, mkdir './polls' at fs.mkdir (/root/tradebot/lib/bots.js:65:32) at FSReqWrap.oncomplete (fs.js:135:15) SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at async.eachOfSeries (/root/tradebot/lib/bots.js:47:56) at replenish (/root/tradebot/node_modules/async/dist/async.js:444:21) at /root/tradebot/node_modules/async/dist/async.js:449:13 at eachOfLimit$1 (/root/tradebot/node_modules/async/dist/async.js:475:34) at awaitable(eachOfLimit$1) (/root/tradebot/node_modules/async/dist/async.js:208:32) at Object.eachOfSeries (/root/tradebot/node_modules/async/dist/async.js:662:16) at Object.awaitable(eachOfSeries) (/root/tradebot/node_modules/async/dist/async.js:208:32) at Trade.startBots (/root/tradebot/lib/bots.js:18:11) at new Trade (/root/tradebot/lib/index.js:22:10) I reverted this commit https://github.com/pepzwee/node-csgo-web-tradebot/commit/3275b90067217bfd95ad071ae775fbab3f7d8a08 and then it worked fine

iDefineHD commented 4 years ago

@iDefineHD Not sure if this might be related but with your recent update to auto gen the polls folder and bot file I have been getting this error Error: Error: EEXIST: file already exists, mkdir './polls' at fs.mkdir (/root/tradebot/lib/bots.js:65:32) at FSReqWrap.oncomplete (fs.js:135:15) SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at async.eachOfSeries (/root/tradebot/lib/bots.js:47:56) at replenish (/root/tradebot/node_modules/async/dist/async.js:444:21) at /root/tradebot/node_modules/async/dist/async.js:449:13 at eachOfLimit$1 (/root/tradebot/node_modules/async/dist/async.js:475:34) at awaitable(eachOfLimit$1) (/root/tradebot/node_modules/async/dist/async.js:208:32) at Object.eachOfSeries (/root/tradebot/node_modules/async/dist/async.js:662:16) at Object.awaitable(eachOfSeries) (/root/tradebot/node_modules/async/dist/async.js:208:32) at Trade.startBots (/root/tradebot/lib/bots.js:18:11) at new Trade (/root/tradebot/lib/index.js:22:10) I reverted this commit 3275b90 and then it worked fine

Thanks for the reply, I personally have not come across this when I was testing, as I had removed the folder, auto generated it again, then run the script several times to test. I shall look into it tomorrow and push an update if needed.

iDefineHD commented 4 years ago

@iDefineHD Not sure if this might be related but with your recent update to auto gen the polls folder and bot file I have been getting this error Error: Error: EEXIST: file already exists, mkdir './polls' at fs.mkdir (/root/tradebot/lib/bots.js:65:32) at FSReqWrap.oncomplete (fs.js:135:15) SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at async.eachOfSeries (/root/tradebot/lib/bots.js:47:56) at replenish (/root/tradebot/node_modules/async/dist/async.js:444:21) at /root/tradebot/node_modules/async/dist/async.js:449:13 at eachOfLimit$1 (/root/tradebot/node_modules/async/dist/async.js:475:34) at awaitable(eachOfLimit$1) (/root/tradebot/node_modules/async/dist/async.js:208:32) at Object.eachOfSeries (/root/tradebot/node_modules/async/dist/async.js:662:16) at Object.awaitable(eachOfSeries) (/root/tradebot/node_modules/async/dist/async.js:208:32) at Trade.startBots (/root/tradebot/lib/bots.js:18:11) at new Trade (/root/tradebot/lib/index.js:22:10) I reverted this commit 3275b90 and then it worked fine

I have just created a fresh clone with the code I have pushed, and am unable to recreate the problem. Even with that error, you can just delete the folder of which will be recreated for you. Will add some checks and push tomorrow. I'm using Node v12.10.0.

Tdwyd1 commented 4 years ago

I will try to recreate the issue to see what I did. Will get back to you in a bit.

Suchismit4 commented 4 years ago

So @iDefineHD, do you want me to download the latest commit, update node, and run the script again?

iDefineHD commented 4 years ago

How long ago was 2fa added to the bot? Might be an issue.

Suchismit4 commented 4 years ago

How long ago was 2fa added to the bot? Might be an issue.

2fa ( assuming it as the mobile authenticator ) was added 2 months (roughly) ago

Suchismit4 commented 4 years ago

I used npm-install-all ... to auto install all packages btw

iDefineHD commented 4 years ago

Hmm, only way I have been able to observe the same result is on a bot with restricted 2fa/trade ban because of the 2fa. Not much more I can say, A (npm i) would be ok, no clue what npm-install-all is.

Suchismit4 commented 4 years ago

Hmm, only way I have been able to observe the same result is on a bot with restricted 2fa/trade ban because of the 2fa. Not much more I can say, A (npm i) would be ok, no clue what npm-install-all is.

The account(user) from which the trade is being sent has not 2fa enabled, but the account (bot) has no trade ban or 2fa problem. its a perfectly healthy account

iDefineHD commented 4 years ago

I really dont know, All tests I have done, the bot sends trades fine. The only time it failed was on a restricted account, have you paid for steamapis? etc...

pepzwee commented 4 years ago

The account(user) from which the trade is being sent has not 2fa enabled,

If one of the accounts doesn't have 2FA enabled then it would go to Escrow. Escrow trades will error: https://github.com/pepzwee/node-csgo-web-tradebot/blob/3b63bb9441a941929740b8e52b5d467f5fa4ac52/index.js#L166-L171

Suchismit4 commented 4 years ago

If one of the accounts doesn't have 2FA enabled then it would go to Escrow. Escrow trades will error:

But it shows this error

{}

a empty object

Suchismit4 commented 4 years ago

I really dont know, All tests I have done, the bot sends trades fine. The only time it failed was on a restricted account, have you paid for steamapis? etc...

Yes paid for everything

Suchismit4 commented 4 years ago

Update please.

iDefineHD commented 4 years ago

Update please.

An update on what? From all the testing i had done. The only was I could recreate was when the bot was restricted, As that was the only thing I can recommend, I will close the issue for now. My discord is ✅ Ashley アシュリー#1796