wine-mono icon indicating copy to clipboard operation
wine-mono copied to clipboard

Exception at System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel SingeInstanceIPCChannel is not securable while ensureSecurity is specified as true

Open mifwarior opened this issue 5 years ago • 16 comments

yura@YuraPC:~/Games/Hellgate$ WINE_MONO_TRACE=E:Type wine Launcher.exe 
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
[00000024:] EXCEPTION handling: System.Runtime.Remoting.RemotingException: Channel London2038_Launcher_Mutexyura:SingeInstanceIPCChannel is not securable while ensureSecurity is specified as true

Unhandled Exception:
System.Runtime.Remoting.RemotingException: Channel London2038_Launcher_Mutexyura:SingeInstanceIPCChannel is not securable while ensureSecurity is specified as true
  at System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel (System.Runtime.Remoting.Channels.IChannel chnl, System.Boolean ensureSecurity) [0x0002a] in <7713cb95b33244ed9608bf0b23fbdce9>:0 
  at Microsoft.Shell.SingleInstance`1[TApplication].CreateRemoteService (System.String channelName) [0x00045] in <37cd14dfd05448cc84f66836eea43ecd>:0 
  at Microsoft.Shell.SingleInstance`1[TApplication].InitializeAsFirstInstance (System.String uniqueName) [0x00039] in <37cd14dfd05448cc84f66836eea43ecd>:0 
  at Launcher.App.Main () [0x00000] in <37cd14dfd05448cc84f66836eea43ecd>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.Runtime.Remoting.RemotingException: Channel London2038_Launcher_Mutexyura:SingeInstanceIPCChannel is not securable while ensureSecurity is specified as true
  at System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel (System.Runtime.Remoting.Channels.IChannel chnl, System.Boolean ensureSecurity) [0x0002a] in <7713cb95b33244ed9608bf0b23fbdce9>:0 
  at Microsoft.Shell.SingleInstance`1[TApplication].CreateRemoteService (System.String channelName) [0x00045] in <37cd14dfd05448cc84f66836eea43ecd>:0 
  at Microsoft.Shell.SingleInstance`1[TApplication].InitializeAsFirstInstance (System.String uniqueName) [0x00039] in <37cd14dfd05448cc84f66836eea43ecd>:0 
  at Launcher.App.Main () [0x00000] in <37cd14dfd05448cc84f66836eea43ecd>:0 

is there any solution? wine-5.13 whine-mono 5.1.0

mifwarior avatar Jul 31 '20 13:07 mifwarior

Can you get a log with WINE_MONO_TRACE=M:System.Runtime.Remoting.Channels.ChannelServices:RegisterChannel?

madewokherd avatar Jul 31 '20 14:07 madewokherd

yura@YuraPC:~/Games/Hellgate$ WINE_MONO_TRACE=M:System.Runtime.Remoting.Channels.ChannelServices:RegisterChannel wine Launcher.exe 
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
[00000024: 0.00000 0] ENTER:c System.Runtime.Remoting.Channels.ChannelServices:RegisterChannel (System.Runtime.Remoting.Channels.IChannel,bool)([System.Runtime.Remoting.Channels.Ipc.IpcServerChannel:02000F00], 1)
[00000024:] EXCEPTION handling: System.Runtime.Remoting.RemotingException: Channel London2038_Launcher_Mutexyura:SingeInstanceIPCChannel is not securable while ensureSecurity is specified as true

Unhandled Exception:
System.Runtime.Remoting.RemotingException: Channel London2038_Launcher_Mutexyura:SingeInstanceIPCChannel is not securable while ensureSecurity is specified as true
  at System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel (System.Runtime.Remoting.Channels.IChannel chnl, System.Boolean ensureSecurity) [0x0002a] in <7713cb95b33244ed9608bf0b23fbdce9>:0 
  at Microsoft.Shell.SingleInstance`1[TApplication].CreateRemoteService (System.String channelName) [0x00045] in <37cd14dfd05448cc84f66836eea43ecd>:0 
  at Microsoft.Shell.SingleInstance`1[TApplication].InitializeAsFirstInstance (System.String uniqueName) [0x00039] in <37cd14dfd05448cc84f66836eea43ecd>:0 
  at Launcher.App.Main () [0x00000] in <37cd14dfd05448cc84f66836eea43ecd>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.Runtime.Remoting.RemotingException: Channel London2038_Launcher_Mutexyura:SingeInstanceIPCChannel is not securable while ensureSecurity is specified as true
  at System.Runtime.Remoting.Channels.ChannelServices.RegisterChannel (System.Runtime.Remoting.Channels.IChannel chnl, System.Boolean ensureSecurity) [0x0002a] in <7713cb95b33244ed9608bf0b23fbdce9>:0 
  at Microsoft.Shell.SingleInstance`1[TApplication].CreateRemoteService (System.String channelName) [0x00045] in <37cd14dfd05448cc84f66836eea43ecd>:0 
  at Microsoft.Shell.SingleInstance`1[TApplication].InitializeAsFirstInstance (System.String uniqueName) [0x00039] in <37cd14dfd05448cc84f66836eea43ecd>:0 
  at Launcher.App.Main () [0x00000] in <37cd14dfd05448cc84f66836eea43ecd>:0 

sure how can i help you solve this error?

mifwarior avatar Jul 31 '20 14:07 mifwarior

perhaps mono itself does not support such a function? https://forums.xamarin.com/discussion/73218/xamarin-does-not-implement-isecurablechannel-on-tcpchannel

mifwarior avatar Jul 31 '20 15:07 mifwarior

The log shows that this is an IpcServerChannel, not TcpChannel, but it seems to be the same situation.

I'm not sure what ISecurableChannel is supposed to do. MSDN just says "Gets or sets a Boolean value that indicates whether the current channel is secure."

madewokherd avatar Aug 05 '20 03:08 madewokherd

found some information here ChannelServices.RegisterChannel

mifwarior avatar Aug 05 '20 10:08 mifwarior

Do not decompile .NET Framework code.

madewokherd avatar Aug 05 '20 12:08 madewokherd

thanks for the safety.

I suspect the whole thing is the default IChannel secure field for mono and net.framework

mifwarior avatar Aug 05 '20 15:08 mifwarior

This sounds like the same problem, posted way back in 2007: http://www.claassen.net/geek/blog/2007/06/isecurablechannel-in-tcpchannel-not.html

alexhenrie avatar Nov 29 '22 23:11 alexhenrie

The MSDN documentation for RegisterChannel offers this explanation:

If the ensureSecurity parameter is set to true, the remoting system determines whether the channel implements ISecurableChannel, and if so, enables encryption and digital signatures. An exception is thrown if the channel does not implement ISecurableChannel.

I thought about adding a stub ISecurableChannel implementation to Mono's IpcServerChannel implementation and Mono's TcpChannel implementation, which would do no encryption even if the IsSecured property is set to true. However, I don't know how we would ensure that the fake implementation is only used for connections that stay on the local machine. If there's any chance that data sent to the channel could be sent over the internet unencrypted, that could be very bad.

alexhenrie avatar Nov 30 '22 00:11 alexhenrie

Is there a way to disable ensureSecurity?

samuel-sflima avatar Feb 11 '23 15:02 samuel-sflima

Is there a way to disable ensureSecurity?

The application you're running would have to do that. There's no override option in Mono.

alexhenrie avatar Feb 12 '23 20:02 alexhenrie

Noting that the launcher for The Amazing Spider-Man hits this issue. Proton log: steam-212580.log

Blisto91 avatar Jul 16 '24 20:07 Blisto91