Giter Club home page Giter Club logo

Comments (14)

hanshsieh avatar hanshsieh commented on May 30, 2024

Hello,
I found that changing the version of qemu from 0.13.0 to 0.12.5 will fix the problem.
Maybe I should report this problem to the qemu team later.
Thanks.

from novnc.

kanaka avatar kanaka commented on May 30, 2024

What you are running into is a bug in an experimental feature that I co-developed with a QEMU summer of code student. It's a new VNC encoding optimized for browser based VNC clients (i.e. noVNC) called tightVNC.

The tightVNC encoding is similar to the tight encoding, but rather than using zlib compressed data which is very slow to decode in JavaScript, it uses PNG compressed data instead.

The bug is that if QEMU is built with tight support but not tightPNG suppot, noVNC will ask for tightVNC, but QEMU will respond with the tight encoding. I will mention it to the developer. Did you build QEMU yourself or are you using a binary version?

You can try this workaround to noVNC to disable tightPNG:

--- a/include/rfb.js
+++ b/include/rfb.js
@@ -44,7 +44,7 @@ var that           = {},         // Public API interface
     // In preference order
     encodings      = [
         ['COPYRECT',         0x01 ],
-        ['TIGHT_PNG',        -260 ],
+        //['TIGHT_PNG',        -260 ],
         ['HEXTILE',          0x05 ],
         ['RRE',              0x02 ],
         ['RAW',              0x00 ],

from novnc.

hanshsieh avatar hanshsieh commented on May 30, 2024

Thank you.
After applying the patch, it works on Ubuntu! (both firefox and chrome)
However, it still doesn't work when using firefox 3.6.13 on Windows XP.
(But works when using chrome)
I got the message "Server disconnected" at client, and
27: got client connection from xxx.xxx.xxx.xxx
27: forking handler process
27: Sending flash policy response
27: No connection after handshake
at server.

Environment:
Windows XP service pack3 x32
firefox 3.6.13

By the way, I built QEMU myself on Ubuntu 10.10 with default configuration.

from novnc.

kanaka avatar kanaka commented on May 30, 2024

If you rebuild QEMU using the --enable-vnc-png (and re-enable it in noVNC), you should be able to use the higher performance tightPNG protocol properly.

On to your second problem:

When using firefox-3.6 the Flash WebSockets emulator is loaded and used (firefox 3.6 has no built-in WebSockets support). This output:

27: Sending flash policy response
27: No connection after handshake

is normal output when using the flash WebSockets emulator (it's responding to a Flash network security policy request). But for some reason the emulator is not making a connection after policy response is received. Can you try shift-reloading the page a couple times and see if it clears up (Flash is temperamental at times).

If that doesn't work, can you try following the troubleshooting info at the bottom of the README (https://github.com/kanaka/noVNC) and post the output you get from the firebug console?

from novnc.

hanshsieh avatar hanshsieh commented on May 30, 2024

Hi, I tried to reload the page several times, and also try to restart the browser, but the problem still exists. (I have also tried to recompile qemu with vnc-png enabled and re-enable the tightPNG in noVNC)

Here is the console output of firebug:

>> RFB.constructor
>> Canvas.init
Browser: gecko 19
Canvas supports imageData
Using Canvas createImageData
Prefering javascript operations
Data URI scheme cursor supported
<< Canvas.init
Using web-socket-js flash bridge
    util.js (line 71)
New state 'loaded', was 'disconnected'. Msg: noVNC ready: WebSockets emulation, createImageData rendering
    util.js (line 71)
<< RFB.constructor
New state 'connect', was 'loaded'.
    util.js (line 71)
>> RFB.init_ws
connecting to ws://xxx.xxx.xxx.xxx:6081/
<< RFB.init_ws
[WebSocket] cannot connect to Web Socket server at ws://xxx.xxx.xxx.xxx:6081/ (SecurityError) make sure the server is running and Flash socket policy file is correctly placed
    [Break On This Error] console.error(decodeURIComponent(message));
    web_socket.js (line 379)
>> WebSocket.onclose
New state 'failed', was 'connect'. Msg: Server disconnected
    [Break On This Error] case 'error': Util.Error = function (msg) { console.error(msg); };
    util.js (line 72)
Clearing connect timer
<< WebSocket.onclose
New state 'failed', was 'failed'.
    util.js (line 71)

Hope this would help. If more information is needed, please just tell me. :)

from novnc.

kanaka avatar kanaka commented on May 30, 2024

Messages prefixed with "[WebSocket]" come from the Flash emulator. The type of error indicates something went wrong with the security policy request (or Flash doesn't like the response). What version of Flash are you running? You can find this out in most browsers by navigating to "about:plugins".

from novnc.

hanshsieh avatar hanshsieh commented on May 30, 2024

Sorry for my late response.
My firefox now use Shockwave Flash 10.1 r102. And I have tried this on both windows XP and 7, and the results are the same.
Thank you.

from novnc.

hanshsieh avatar hanshsieh commented on May 30, 2024

Hi,
today I test this problem again, and amazingly found that it works! It seems that the flash player and firefox doesn't have big update recently since the version numbers are the same.
I don't know why. (Maybe there was some minor updates?)
Anyway, there's no problem now. Thank you.

from novnc.

kanaka avatar kanaka commented on May 30, 2024

This bug still exists in qemu 0.14.1 and in the master git tree. I have filed the following bug against QEMU:

https://bugs.launchpad.net/qemu/+bug/806656

I'm re-opening this bug to track the QEMU bug.

from novnc.

meong-congkok avatar meong-congkok commented on May 30, 2024
  •    ['TIGHT_PNG',        -260 ],
    
  •    //['TIGHT_PNG',        -260 ],
    

It works.

from novnc.

kanaka avatar kanaka commented on May 30, 2024

I submitted a patch to the mailing list (May 16 at 6:00PM CDT): http://lists.nongnu.org/archive/html/qemu-devel/2012-05/msg02373.html

I'll close this once the patch is pulled in upstream.

For future reference here is the process for qemu patch submission:

from novnc.

kanaka avatar kanaka commented on May 30, 2024

#145 was a dupe of this issue.

from novnc.

iksaif avatar iksaif commented on May 30, 2024

Please resend to qemu-trivial (http://wiki.qemu.org/Contribute/TrivialPatches). That may speed-up things. (CC agraf, aligori and me). (I don't have any commit access, else I would have merged your patch).

Thanks

from novnc.

kanaka avatar kanaka commented on May 30, 2024

It just got added to the trivial-patches tree: stefanha/qemu@281f9f3

Marking as closed.

from novnc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.