Re: Blank screen in custom Guacamole application

2023-05-24 Thread Matei Albu
>
> Is there anything between your browser and the web application that
> might be buffering HTTP requests/responses? The behavior described
> sounds like what would happen if a proxy or firewall between the browser
> and the webapp is buffering the stream from the webapp, preventing the
> client from ever receiving that data until the connection finally closes
> and the buffer is flushed.
>

Thanks for the tip. Indeed there seems to be a problem with my local
setup. I have guacamole running in docker containers inside WSL while
the custom app was running in the Windows host.

I ended up deploying the custom app in the same Tomcat as the
Guacamole app. It still didn't work with the browser running in
Windows. Then I installed Chromium in WSL and with that it finally
worked.

-
To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org
For additional commands, e-mail: user-h...@guacamole.apache.org



Re: Blank screen in custom Guacamole application

2023-05-23 Thread Michael Jumper

On 5/23/23 14:50, Matei Albu wrote:

...
When I use the main Guacamole web UI the connection to the same
machine works just fine. Guacamole runs in docker.

There's one strange thing happening. While the custom app is connected
and showing the blank screen, I connect from the main web UI. This
causes the custom app to be disconnected (as expected). But then the
canvas of the custom app displays the frozen screen of the target
machine. So it kind of shows something but only after it's
disconnected.



Is there anything between your browser and the web application that 
might be buffering HTTP requests/responses? The behavior described 
sounds like what would happen if a proxy or firewall between the browser 
and the webapp is buffering the stream from the webapp, preventing the 
client from ever receiving that data until the connection finally closes 
and the buffer is flushed.


- Mike

-
To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org
For additional commands, e-mail: user-h...@guacamole.apache.org



Re: Blank screen in custom Guacamole application

2023-05-23 Thread Matei Albu
On Tue, May 23, 2023 at 10:05 PM Michael Jumper  wrote:
>
> What are the differences?
>
> What parameters are you sending to the RDP connection?
>

The only difference is the java code, the rest is the same as in the example.

@Override
protected GuacamoleTunnel doConnect(HttpServletRequest
httpServletRequest) throws GuacamoleException {
  // Create our configuration
  GuacamoleConfiguration config = new GuacamoleConfiguration();
  config.setProtocol("rdp");
  config.setParameter("hostname", "172.19.185.58");
  config.setParameter("port", "3389");
  config.setParameter("username", "User");
  config.setParameter("password", "user");
  config.setParameter("ignore-cert", "true");
  // Connect to guacd - everything is hard-coded here.
  GuacamoleSocket socket = new ConfiguredGuacamoleSocket(
  new InetGuacamoleSocket("localhost", 4822),
  config
  );

  // Return a new tunnel which uses the connected socket
  return new SimpleGuacamoleTunnel(socket);
}

> What kind of RDP server are you connecting to?
>

To a Windows 11 VM.

> What do you see in the guacd logs and browser dev tools? In the
> screenshot provided, it looks like there is an error present.

It's a bogus error, failing to load favicon.ico.

>

guacd logs:

guacd_compose | guacd[7]: INFO: Creating new client for protocol "rdp"
guacd_compose | guacd[7]: INFO: Connection ID is
"$fa4e7fb8-64cf-497b-8a0b-023067d02d3f"
guacd_compose | guacd[434]: INFO:   No security mode
specified. Defaulting to security mode negotiation with server.
guacd_compose | guacd[434]: INFO:   Resize method: none
guacd_compose | guacd[434]: INFO:   No clipboard
line-ending normalization specified. Defaulting to preserving the
format of all line endings.
guacd_compose | guacd[434]: INFO:   User
"@c1ebcafe-fb8f-4596-bfc6-979e3ab14d64" joined connection
"$fa4e7fb8-64cf-497b-8a0b-023067d02d3f" (1 users now present)
guacd_compose | guacd[434]: INFO:   Loading keymap "base"
guacd_compose | guacd[434]: INFO:   Loading keymap "en-us-qwerty"
guacd_compose | guacd[434]: INFO:   Connected to RDPDR
1.13 as client 0x0003
guacd_compose | guacd[434]: INFO:   Connected to RDPDR
1.13 as client 0x0002
guacd_compose | guacd[434]: INFO:   RDPDR user logged on

When I use the main Guacamole web UI the connection to the same
machine works just fine. Guacamole runs in docker.

There's one strange thing happening. While the custom app is connected
and showing the blank screen, I connect from the main web UI. This
causes the custom app to be disconnected (as expected). But then the
canvas of the custom app displays the frozen screen of the target
machine. So it kind of shows something but only after it's
disconnected.

-
To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org
For additional commands, e-mail: user-h...@guacamole.apache.org



Re: Blank screen in custom Guacamole application

2023-05-23 Thread Michael Jumper

On 5/23/23 04:33, Matei Albu wrote:

Hi,

I followed the manual
(https://guacamole.apache.org/doc/gug/writing-you-own-guacamole-app.html)
to create a small Guacamole application.
The code is almost a copy of the example in Git
https://github.com/apache/guacamole-client/tree/master/doc/guacamole-example.


What are the differences?

What parameters are you sending to the RDP connection?

What kind of RDP server are you connecting to?


When I access the page in the browser it connects successfully to an
RDP machine. There is no error in the browser console. > The network view in the browser dev tools looks fine. Same for the 

guacd> logs.
What do you see in the guacd logs and browser dev tools? In the 
screenshot provided, it looks like there is an error present.



However the screen remains blank. The  element has size 0x0px
(see the attached images.


A size of 0x0 indicates that no display size has been received from 
guacd, or that the remote display has somehow been requested to be 0x0.



I tried changing the z-index of the  but no luck.


You do not need to change the z-index of anything.

- Mike

-
To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org
For additional commands, e-mail: user-h...@guacamole.apache.org



Blank screen in custom Guacamole application

2023-05-23 Thread Matei Albu
Hi,

I followed the manual
(https://guacamole.apache.org/doc/gug/writing-you-own-guacamole-app.html)
to create a small Guacamole application.
The code is almost a copy of the example in Git
https://github.com/apache/guacamole-client/tree/master/doc/guacamole-example.

When I access the page in the browser it connects successfully to an
RDP machine. There is no error in the browser console. The network
view in the browser dev tools looks fine. Same for the guacd logs.

However the screen remains blank. The  element has size 0x0px
(see the attached images.

I tried changing the z-index of the  but no luck.

To me this looks like a JavaScript problem. Does anybody have any ideas?

Thank you.

-
To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org
For additional commands, e-mail: user-h...@guacamole.apache.org