Problem with FF 3.6 betas

Chris Funk
  • Chris Funk

    Chris Funk - 2010-01-06

    After upgrading from Firefox 3.5 to 3.6b5, I started receiving the following error when trying to use Ajaxterm:

    >setting a property that has only a getter<br/>
    >XMLDocument.prototype.readyState = 0;

    It appears they have changed permissions on some of their object model.

    Any suggestions?  Is there any more info I can provide to assist?


  • Emmanuil Batsis (Manos)

    Hello and thanks for the input,

    My guess is its an FF bug. Could you please provide a testcase online for me to check with the beta or provide more info like the error line number/stacktrace in sarissa (e.g. using firebug)?

    Many thanks,


  • Chris Funk

    Chris Funk - 2010-01-20

    Here's the error.  Sorry for the delay.  I tried posting about a week ago and it seems not to have taken.

    setting a property that has only a getter
    Line 268


  • Chris Funk

    Chris Funk - 2010-01-20

    (here's the code)
    XMLDocument.prototype.readyState = 0;\n

  • Andres Ederra

    Andres Ederra - 2010-01-25


    Firefox 3.6 is out of beta and this issue is affecting at least at ajaxterm project(and Chris seems to be using ajaxterm too)…

    So in case it helps here is the firebux trace:

    setting a property that has only a getter  XMLDocument.prototype.readyState = 0; sarissa.js (line 268)

    Sarissa.clearChildNodes is not a function  Sarissa.clearChildNodes(oTargetElement); sarissa_dhtml.js (line 70)

    It is using sarissa version … 

  • Emmanuil Batsis (Manos)

    Just installed 3.6, is there an online demo i can checkout?

  • Andres Ederra

    Andres Ederra - 2010-01-25

    I don't know about any public ajaxterm demo site…

    But i am sending you connection data and credentials so you can access my ajaxterm server to your sourceforge email.

    It's just my home server, nothing important, but be nice with it :-)

  • Andres Ederra

    Andres Ederra - 2010-01-26

    Ok… so work has been done :-)

    First for the sarissa 0.9.6.. based ajaxterm, it seems that removing the offending line "XMLDocument.prototype.readyState = 0;" solves the issue and i don't' see any sideeffects(at least using only Firefox).

    But as a more reliable solution I've tryed to update sarissa ersion used to the lastest available( This version dones't seem to have issues with firefox 3.6 but it doesnt works as good as it should with ajaxterm.

    So, It seems to me that after updating to white spaces received on the xmls are lost when inserted on the DOM… (I found this doing some crude debugging so i could be wrong as i dont know the inner workings of ajaxterm nor sarissa)

    It all seems related to this sarissa functions:


    If you replace this functions with white spaces start working again… but this looks like a ugly, ugly hack…

    Ok, now, someone with a more solid knowledge of this code has any comment?

  • Andres Ederra

    Andres Ederra - 2010-01-26


    We've narrowed the problem a bit more :-)

    The problem was introduced on sarissa.js fire on cvs commit 1.19 that made this change (that was released since

    --- sarissa.js  2008/02/22 16:17:04 1.18
    +++ sarissa.js  2008/03/03 10:37:12 1.19
    @@ -813,12 +813,12 @@
                 else {
                     // ok that was not smart; it was paranoid. Keep up the good work by trying to use DOM instead of innerHTML
    -                if(oNode.nodeType == Node.DOCUMENT_NODE || oNode.ownerDocument.documentElement == oNode) {
    -                    oTargetElement.innerHTML = new XMLSerializer().serializeToString(oNode);
    -                }
    -                else{
    +                try{
                         oTargetElement.appendChild(oTargetElement.ownerDocument.importNode(oNode, true));
    +                catch(e){
    +                    oTargetElement.innerHTML = new XMLSerializer().serializeToString(oNode);
    +                }

    1.19 version uses the DOM to insert data in this case, but 1.18 uses innerHTML…

    Removing this change fixes ajaxterm behaviour (btw i guess is not much of a white spaces issue than a carrier return issue, the later seems to be removed)

    So, does it have sense, and is safe to remove the changes made on 1.19 version?



  • Andres Ederra

    Andres Ederra - 2010-01-27

    Hi again…

    I finally see the big picture clearly :-) (solutions included)

    To sum it up: 

    1) is incompatible with firefox 3.6 becouse the reported offendingline, delete it and it will work(unknown sideeffect though)

    2) Newer sarissa versions seems to don't suffer the initial problem… but when used with ajaxterm, ajaxterm loses all its carrrier returns… And that translated to js/html world is that is is losing some of its css styles data.

    3) So the correct line to work is to fix sarissa or ajaxterm so that they work fine using their latest versions

    Now, the real issue is the code from "Paterson" highlighted in the previous comment where sarissa is changed to use importNode and appendChild (DOM way) instead the innerHTML(hacky way)

    But, importNode on firefox ignores styles(not related with 3.6 its happening since a long time), and in IE the function is not even implemented.

    So i see two approaches as solution:

    Solution A) change updateFromNode to use the innerHTML function as it did on cvs version 1.18  and previous
    Solution B) As IE doesnt implement importNode there is a custom implementation on sarissa,  that implementation could also  be applyed atoozilla-like browsers adding Moz-Browsers to the condition that defines importNode function.

    Please, tell us if its going to be applyed one of those solutions(or other or neither) as i want to push this patch as an ajaxterm patch asap…

    BTW i'm opening a bug with this wherei can attach some stuff

  • Toni Salomaki

    Toni Salomaki - 2010-01-27

    I'm also having this same problem with FF 3.6 and Telelogic Synergy (nowadays IBM's Rational Synergy). It's using Sarissa version and now the software is broken, and error message is "Sarissa.serialize is not a function". The code what it's trying to run is:

    var doc = Sarissa.getDomDocument()

    return Sarissa.serialize(doc);

    Any ideas about some kind of fix or way around this problem? Taking this via IMB's support will most likely not go really fast :)

  • Emmanuil Batsis (Manos)

    Apologies for the late reply - I'll take a look on this within the next few days.

    @tsalomak: your issue is not related to the thread. Sarissa.serialize was deprecated and later removed from the API, XMLSerializer is now used instead.

  • Toni Salomaki

    Toni Salomaki - 2010-01-28

    @mbatsis: Yes, I do know that but I was hoping you (or somebody) would know some kind of trick for fixing this for FF3.6 because it worked fine in earlier versions (and works also with IE). That's just because I would like still to use FF and I just don't think IBM is able to fix this in reasonable time or will they even do that for older versions of Synergy..

  • Emmanuil Batsis (Manos)

    What is there to fix? If IBM uses an old sarissa version and API their code should work just fine. If you want to update sarissa for an app you have to either update your code to use XMLSerializer or add the old Sarissa.serialize…

  • Andres Ederra

    Andres Ederra - 2010-01-28

    Hi Manos,

    Continuing with the original issue of this thread:

    The demo site i sent at your email is now patched(reverted changes from sarissa.js 1.18 to 1.19), and it should work on FF3.6, in case you are doing some tests.

    On the other hand i have done some test with webkit based browsers(chrome) and i see they all discard css inline styles when using importNode function, so IMHO the solution to use latest sarissa with ajaxterm is to revert sarissa.js changes between 1.18 and 1.19(updateContentFromNode, using innerHTML instead of DOM).

    What do you think?

    Do you need me to issue a patch for that in the bug?

    I'm impatient to patch sarissa, and then patch ajaxterm, test it all and push the result to ajaxterm author(if it still exists a maintainer) and to some linux distros/packages maintenance systems.

  • Toni Salomaki

    Toni Salomaki - 2010-01-28

    The problem is that Synergy is not working with FF 3.6. With earlier versions (and IE) it works fine, but FF 3.6 says that "Sarissa.serialize is not a function" and the page does not work at all. So I was hoping I could edit the page and make some kind of kludge there meanwhile waiting for IBM to fix it properly.

  • Andres Ederra

    Andres Ederra - 2010-01-28

    @tsalomak: If the app you are using is really using sarissa it should find Sarissa.serialize  function, rigth?

    Maybe the problem is that you are hitting the error frist reported in the thread:

    setting a property that has only a getter  XMLDocument.prototype.readyState = 0;

    And as a result that funciton is never declared as the js execution is aborted?

    To check it, install firebug to your ff3.6 instance and check all the error console and send it all…

    If its the case reproted in this thread you could commet out the "XMLDocument.prototype.readyState=0;" line and pray for no sideeffects, or just update for latest sarissa versión and see what happens…

  • Andres Ederra

    Andres Ederra - 2010-01-28

    @tsalomak: With the lsat phrasse of my last comment i meant:

    If its the case reported in this thread you could commet out the "XMLDocument.prototype.readyState=0;" line and pray for no sideeffects, or just update for latest sarissa versión and see what happens…

    I meant that as a last report update to sarissa version,update your calls from  Sarissa.serialize(doc); to new XMLSerializer().serializeToString(doc);  ,  and see what happens…

  • Toni Salomaki

    Toni Salomaki - 2010-01-28

    You were right, commenting XMLDocument.prototype.readyState=0; away from sarissa.js fixed the problem. Updating version of Sarissa is most likely too risky, because Sarissa is installed by Synergy, so most likely that would require extensive testing. So that's something I hope IBM will do :)

  • Albert

    Albert - 2010-03-16

    Has any one found side effects after commenting out the problem line("XMLDocument.prototype.readyState=0;")?

  • Emmanuil Batsis (Manos)

    I dont think there will be any serious side effects - people usually just wait for the 'loaded' (4?) ready state so there is not much to miss out by removing 0. However this is a bug in FF, not sarissa. I will add a try catch block if the bug persists in a regular FF release.

  • Emmanuil Batsis (Manos)

    Ok, found some time to clean up the forums etc. Guys is this still a valid bug with FF and is there a clear fix?


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks