mRemoteNG
mRemoteNG copied to clipboard
Cannot connect to TightVNC Server When Unauthenticated
| Operating system | Windows 8 x64 |
| mRemoteNG version | Stable 1.74 Final |
Connot connect to TightVNC using VNC protocol when Vnc Server is running in unauthenticated mode, i.e. no password is supplied to MRemoteNG.
Although reported as fixed in https://mremoteng.atlassian.net/browse/MR-198 the issue persists when not supplying password, if used in authenticated mode the connection works as expected.
when connecting for the first time (no pwd supplied) following error is reported:
ErrorMsg 11/28/2016 4:10:44 PM Opening connection failed! Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
Opening connection failed! Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.
However once text is inserted to pwd, a connection atemopt is excuted and then pwd is rolled back, error returns to original reported issue:
ErrorMsg 11/28/2016 4:13:29 PM Opening connection failed! Parameter is not valid.
Thanks for the report, we will need to dig into this
Much appreciated
i know its not a common use case,
However when working internally with many different users in a secure lab environments,
our team prefers not to use pwd and thus we encountered the problem
Cheers
On Thu, Dec 1, 2016 at 11:33 AM, David Sparer [email protected] wrote:
Thanks for the report, we will need to dig into this
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mRemoteNG/mRemoteNG/issues/274#issuecomment-264270640, or mute the thread https://github.com/notifications/unsubscribe-auth/AIgUL0OnXbT2jgGzmWtkniyxrfk-Vysmks5rDyEigaJpZM4K-SDL .
From user @vargasjj via #396
Whenever I tried to VNC to a TightVNC server that does not have a password set, I get:
ErrorMsg Opening connection failed! Parameter is not valid.
This defect is being around on mRemoteNG for a while and I cannot find a resolution. I can reproduce it.
Here are the logs:
2017-02-09 09:34:06,649 [1] ERROR- frmMain WndProc failed at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at VncSharp.VncClient.OnConnectionLost() at VncSharp.VncClient.WriteClientCutText(String text) at VncSharp.RemoteDesktop.FillServerClipboard() at mRemoteNG.Connection.Protocol.VNC.ProtocolVNC.VNCEvent_ClipboardChanged() at mRemoteNG.UI.Forms.frmMain.WndProc(Message& m) 2017-02-09 09:34:20,399 [1] ERROR- Opening connection failed! Parameter is not valid. 2017-02-09 09:34:20,419 [258] INFO - Connection Event Closed 2017-02-09 09:34:20,420 [258] INFO - Connection to x.x.x.x via VNC closed by user ******. 2017-02-09 09:34:20,571 [258] ERROR- Couldn't dispose control, probably form is already closed (Connection.Protocol.Base) at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at System.Windows.Forms.Control.Invoke(Delegate method) at mRemoteNG.Connection.Protocol.ProtocolBase.DisposeControl() at mRemoteNG.Connection.Protocol.ProtocolBase.CloseBG() 2017-02-09 09:34:20,574 [258] ERROR- Couldn't set InterfaceControl.Parent.Tag or Dispose Interface, probably form is already closed (Connection.Protocol.Base) at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at System.Windows.Forms.Control.Invoke(Delegate method) at mRemoteNG.Connection.Protocol.ProtocolBase.DisposeInterface() at mRemoteNG.Connection.Protocol.ProtocolBase.CloseBG() 2017-02-09 09:38:39,990 [1] ERROR- frmMain WndProc failed at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at VncSharp.VncClient.OnConnectionLost() at VncSharp.VncClient.WriteClientCutText(String text) at VncSharp.RemoteDesktop.FillServerClipboard() at mRemoteNG.Connection.Protocol.VNC.ProtocolVNC.VNCEvent_ClipboardChanged() at mRemoteNG.UI.Forms.frmMain.clipboardchangeEventHandler.Invoke() at mRemoteNG.UI.Forms.frmMain.WndProc(Message& m) 2017-02-09 09:38:39,992 [1] ERROR- frmMain WndProc failed at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at VncSharp.VncClient.OnConnectionLost() at VncSharp.VncClient.WriteClientCutText(String text) at VncSharp.RemoteDesktop.FillServerClipboard() at mRemoteNG.Connection.Protocol.VNC.ProtocolVNC.VNCEvent_ClipboardChanged() at mRemoteNG.UI.Forms.frmMain.clipboardchangeEventHandler.Invoke() at mRemoteNG.UI.Forms.frmMain.WndProc(Message& m) 2017-02-09 09:39:00,541 [1] ERROR- frmMain WndProc failed at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at VncSharp.VncClient.OnConnectionLost() at VncSharp.VncClient.WriteClientCutText(String text) at VncSharp.RemoteDesktop.FillServerClipboard() at mRemoteNG.Connection.Protocol.VNC.ProtocolVNC.VNCEvent_ClipboardChanged() at mRemoteNG.UI.Forms.frmMain.clipboardchangeEventHandler.Invoke() at mRemoteNG.UI.Forms.frmMain.WndProc(Message& m) 2017-02-09 09:49:02,050 [1] ERROR- frmMain WndProc failed at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at VncSharp.VncClient.OnConnectionLost() at VncSharp.VncClient.WriteClientCutText(String text) at VncSharp.RemoteDesktop.FillServerClipboard() at mRemoteNG.Connection.Protocol.VNC.ProtocolVNC.VNCEvent_ClipboardChanged() at mRemoteNG.UI.Forms.frmMain.clipboardchangeEventHandler.Invoke() at mRemoteNG.UI.Forms.frmMain.WndProc(Message& m) 2017-02-09 09:49:02,444 [1] ERROR- frmMain WndProc failed at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at VncSharp.VncClient.OnConnectionLost() at VncSharp.VncClient.WriteClientCutText(String text) at VncSharp.RemoteDesktop.FillServerClipboard() at mRemoteNG.Connection.Protocol.VNC.ProtocolVNC.VNCEvent_ClipboardChanged() at mRemoteNG.UI.Forms.frmMain.clipboardchangeEventHandler.Invoke() at mRemoteNG.UI.Forms.frmMain.WndProc(Message& m) 2017-02-09 09:50:45,428 [1] ERROR- frmMain WndProc failed at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous) at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args) at VncSharp.VncClient.OnConnectionLost() at VncSharp.VncClient.WriteClientCutText(String text) at VncSharp.RemoteDesktop.FillServerClipboard() at mRemoteNG.Connection.Protocol.VNC.ProtocolVNC.VNCEvent_ClipboardChanged() at mRemoteNG.UI.Forms.frmMain.clipboardchangeEventHandler.Invoke() at mRemoteNG.UI.Forms.frmMain.WndProc(Message& m)
Since you guys took the project now to Github I was wondering if you have any fix soon, or a workaround.
I searched here on github and on your reddit page. I think the referred links are related but I am not sure.
Hi, guys.
Just checking, if you'd tackle this issue on this quarter, or in the near future?
Thank you.
- JJ
Trying to rez this... I run into this problem when trying to connect to my KVM virtual machines that I run in unRAID. I don't usually bother with VNC password especially on initial install/config.
When I try to connect I get "invalid parameter" error as others here and on previous support forums were getting.
I also have issues with this. Specifically with our Timeclocks that allow for a vnc connection, I cannot set a password on them. Can connect no problem with vncviewer. I have no issues connecting to other devices that have a password on them
We met the same problem with some older VM's (qemu) which are unable to set a password for console view.
@tylla
We met the same problem with some older VM's (qemu) which are unable to set a password for console view. --
@deusxanime
Trying to rez this... I run into this problem when trying to connect to my KVM virtual machines that I run in unRAID. I don't usually bother with VNC password especially on initial install/config. When I try to connect I get "invalid parameter" error as others here and on previous support forums were getting.
Exactly. That is what I am trying to achieve for the last 3y because I use KVM (actually is Unetlab) and the embedded VMs (QEMU machines, Win7, Tinycore) uses this TightVNC Server that has no authentication by default.
Hey @sparerd I know you guys are probably busy on some other priority bugs. But was wondering if you have any plans for this.
Thanks. I love mRemoteNG. You guys are the best. Cheers
~ JJ
Issue of getting error "Parameter is not valid." when connecting using VNC without password authentication still present in mRemoteNG 1.75.7012.16814. Just so you know.
Hello everyone
Issue of getting "Parameter is not valid" still present on mRemoteNG 1.76.10.42480 Portable.
ErrorMsg 10/17/2018 08:56:15 Opening connection failed! Parameter is not valid.
Here are some more logs
2018-10-17 09:15:18,838 [1] ERROR - Opening connection failed!
Parameter is not valid.
2018-10-17 09:15:18,859 [11] INFO - Connection Event Closed
2018-10-17 09:15:18,859 [11] INFO - Connection to <ipaddr-removed> via VNC closed by user <username-removed>.
2018-10-17 09:15:18,878 [11] ERROR - Couldn't dispose control, probably form is already closed (Connection.Protocol.Base)
Object reference not set to an instance of an object.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at System.Windows.Forms.Control.Invoke(Delegate method)
at mRemoteNG.Connection.Protocol.ProtocolBase.DisposeControl()
at mRemoteNG.Connection.Protocol.ProtocolBase.CloseBG()
2018-10-17 09:15:18,881 [11] ERROR - Couldn't set InterfaceControl.Parent.Tag or Dispose Interface, probably form is already closed (Connection.Protocol.Base)
Object reference not set to an instance of an object.
at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
at System.Windows.Forms.Control.Invoke(Delegate method)
at mRemoteNG.Connection.Protocol.ProtocolBase.DisposeInterface()
at mRemoteNG.Connection.Protocol.ProtocolBase.CloseBG()
@sparerd @kmscode would you have any idea if there's any road map for this issue? or perhaps can you help us trying to raise some visibility on this issue if possible? I love mRemoteNG and I know it is not a commercial project so no push. It's just that it's being around for 6 years so far because it has never been addressed as mentioned by the OP @TheCuriousGuy (https://mremoteng.atlassian.net/browse/MR-198)
Thank you very much for everything.
Good luck. Cheers ~ JJ
Have same problem when connecting to VNC without password. mRemoteNG version: 1.76.11.40527
Same issue as everyone else, I have worked around the issue by making an "External tool" which points to TightVNC with the arguments to connect to the host, it works fine


still an issue in 2019. is there any plan to fix this?
I think we have this solved on the most recent build of vncsharp (which mRemoteNG uses). I am going to schedule this for the next release (v1.77) for testing.
I updated to the current dev-branch (1.77.0.41252) but it seems still there. When attempting to open the vnc-connection there is always the error message: "Opening connection failed! Parameter is not valid."
Log file states this:
2019-05-31 09:24:19,192 [1] INFO - mRemoteNG 1.77.0.41252 starting. 2019-05-31 09:24:19,203 [1] INFO - Command Line: C:\Program Files (x86)\mRemoteNG\mRemoteNG.exe 2019-05-31 09:24:19,478 [1] INFO - Microsoft Windows 10 Pro 64-bit 2019-05-31 09:24:19,478 [1] INFO - Microsoft .NET CLR 4.0.30319.42000 2019-05-31 09:24:19,479 [1] INFO - System Culture: de-DE/Deutsch (Deutschland) 2019-05-31 09:24:19,479 [1] INFO - Checking FIPS Policy... 2019-05-31 09:24:19,480 [1] INFO - Checking Lenovo AutoScroll Utility... 2019-05-31 09:24:19,521 [1] INFO - Override Culture: en/English 2019-05-31 09:24:19,616 [1] INFO - Loading External Apps from: C:\Users\Manuel\AppData\Roaming\mRemoteNG\extApps.xml 2019-05-31 09:24:19,618 [1] INFO - Adding External App: WinSCP C:\Program Files (x86)\WinSCP\WinSCP.exe scp://%Username%:%Password%@%Hostname%/ 2019-05-31 09:24:20,923 [1] WARN - PuttySessions.Watcher.StartWatching() failed. Nicht gefunden 2019-05-31 09:24:20,923 [1] WARN - XmingPortablePuttySessions.Watcher.StartWatching() failed: 'sessions' does not exist. 2019-05-31 09:24:23,284 [1] ERROR - Opening connection failed! Parameter is not valid. 2019-05-31 09:24:23,306 [1] ERROR - Protocol Event Disconnected failed. {0} Unable to cast object of type 'VncSharp.RemoteDesktop' to type 'mRemoteNG.Connection.Protocol.ProtocolBase'. at mRemoteNG.Connection.ConnectionInitiator.Prot_Event_Disconnected(Object sender, String disconnectedMessage, Nullable'1 reasonCode) in C:\jenkins\workspace\Publish\Build mRemoteNG for Release\mRemoteV1\Connection\ConnectionInitiator.cs:line 252 2019-05-31 09:24:23,307 [10] INFO - Connection Event Closed 2019-05-31 09:24:23,308 [10] INFO - Connection to 192.168.1.152 via VNC closed by user Manuel. 2019-05-31 09:24:23,314 [9] INFO - Connection Event Closed 2019-05-31 09:24:23,314 [9] INFO - Connection to 192.168.1.152 via VNC closed by user Manuel. 2019-05-31 09:24:25,177 [1] ERROR - Opening connection failed! Parameter is not valid. 2019-05-31 09:24:25,183 [1] ERROR - Protocol Event Disconnected failed. {0} Unable to cast object of type 'VncSharp.RemoteDesktop' to type 'mRemoteNG.Connection.Protocol.ProtocolBase'. at mRemoteNG.Connection.ConnectionInitiator.Prot_Event_Disconnected(Object sender, String disconnectedMessage, Nullable'1 reasonCode) in C:\jenkins\workspace\Publish\Build mRemoteNG for Release\mRemoteV1\Connection\ConnectionInitiator.cs:line 252 2019-05-31 09:24:25,184 [15] INFO - Connection Event Closed 2019-05-31 09:24:25,185 [15] INFO - Connection to 192.168.1.152 via VNC closed by user Manuel. 2019-05-31 09:24:25,189 [14] INFO - Connection Event Closed 2019-05-31 09:24:25,190 [14] INFO - Connection to 192.168.1.152 via VNC closed by user Manuel.
This is becoming more and more needed with the changes in Xorg where the VNC sessions and displays are different between the login screen and the actual UI. For my Ubuntu login screen, the VNC port is 5920 without a password. When I'm actually logged in, my desktop VNC port is 5900 with a password. It would be great if mRemoteNG could support this for ease of use.
bump
I'm also experiencing this issue when attempting to connect to a vnc server running on VMs in my Proxmox cluster. It works fine for other software, however, crashes on mRemoteNG and it seems to cause it to crash on the VMs as well, as I'm no longer able to VNC to those VMs after an attempt with mRemoteNG until the node is rebooted.
This is is still an issue. Maybe not just TightVNC. Seems like it is trying to send an empty password parameter when I believe I have it set to not do that. Is this not easy to fix? My use case, as with others, is on an internal test environment. Looking to easily VNC with Selenium Docker grid nodes without a password. Not sure what they are using for a server.
Just to let you all know.
I build the software solution myself and I found that this issue doesn't occur in a Debug mode build. In my situation it only occurs when running a Release mode build. I did some research as to what happens, but so far I did not find something conclusive.
What I found so far is that at some point during the initialization phase it receives the frame resolution from the VNC server (VncSharp.RfbProtocol.ReadServerInit()). In a Debug mode build it reads the correct values for width and height from the stream, but in a Release mode build it simply reads 0 twice. Subsequentially it fails to create a image buffer with a resolution of width:0 and height:0, which results in an exception thrown "Parameter is not valid.". However if I disable "Optimize code" for the Release mode build, then the issue disappears. Of course, one of the goals for a Release mode build is to have the code optimized ...
99% of all my VNC connections are without password (to localhost which is a ssh tunnel to qemu instances) This being an issue open for so many years means that devs don't have much time to spend on the project, or is it something else going on?
This being an issue open for so many years means that devs don't have much time to spend on the project, or is it something else going on?
if that so easy to solve could you raise a PR will be happy to merge, overwise lets wait till somebody else will find a solution for such...
Same issue, does anyone know of any workaround?
11:25
28/05/2022
11:2528/05/2022
??? What does that mean?
Still an issue. 1.76.20.24615 Windows
I ran into this bug a few years ago that stopped me using it (passwordless vnc is 70-80% of my usecase). I might give @TopBanana123 https://github.com/mRemoteNG/mRemoteNG/issues/274#issuecomment-462164438 workaround a go, even if it is an unwelcome faff 😀
I am encountering this issue on version 1.76.20.24615 (Windows). It works after setting a password, but I would prefer to not have to do this.
11:2528/05/2022
??? What does that mean?
I have no idea, I posted that like a year ago and now I'm confused too.
TL;DR; It works in the latest nightly, however, there is another bug in VncSharpCore that makes it impossible to establish any VNC connection - created PR for that in VncSharpCore repo.
Longer story: I wanted to fix it, so I:
- downloaded mRemoteNG repo, switched branch to v1.77.3-dev
- downloaded VncSharpCore repo,
- in mRemoteNG solution removed reference to VncSharpCore nuget and replaced it with VncSharpCore project
- compiled in debug first, tested (there was an issue with one resource file missing in VncSharpCore, fixed in PR) - works
- compiled in release, tested - works as well
@jan-oratowski Thanks a lot for such, let me update dev branch with such.