System.TimeoutException: Unable to wait for injection completion.

Feb 21, 2013 at 7:57 PM
HI,
the easyhook version is 70785
I get this error:







************** Exception Text **************
System.TimeoutException: Unable to wait for injection completion.
at EasyHook.RemoteHooking.CreateAndInject(String InEXEPath, String InCommandLine, Int32 InProcessCreationFlags, InjectionOptions InOptions, String InLibraryPath_x86, String InLibraryPath_x64, Int32& OutProcessId, Object[] InPassThruArgs)
at EasyHook.RemoteHooking.CreateAndInject(String InEXEPath, String InCommandLine, Int32 InProcessCreationFlags, String InLibraryPath_x86, String InLibraryPath_x64, Int32& OutProcessId, Object[] InPassThruArgs)
at Sandbox.Virtualization.Process.VirtualizedProcess.CreateAndInject1()
at Sandbox.Virtualization.Process.VirtualizedProcess.Start()
at Sandbox.Virtualization.Process.VirtualizedProcess.Start(VirtualProcessStartInfo startInfo)
at Sandbox.OpenFile.button2_Click(Object sender, EventArgs e) in C:\Users\ovivm732\Documents\Visual Studio 2010\Projects\Sandbox\Sandbox\OpenFile.cs:line 151
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll

Sandbox
Assembly Version: 1.0.0.1
Win32 Version: 1.0.0.1

CodeBase: file:///C:/Debug1/Sandbox.exe

System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll

Sandbox.Core
Assembly Version: 1.0.0.1
Win32 Version: 1.0.0.1

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/Sandbox.Core/v4.0_1.0.0.1__edd3625b4cd77e26/Sandbox.Core.dll

System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll

System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll

EasyHook
Assembly Version: 2.7.0.0
Win32 Version: 2.7.0.0

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/EasyHook/v4.0_2.7.0.0__4b580fca19d0b0c5/EasyHook.dll

System.Runtime.Remoting
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll

System.Web
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.17929 built by: FX45RTMREL

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll

System.Data.SqlServerCe
Assembly Version: 3.5.1.0
Win32 Version: 3.5.8080.0

CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data.SqlServerCe/v4.0_3.5.1.0__89845dcd8080cc91/System.Data.SqlServerCe.dll

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Coordinator
Feb 28, 2013 at 9:26 AM
Hi mozylon,

This timeout error is thrown when the injection and bootstrapping of the library EasyHook.dll into the target process does not complete within 20 secs.

From the limited information above I have no idea why it would not be completing in time.

Cheers,
J
Mar 1, 2013 at 2:31 AM
This error I get in the command prompt.

it doesnt seam to have something to do with easyhook, but if you think it does please tell me what I could do to solve it.

Thanks.

Also can you please tell me how I can debug the code from the injected dll ?
I have a simple small debug version app that I test with...






[comment]: SUCCESS: Assembly.Load(Sandbox.Inject, Version=1.0.0.1, Culture=neutr
al, PublicKeyToken=edd3625b4cd77e26)
[warning]: System.Runtime.Serialization.SerializationException: The constructor
to deserialize an object of type 'System.Data.SqlServerCe.SqlCeException' was no
t found. ---> System.Runtime.Serialization.SerializationException: The construct
or to deserialize an object of type 'System.Data.SqlServerCe.SqlCeException' was
not found.
at System.Runtime.Serialization.ObjectManager.GetConstructor(RuntimeType t, R
untimeType[] ctorParams)
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Obj
ect obj, SerializationInfo info, StreamingContext context)
--- End of inner exception stack trace ---

Server stack trace:
at System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Obj
ect obj, SerializationInfo info, StreamingContext context)
at System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder
holder)
at System.Runtime.Serialization.ObjectManager.DoFixups()
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(He
aderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAp
pDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCr
ossAppDomain, IMethodCallMessage methodCallMessage)
at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessa
ge(String objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel
securityLevel)
at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(
IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders reques
tHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& respon
seHeaders, Stream& responseStream)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
at EasyHook.HelperServiceInterface.InjectionException(Int32 InClientPID, Exce
ption e)
at EasyHook.InjectionLoader.LoadUserLibrary(String userLibraryStrongName, Str
ing userLibraryFileName, Object[] paramArray, HelperServiceInterface helperServi
ceInterface)
at EasyHook.InjectionLoader.Main(String inParam)
Apr 21, 2013 at 9:20 PM
Hello,

I've got the same problem.
The exception was thrown after a timeout of 20 seconds.
mozylon
Do you already solve this probem?

spazzarama
Whats the best way to find the issue?
Greetings
Martin
Coordinator
Apr 22, 2013 at 10:06 AM
Martin,

Is this with using CreateAndInject also? I couldn't duplicate mozylon's issue.

Do you have a reproducible example you could post as an issue so I can take a look?

Cheers,
Justin
Apr 27, 2013 at 2:21 PM
Hello Justin,

I didn't find a "CreateAndInject"-Method.

The test-injection I made is uploaded to dropbox:
https://www.dropbox.com/s/jvj3nesw72y94vh/EasyHookTest01.zip

For development, I'm using "Microsoft Visual C# 2010 Express" running as Administrator complied under .NET-Version 3.5.

Thanks for your help.
Martin
Oct 23, 2014 at 2:26 AM
Hi all,

Any news with this error (Unable to wait for injection completion) ? It's the only error i can't solve ... Appends to me when trying to inject FlashPlayer in firefox ..

I don't know if this can help, but EasyLoad32.dll is injected, but only this dll, not easyhook.dll or anything else..