Jessecar96 / SteamBot

Automated bot software for interacting with Steam Trade
http://scrap.tf
MIT License
1.33k stars 911 forks source link

System.IO.IOException: Not connected #169

Closed whatsfast closed 11 years ago

whatsfast commented 11 years ago

I keep getting this error: (I tried updating to the latest mono and still keep getting this erro FYI: I am on a mac and am using a ide to launch the bot.) Also the bot doesn't say it is online. Please help!

TradeBot 2013-02-10 16:46:22] SUCCESS: Done Loading Bot!

Unhandled Exception:
System.IO.IOException: Not connected
  at System.Net.Sockets.NetworkStream..ctor (System.Net.Sockets.Socket socket, FileAccess access, Boolean owns_socket) [0x0003e] in /private/tmp/source/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.3/_build/mono-3.0.3.git/mcs/class/System/System.Net.Sockets/NetworkStream.cs:71 
  at System.Net.Sockets.NetworkStream..ctor (System.Net.Sockets.Socket socket, Boolean owns_socket) [0x00000] in /private/tmp/source/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.3/_build/mono-3.0.3.git/mcs/class/System/System.Net.Sockets/NetworkStream.cs:55 
  at (wrapper remoting-invoke-with-check) System.Net.Sockets.NetworkStream:.ctor (System.Net.Sockets.Socket,bool)
  at SteamKit2.TcpConnection.ConnectCompleted (System.Object sender, System.Net.Sockets.SocketAsyncEventArgs e) [0x00079] in /Users/mac/SteamBot/Lib/SteamKit2/SteamKit2/Networking/Steam3/TcpConnection.cs:77 
  at System.Net.Sockets.SocketAsyncEventArgs.OnCompleted (System.Net.Sockets.SocketAsyncEventArgs e) [0x00014] in /private/tmp/source/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.3/_build/mono-3.0.3.git/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs:195 
  at System.Net.Sockets.SocketAsyncEventArgs.ConnectCallback () [0x0001b] in /private/tmp/source/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.3/_build/mono-3.0.3.git/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs:282 
  at System.Net.Sockets.SocketAsyncEventArgs.DispatcherCB (IAsyncResult ares) [0x000aa] in /private/tmp/source/bockbuild/profiles/mono-mac-release/build-root/mono-3.0.3/_build/mono-3.0.3.git/mcs/class/System/System.Net.Sockets/SocketAsyncEventArgs.cs:254 
waylaidwanderer commented 11 years ago

I'm getting this error too. I'm on Debian 6 running Mono 3.0.3 compiled from source. I have no idea why it's happening.

I also occasionally manage to get past that part, but then it gets stuck on WARN: Authentication failed, retrying in 2s... over and over again until it crashes with Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object

whatsfast commented 11 years ago

Ya but I my bot doesn't even get online.

gamemaster1494 commented 11 years ago

I think the code isn't working for the newest Mono. Not 100% sure about this tho.

waylaidwanderer commented 11 years ago

Well the mono installed using "apt-get" doesn't support .NET 4.0 applications, so I had to compile from the newest version source.

whatsfast commented 11 years ago

What version did you install of mono?

waylaidwanderer commented 11 years ago

Mono 3.0.3. Just a sidenote, it works fine on my Debian 6 64bit installation but not my other Debian 6 32bit installation - this only happens on the 32 bit system. It could be just a coincidence, though.

teliosdev commented 11 years ago

No clue what it is - maybe it's a Mono thing?

waylaidwanderer commented 11 years ago

Also I should add that it still happens on my 64-bit Debian, but only occasionally, whereas compared to the 32-bit Debian it happens all the time.

It could be, yeah...

whatsfast commented 11 years ago

Also if anyone like you redjazz have some free time and can help I could really use some help with a custom bot for my future server. You can contact me with the email at my profile. Thanks in advanced if anyone can help.

whatsfast commented 11 years ago

Ok so I messed around with it but now it works! All you have to do is update the current SteamRe since the one here is a bit outdated(developer you should fix this. And maybe add me to the repository so I can also help in the future :) ). But please if anyone still wants to consider what I said above.

waylaidwanderer commented 11 years ago

How did you update SteamRe?

whatsfast commented 11 years ago

I download steamre and then put all the things in the steamre download into the debug folder with the steambot.exe and etc. It fixed my problem but it does occasionally give me the lost connection. Fixed my problem though.

whatsfast commented 11 years ago

Actually it was steamkit2. Sorry about that.

teliosdev commented 11 years ago

If this is the case, I'll update the SteamKit2 provided by the repository.

waylaidwanderer commented 11 years ago

Alright, thanks for the tip whatsfast. I'll give it a try.

whatsfast commented 11 years ago

It fixed the problem and definitly decreased the chances of getting the TCP error. It might not help everyone but it definitely helped me and anyone else in the future.

Edit: The error is something I will look into and my "guess" has something to do with the bot connecting to steam. Il try my best to fix it and report back to you guys.

waylaidwanderer commented 11 years ago

Well, it seems to be working, but I keep getting the Authentication failed, retrying in 2s... problem. I don't know what causes this either - nothing wrong with the username and password.

whatsfast commented 11 years ago

Do you have the web api, or anything missing in your settings?

waylaidwanderer commented 11 years ago

Nope, it just happened when I moved my bot from my 64-bit Debian VPS to my 32-bit Debian VPS :(

teliosdev commented 11 years ago

Anyone wanna try it with the updated SteamKit2 repository?

waylaidwanderer commented 11 years ago

Fire away, @redjazz96

teliosdev commented 11 years ago

the bot works

waylaidwanderer commented 11 years ago

Good to see it works

teliosdev commented 11 years ago

Is this still a problem?

whatsfast commented 11 years ago

Well im happy that I contributed to something. :p