VNCstart does not return on failure

Bug #1885858 reported by Arun Prasath M on 2020-07-01
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Python version 3.7.4 64 bit
Sikuli 2.0.4
Windows server 2016 DC 64 bit & windows 10 64bit

1. installed python version 3.7.4 with sikuli 2.0.4 (windows server 2016 DC 64 bit & windows 10 64bit)
2. using Git clone cloned the source to local machine
3. created the reboot script in python
4. Accessing device using VNC viewer 6.19.107 using sikuli and python
5. performing reboot operation in loop
6. used below code to connect the VNC
def connect(unit):
    if unit['connection'] == 'vnc':
        vnc = vncStart(ip=unit['ip'], port=5900, password=unit['passwd'], connectionTimeout=10, timeout=120000)
        if not vnc:
          print "Unable to connect to %s using password %s over VNC" % (unit['ip'], unit['passwd'])
        return vnc
    elif unit['connection'] == 'vlc':
        apps.append(openApp('cvlc -f v4l2:///dev/video2'))
        return Screen(0)
    elif unit['connection'] == 'pi':
    return SCREEN

issue faced:
Running the script using command prompt. Able to connect the VNC and reboot the device upto 39th iteration without any issue, in 40th iteration its trying to connect the VNC but not connecting, there is no error messages, its strucking to connect the VNC. Verified this multiple times. Also verified this in sikuli 2.0.2 facing the same issue.

Arun Prasath M (arunprasathm) wrote :
Glenn Tanner (glenntanner3) wrote :

Hi Raiman,
    I hope this helps, this is the basic flow. The vncStart never comes out if the unit exists but connect fails. Now I have seen the same type of behavior in KRDC (linux RDP/VNC client)

for n in rang(200):
    wait("reboot.png", 6).click()
    # function in our code, hence 2 sleeps
    sleep(70) # reboot with 20 sec grace; sometimes reboot takes longer
    vncStart(ip=unit['ip'], port=5900, password=unit['passwd'], connectionTimeout=10, timeout=120000)

summary: - Unable to connect VNC from sikuli after 39th iterations
+ VNC connect does not return on failure
summary: - VNC connect does not return on failure
+ VNCstart does not return on failure
RaiMan (raimund-hocke) on 2020-07-10
Changed in sikuli:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 2.0.5
Glenn Tanner (glenntanner3) wrote :

Hi RaiMan,

I think I found the bug. line 88

I am not hosting VNC, so no vnc server at default IP

vncStart(remote values)
line 79 start
scr = canConnect() # null
if (null != scr) {
} else {
  scr = new VNCScreen(); # try again with default values
# start(remote)-> canConnect(null)-> else-> new VNCScreen-> start(> start(, 5900, null, 3, 0)-> canConnect(null)-> new VNCScreen

Glenn Tanner (glenntanner3) wrote :

Additionally it does not appear 'timeout' is used/set to detect loss of connection

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers