TiddlyWiki won't save with Firefox, ok with Internet Explorer

75 views
Skip to first unread message

Emr

unread,
May 28, 2008, 3:04:40 AM5/28/08
to TiddlyWiki
Hi,

TiddlyWiki won't save the file I'm working on when opened in Firefox.
No problem to open and save this same file with Internet Explorer.

Config: Firefox 2.0.0.14, Windows XP 2

Error Message: Failed to save main TiddlyWiki file. Your changes have
not been saved.

[Exception... "'Permission denied to get property XULElement.disabled'
when calling method: [nsIDOMXULControlElement::disabled]" nsresult:
"0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame ::
file:///xxx.html :: javaLoadFile :: line 8986" data: no]

Regards,
Eric

Emr

unread,
May 28, 2008, 8:48:16 AM5/28/08
to TiddlyWiki
...
At home I can update this file with Firefox without any problem. Only
at work (where I have only restraint rights on the computer) the
problem occurs.
After one minute or two the error message pops up.

I tried again with a fresh empty.html file: new tiddler, done, save
changes: after one minute or two an error message pops up and then I
cannot work any longer on the file.

[Exception... "'Permission denied to get property XULElement.disabled'
when calling method: [nsIDOMXULControlElement::disabled]" nsresult:
"0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame ::
file:///D:/tiddlywiki/empty.html :: javaLoadFile :: line 6859" data:
no]
file:///D:/tiddlywiki/empty.html
Line 6859
ieLoadFile("D:\tiddlywiki\empty.html")empty.html (line 6750)
loadFile("D:\tiddlywiki\empty.html")empty.html (line 6696)
loadOriginal("D:\tiddlywiki\empty.html")empty.html (line 6411)
saveChanges(undefined, undefined)empty.html (line 6429)
(no name)(click clientX=1138, clientY=252)empty.html (line 2599)

[Break on this error] var r = new java.io.BufferedReader(new
java.io.FileReader(javaUrlToFilename(filePath)));
-> filePath is not defined

FND

unread,
May 28, 2008, 8:51:18 AM5/28/08
to Tiddl...@googlegroups.com
> [Exception... "'Permission denied to get property XULElement.disabled'
> when calling method: [nsIDOMXULControlElement::disabled]" nsresult:
> "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)" location: "JS frame ::
> file:///xxx.html :: javaLoadFile :: line 8986" data: no]

Are you by any chance using Firebug? Which other extensions are there?
Could you try it with a fresh profile, or using safe mode*?


-- F.


* http://www.ghacks.net/2008/05/25/firefox-safe-mode/

Emr

unread,
May 29, 2008, 2:41:04 AM5/29/08
to TiddlyWiki
Hi and thank you for taking time to answer!

I tried your suggestion: open Firefox in safe-mode and disable all add-
ons (firebug, adblock-plus, ie tab, noscript, print preview,
tiddlysnip).
Unfortunately it doesn't help...

Eric

Xavier Vergés

unread,
May 29, 2008, 8:00:09 AM5/29/08
to TiddlyWiki
Are you getting the same exception in safe mode?
Could it be some firefox plugin instead of an extension?
http://kb.mozillazine.org/Standard_diagnostic_-_Firefox (step 7)

-Xv

Emr

unread,
Jun 3, 2008, 3:49:10 AM6/3/08
to TiddlyWiki
Hi,
in safe mode I got the same error message: failed to save your main
file... I couldn't see the exception because I disabled all add-ons.

Then I removed all plugins from Firefox -> a script on this page may
be busy... -> debug script...

function javaLoadFile(filePath)
6851{
6852 try {
6853 if(document.applets["TiddlySaver"])
6854 return
String(document.applets["TiddlySaver"].loadFile(javaUrlToFilename(filePath),"UTF-8"));
6855 } catch(ex) {
6856 }
6857 var content = [];
6858 try {
6859 var r = new java.io.BufferedReader(new
java.io.FileReader(javaUrlToFilename(filePath)));
6860 var line;
6861 while((line = r.readLine()) != null)
6862 content.push(new String(line));
6863 r.close();
6864 } catch(ex) {
6865 return null;
6866 }
6867 return content.join("\n");
6868}

...debug script ->
blocked on line 6860, no response.
Waited for 5 minutes, no response, killed Firefox.

Xavier Vergés

unread,
Jun 3, 2008, 4:49:10 AM6/3/08
to TiddlyWiki
The saving code goes like this

function saveFile(fileUrl,content)
{
var r = mozillaSaveFile(fileUrl,content);
if(!r)
r = ieSaveFile(fileUrl,content);
if(!r)
r = javaSaveFile(fileUrl,content);
return r;
}

The errors that you are seeing come from javaSaveFile(), but that is
not the real problem: it should notbe called in Firefox. What's wrong
is that mozillaSaveFile() is failing, and I don't have a clue about
why this is failing: it seems that we cannot blame it on any given
tiddlywiki, any addon or any plugin :-(

Since you seem to be comfortable with firebug, maybe you could set a
breakpoint in mozillaSaveFile() and try saving...

-Xv

Emr

unread,
Jun 12, 2008, 7:25:08 AM6/12/08
to TiddlyWiki
Hi,
unfortunately I cannot really debug with Firebug.
When I set a breakpoint and try to save, the CPU load of firefox.exe
remains at 50% and the memory load increase also continually until I
have to kill the process.
Regards

Eric Shulman

unread,
Jun 12, 2008, 7:39:48 AM6/12/08
to TiddlyWiki
As Xavier has noted, the error in java_loadfile suggests that the
Firefox native file I/O handling in mozillaSaveFile() has failed,
resulting in a fallback attempt to use the TiddlySaver.jar *java*
applet (which is normally only used by browsers such as Safari and
Opera that don't have their own I/O functions).

Rather than using Firebug to determine why mozillaSaveFile() is
failing, you can try this:

* create a copy of the document file (using your OS)
* edit that file using a text editor and search for "function
mozillaLoadFile(filepath)"
* in that function, locate these lines
} catch(ex) {
return false;
}
and change "return false" to:
alert(exceptionText(ex,"mozSave error:")); return false;

* write the file in the text editor
* load the modified file into the browser
* try to save
* then, when the mozillaSaveFile function fails, you should see some
kind of diagnostic text in a message box. This *might* give a decent
clue as to what is going wrong, or at least suggest where to look
further...

HTH,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

Emr

unread,
Jun 16, 2008, 5:04:38 AM6/16/08
to TiddlyWiki
Hi Eric,
Thank you for your tip.

Here is the message I get:
mozSave error::
A script from "file://" was denied UniversalXPConnect privileges.

Kind regards,
Eric

Jonathan Lister

unread,
Jun 16, 2008, 5:18:15 AM6/16/08
to Tiddl...@googlegroups.com
Emr,

Are you attempting to save the file across a network share or on a
computer which you don't have administrator access to?


J.

--
Sent from Google Mail for mobile | mobile.google.com

http://www.jaybyjayfresh.co.uk

Xavier Vergés

unread,
Jun 16, 2008, 5:34:08 AM6/16/08
to TiddlyWiki
Jonathan, things are failing before he actually gets a chance to try
to write to the disk, so (by now) is not a OS access right thing.

Emr, you probably were asked once if you wanted to remember denying
access to a file: . Either you said yes, or you admin did. You have to
undo that decission. Quoting Eric
http://groups.google.com/group/TiddlyWiki/msg/99e8868f62086fe3

To find the internal FireFox setting:
1) look for "prefs.js", a file that is automatically written by
FireFox to store your current browser settings. Under Windows, this
is generally located at:
-----
C:\Documents and Settings\Your Name\Application Data\Mozilla\Firefox
\Profiles\abcdef12345.default\prefs.js
-----
2) Open that file with a plain text editor (make sure FireFox is NOT
running at the time!), and find these two lines (or similar):
-----
user_pref("capability.principal.codebase.p0.granted",
"UniversalXPConnect UniversalBrowserRead");
user_pref("capability.principal.codebase.p0.id", "file://");
-----
3) Delete those lines to restore FireFox's default "ask for
permission" state for the "file://" domain

------------------------
You will be asked again to grant/deny access. You can remember the
decission for everything in your disk, or,playing on the safer side,
grant only access to your tiddlywiki with
http://firefoxprivileges.tiddlyspot.com/

-Xavier

On Jun 16, 11:18 am, "Jonathan Lister" <jnthnl...@googlemail.com>
wrote:
> Emr,
>
> Are you attempting to save the file across a network share or on a
> computer which you don't have administrator access to?
>
> J.
>

Emr

unread,
Jun 16, 2008, 8:09:20 AM6/16/08
to TiddlyWiki
Hi,
I had these lines in "prefs.js":

user_pref("capability.principal.codebase.p0.granted",
"UniversalXPConnect");
user_pref("capability.principal.codebase.p0.id", "file://");
user_pref("capability.principal.codebase.p0.subjectName", "");
user_pref("capability.principal.codebase.p1.granted",
"UniversalXPConnect");
user_pref("capability.principal.codebase.p1.id", "file://");
user_pref("capability.principal.codebase.p1.subjectName", "");
user_pref("capability.principal.codebase.p2.denied",
"UniversalXPConnect");
user_pref("capability.principal.codebase.p2.id", "file://");
user_pref("capability.principal.codebase.p2.subjectName", "");

deleting the first two lines didn't help, so I let the lines in place
and replaced only "denied" by "granted" and now ... IT WORKS!

Are p1 and p2 necessary or can I delete these lines and leave only the
three p0 lines?

Thank you so much for your help.
Eric

Xavier Vergés

unread,
Jun 16, 2008, 11:37:28 PM6/16/08
to TiddlyWiki
I think that you can safely delete all of them. My understanding is
that these lines are created when you "remember this decision";
however, I don't understand why Firefox decided to remember
contradictory things...

-Xavier
Reply all
Reply to author
Forward
0 new messages