casualsnek / cassowary

Run Windows Applications on Linux as if they are native, Use linux applications to launch files files located in windows vm without needing to install applications on vm. With easy to use configuration GUI
GNU General Public License v2.0
2.87k stars 75 forks source link

Couldn't launch applications (Broken pipe & ERRCONNECT_CONNECT_TRANSPORT_FAILED). #100

Open Animeshz opened 2 years ago

Animeshz commented 2 years ago

Describe the bug Tried to install cassowary in https://github.com/quickemu-project/quickemu based vm.

The GUI connection & application listing seems to work, but shortcuts created never launches... If ran from cli, following error is thrown:

python3 -m cassowary -c guest-run -- 'C:\\Windows\\System32\\mspaint.exe'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-animesh'
[ 2022-08-21 12:32:31,965 ] | [  DEBUG ] :  [      helper ->              vm_wake  ] -->  Attempting to resume VM 
[ 2022-08-21 12:32:31,965 ] | [  DEBUG ] :  [      helper ->              vm_wake  ] -->  VM name is blank, maybe not a vm skipping vm resume process ! 
[ 2022-08-21 12:32:31,966 ] | [  DEBUG ] :  [      helper ->     fix_black_window  ] -->  An app was already opened, the black window should not appear now ! 
[ 2022-08-21 12:32:31,966 ] | [  DEBUG ] :  [    __init__ ->                 main  ] -->  guest-run with commandline: xfreerdp /d:"DESKTOP-FIDBP7U" /u:"Animesh Sahu" /p:"" /v:127.0.0.1 +clipboard /a:drive,root,/ +decorations /cert-ignore /sound /scale:100 /dynamic-resolution /span  /wm-class:"cassowaryApp-mspaint.exe" /app:"C:\Windows\System32\mspaint.exe" /app-icon:"/home/animesh/.local/lib/python3.10/site-packages/cassowary/base/../gui/extrares/cassowary_app.png"  
[12:32:32:732] [17770:17771] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[12:32:32:732] [17770:17771] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[12:32:32:737] [17770:17771] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[12:32:32:737] [17770:17771] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[12:32:32:737] [17770:17771] [ERROR][com.freerdp.core] - freerdp_post_connect failed

To Reproduce Steps to reproduce the behavior:

  1. Install quickemu (just shell script with depends: qemu jq python3 spice-gtk wget zsync xrandr swtpm)
  2. Run quickget windows 10
  3. Add extra options (windows-10.conf on same directory):
    cpu_cores="4"
    port_forwards=("7220:7220")
  4. Setup on windows as explained, change RDP port to 7220 under VM (instructions on settings itself).
  5. Setup on host: VM IP: 127.0.0.1 and Windows Hostname and Username/Password from looking at guest.

Expected behavior The application should obviously launch without the ERRCONNECT_CONNECT_TRANSPORT_FAILED and broken pipe error.

System information:

JustSimplyKyle commented 1 year ago

https://github.com/casualsnek/cassowary/pull/93 In a word, try adding /sec:tls to extra RDP flags

Animeshz commented 1 year ago

@KyleUltimate It didn't work out (almost no change):

  ~ >>> python3 -m cassowary -c guest-run -- 'C:\\Windows\\System32\\mspaint.exe'
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-animesh'
[ 2022-10-12 20:38:44,051 ] | [  DEBUG ] :  [      helper ->              vm_wake  ] -->  Attempting to resume VM 
[ 2022-10-12 20:38:44,052 ] | [  DEBUG ] :  [      helper ->              vm_wake  ] -->  VM name is blank, maybe not a vm skipping vm resume process ! 
[ 2022-10-12 20:38:44,052 ] | [  DEBUG ] :  [      helper ->     fix_black_window  ] -->  Opening & closing a test window to trigger login or try to fix black screen bug on first launch 
[ 2022-10-12 20:38:44,053 ] | [  DEBUG ] :  [      helper ->     fix_black_window  ] -->  Trying to fix black window bug by opening a test window before requested application - 1665587324.0530303CMDLINE: xfreerdp /sec:tls /d:"DESKTOP-FIDBP7U" /u:"Animesh Sahu" /p:"" /v:"127.0.0.1" +clipboard /a:drive,root,/ +decorations /cert-ignore /sound /scale:100 /dynamic-resolution /span  /wm-class:"cassowaryApp-echo" /app:"ipconfig.exe" 
[ 2022-10-12 20:38:44,401 ] | [  DEBUG ] :  [      helper ->     fix_black_window  ] -->  Test window opened and closed ! 
[ 2022-10-12 20:38:44,402 ] | [  DEBUG ] :  [      helper ->     fix_black_window  ] -->  An app was already opened, the black window should not appear now ! 
[ 2022-10-12 20:38:44,402 ] | [  DEBUG ] :  [    __init__ ->                 main  ] -->  guest-run with commandline: xfreerdp /sec:tls /d:"DESKTOP-FIDBP7U" /u:"Animesh Sahu" /p:"" /v:127.0.0.1 +clipboard /a:drive,root,/ +decorations /cert-ignore /sound /scale:100 /dynamic-resolution /span  /wm-class:"cassowaryApp-mspaint.exe" /app:"C:\Windows\System32\mspaint.exe" /app-icon:"/home/animesh/.local/lib/python3.10/site-packages/cassowary/base/../gui/extrares/cassowary_app.png"  
[20:38:44:629] [6688:6689] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[20:38:44:629] [6688:6689] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[20:38:44:632] [6688:6689] [ERROR][com.freerdp.core.transport] - BIO_should_retry returned a system error 32: Broken pipe
[20:38:44:632] [6688:6689] [ERROR][com.freerdp.core] - transport_write:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[20:38:44:632] [6688:6689] [ERROR][com.freerdp.core] - freerdp_post_connect failed
JustSimplyKyle commented 1 year ago

Another thing worth mentioning is that if you merge this PR, you should update the instruction for Windows VM and tell users to disable Allow connections only from computers running Remote Desktop with Network Level Authentication (recommended) in Remote Desktop settings Did you also do this?

Animeshz commented 1 year ago

Had that turned off already :eyes: