Closed
Bug 654583
Opened 13 years ago
Closed 6 years ago
Accessing Java package with LiveConnect fails on Firefox 3.6.17 under OS X (worked fine in 3.6.16)
Categories
(Firefox :: Extension Compatibility, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: brian, Assigned: smichaud)
Details
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.57 Safari/534.24 Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17 I use the 'java' global provided by LiveConnect to access packages and create objects needed to integrate Java library into our Firefox extension. The behavior of this global has changed/regressed with Firefox 3.6.17 on OS X. Calls fail weirdly, with errors dumped to system.log, but do not generate an exception - this makes the error hard to positively identify / recover from in our extension's Javascript. See 'Additional Information' for how the behavior w/ Firefox 3.6.17 differs from what we have relied on in Firefox 3.6.16 and prior, as well as in Firefox 4.0.1. Reproducible: Always Steps to Reproduce: 1. open a new browser session 2. eval `new java.net.URL('file://foobar')` in error console Actual Results: The call fails silently. No message or traceback appears in the console. Additionally, the follow errors appear in system.log: May 3 14:30:07 Millenian [0x0-0x1198197].org.mozilla.firefox[0]: initialization error: Can't read static field java.lang.Void.TYPE May 3 14:30:07 Millenian [0x0-0x1198197].org.mozilla.firefox[0]: LiveConnect was unable to reflect one or more components of the Java runtime. May 3 14:30:07 Millenian [0x0-0x1198197].org.mozilla.firefox[0]: Go to http://bugzilla.mozilla.org/show_bug.cgi?id=5369 for details. Expected Results: The message "file://foobar" should appear in the console (indicating that the object was created). This expected result can be reproduced w/ Firefox 3.6.16 on the same system. Here is what I found when accessing this java package across several recent Firefox versions. This is in the context of using LiveConnect to integrate some Java libraries into our Firefox extension... creating a URL instance for a bogus URL is not specifically something we are trying to do, but is the shortest example I could find that yields unexpected results in Firefox 3.6.17. Firefox 3.6.16, OS X 10.6.7 1. eval `new java.net.URL('file://foobar')` in error console 2. message: "file://foobar" (object is created) Firefox 3.6.17, OS X 10.6.7 1. eval `new java.net.URL('file://foobar')` in error console 2. no message is seen 3. errors in system.log as follows: May 3 14:30:07 Millenian [0x0-0x1198197].org.mozilla.firefox[0]: initialization error: Can't read static field java.lang.Void.TYPE May 3 14:30:07 Millenian [0x0-0x1198197].org.mozilla.firefox[0]: LiveConnect was unable to reflect one or more components of the Java runtime. May 3 14:30:07 Millenian [0x0-0x1198197].org.mozilla.firefox[0]: Go to http://bugzilla.mozilla.org/show_bug.cgi?id=5369 for details. Firefox 4.0.1, OS X 10.6.7 1. eval `new java.net.URL('file://foobar')` in error console 2. message: "file://foobar" (object is created)
Comment 1•13 years ago
|
||
bsmedberg could have http://hg.mozilla.org/releases/mozilla-1.9.2/rev/fd2bd9ee3f7b broken this on OS X? http://hg.mozilla.org/releases/mozilla-1.9.2/pushloghtml?fromchange=53907aa2199a&tochange=fab6db5c327d
Comment 2•13 years ago
|
||
Sure could, but you really want to be talking to smichaud, not me.
Assignee | ||
Comment 3•13 years ago
|
||
Brian, please create a testcase that anyone can use to reproduce this bug, and either provide a link to it or attach it here.
The problem is reproducible by following the "Steps to Reproduce" that I provided: 1. open a new browser session 2. eval `new java.net.URL('file://foobar')` in error console See also the description of expected vs. actual results in the bug description.
Assignee | ||
Comment 5•13 years ago
|
||
Brian, your STR doesn't work in FF 3.6.16 (or FF 4.0) either. I repeat my request from comment #3. Maybe you've got the syntax slightly wrong. And I assume that by the "error console" you mean what you get by choosing Tools : Error Console in Firefox, and that you haven't replaced the default error console by something else.
Assignee | ||
Comment 6•13 years ago
|
||
> Brian, your STR doesn't work in FF 3.6.16 (or FF 4.0) either.
I get a syntax error.
Thank you for following up on this. I believe what I wrote under 'Steps to Reproduce' in the bug description was unclear. Here are slightly more verbose instructions. If these instructions are still unclear, I would gladly create a sample extension that exercises this code and demonstrates the differences in behavior; please let me know if that'd be helpful. In all cases, I tested by creating a new Firefox profile without any additional plugins or extensions installed. 1. launch Firefox 2. open the Error Console (from Tools menu > Error Console, or Shift-Command-J) 3. enter the following into the 'Code' field: new java.net.URL('file://foobar') 4. Press the 'Evaluate' button The expected result (reproducible w/ Firefox 3.6.16, as well as Firefox 4.0.1, on OS X 10.6.7) is that the following appears as a message in the Error Console (indicating that the Java object was created): file://foobar The observed result in Firefox 3.6.17 on the same system is that no message is seen in the Error Console. Additionally, errors are logged to system.log (as seen in the bug description).
Assignee | ||
Comment 8•13 years ago
|
||
OK, thanks. Now I can reproduce this bug with FF 3.6.17 and 3.5.19 (on OS X 10.6.7). And just before the system console error messages you report in comment #0, I also see many repetitions of the following message: MRJ Plugin JEP: JavaScript-to-Java LiveConnect failed -- script principal has malformed origin! I'll need to dig further. But for now I think it's likely this is either a bug in the latest version (0.9.7.5) of my Java Embedding Plugin, or a Firefox bug that's been uncovered by JEP 0.9.7.5.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → smichaud
Comment 9•6 years ago
|
||
Mass-closing old Extension Compatibility bugs that relate to legacy add-ons or NPAPI plug-ins. If you think this bug is still valid, please reopen or comment. Sorry for the bug spam, and happy Friday!
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•