Closed Bug 545153 Opened 16 years ago Closed 15 years ago

LiveConnect calls from javascript to Java fail

Categories

(Core Graveyard :: Plug-ins, defect)

1.9.2 Branch
x86
Windows Vista
defect
Not set
major

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: dch, Unassigned)

Details

(Whiteboard: [bugday0601])

User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.5.30729; MS-RTC EA 2; .NET CLR 3.0.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729) for the past year LiveConnect calls from javascript have worked like this document.fileupload.startUpload(). With 3.6 this doesn't work. Reproducible: Always Steps to Reproduce: 1.visit https://fetcher.spinnerdog.com/Forms/Basic 2.fill in the form and add file or flies to applet 3.click the "Place order and Upload Files" button. Actual Results: see steps above. If firebug is loaded you can make a call to document.fileupload.startUpload() and the applet will start uploading files but within Firefox document.fileupload.* calls don't work. Expected Results: files should start uploading No errors are produced and the files don't start uploading.
In the steps to reproduce the link should be https://fetcher.spinnerdog.net/Forms/Basic. Sorry.
Component: Extension Compatibility → Plug-ins
Product: Firefox → Core
QA Contact: extension.compatibility → plugins
Version: unspecified → 1.9.2 Branch
LiveConnect was removed in Firefox 3.6 for Linux and Windows. It will be removed for all operating systems in the next major release. The work was done in bug 442399. This is either WONTFIX or INVALID. Josh?
You are kidding right? Because it wasn't removed calls from java to javascript work. If it is being removed what technique will replace it for communications with Java applets?
WONTFIX. I'm bad about wontfix vs. invalid sometimes but I'm going to go with wontfix here because theoretically we could fix this but we won't.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → WONTFIX
There are other ways to do what people used to do with LiveConnect but I'm having trouble finding the docs. This comment has some information: https://bugzilla.mozilla.org/show_bug.cgi?id=442399#c4 Johnny - can you provide more information (or links to it)?
I tried those other methods and they don't work for me. The difference is the applet is to create a global object to be referenced for function calls. So instead of document.fileupload.startUpload the call should be fileupload.startUpload. The only problem is this doesn't seem to work for me.
Status: RESOLVED → UNCONFIRMED
Resolution: WONTFIX → ---
The browser simply hooks window.java and window.Packages to a Java plugin instance, and anything beyond that is up to the Java plugin to expose. That is the full extent of our current LiveConnect replacement, and I don't expect that to change any time soon, and if it ever does it'll probably change towards the plugin doing even more, and us less. Scripting of applets should still work, just like it always has, but it doesn't go through LiveConnect any more, it goes through the regular plugin scriptability API, and that's been around for some time now in recent Java versions. Spinnerdog, what version of Java are you using? Seems like things on that site appear to work here, at least mostly. I haven't dug in too deep, and probably won't have time to in the near future, but please do share your Java version etc. And if you can show a minimized testcase showing just a simple call to a scriptable applet method that worked in 3.5 but doesn't work in 3.6, then we could debug on our end, assuming the problem isn't with the Java plugin or the code on the site.
Johnny, When the bug was reported I tested with FF 3.5.7 and Java 1.6.0_07. The page worked correctly and uploaded the files. After upgrading to FF 3.6 the page stopped working. Then java was updated to 1.6.0_18 and the problem persisted. I added debug lines to my javascript directly before and after the calls to the applet and found the calls seemed to stop javascript execution. Here is the code. UC.Log( 'setting extra params' ); document.fileupload.setExtraParameter( 'jno', OrdNo ); document.fileupload.setExtraParameter( 'sdproc', self.options.process ); document.fileupload.setExtraParameter( 'filesAttached', self.filesAttached ); UC.Log( 'finished setting extra params' ); The UC.Log function prints info to a dialog on screen. In previous versions of FF and other browsers "setting extra params" is printed in the log dialog along with "findished setting extra parms". With the upgrad to 3.6 execution stops once "setting extra params" is displayed. Thanks
This works for me - Mozilla/5.0 (Windows; U; Windows NT 6.1; WOW64; en-US; rv:1.9.3a5pre) Gecko/20100531 Minefield/3.7a5pre and Java 6 u20 Have conformation on irc that ashughes see that the form works as well using Java u20.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago15 years ago
Resolution: --- → WORKSFORME
Whiteboard: [bugday0601]
Kevin, I'm not sure I understand what you are saying. After starting this thread I finally asked the Java developer to look into it. He found that fileupload.setExtraParameter() wouldn't work but simply renaming the function to "putExtraParameter" would work. We also found the problem came from calls preceeding fileupload.startUpload and the script had simply errored out before reaching startUpload. Thanks for looking into this. At this point the problem seems to be resolved though I am unclear if I'm still using LiveConnect or what. Cheers,
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.