Closed Bug 1165286 Opened 5 years ago Closed 5 years ago

Java plug-in no longer supports 'Use browser settings' for network connections with Firefox 38

Categories

(Firefox :: Untriaged, defect)

38 Branch
defect
Not set

Tracking

()

VERIFIED FIXED
Firefox 41
Tracking Status
firefox38 --- affected
firefox39 + verified
firefox40 + verified
firefox41 + fixed
firefox-esr31 --- unaffected
firefox-esr38 39+ verified
relnote-firefox --- 39+

People

(Reporter: james-p, Assigned: mcmanus)

References

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Firefox/31.0
Build ID: 20150504194141

Steps to reproduce:

Run Firefox 38 (or 38 ESR) with Java plugin installed (JRE 1.8.0_45 - from java.com) and attempt to load the Java applet from <https://www.java.com/verify>

I'm running Firefox on Linux (CentOS 6.6) with network settings set to 'Auto-detect proxy settings for this network' - i.e. no direct connection to the Internet


Actual results:

The Java plug-in loads (I'm asked to activate it) but I just get a grey box and eventually the message 'We are unable to verify if java is installed and enabled in your browser.' 

The same happens with various other Java test sites


Expected results:

The Java applet will run and report the version of Java installed

This works with all previous versions of Firefox (i.e. FF 37 and FF 31 ESR)

If I change my user Java preference (via 'jcontrol' that comes with JRE) to not ''Use browser settings" - in my case "Use automatic proxy configuration script" and give the URL to my local autoconfig pac settings - the Java applet runs fine

i.e. it appears that he Java ''Use browser settings" setting (the default) no longer work with Firefox 38
Looks like it broke between the 2015-01-22 and 2015-01-23 nightly builds

I'm guessing it might be related to change for bug 436344 ?

If this is the case, does it mean the Java plugin needs to be updated to support this change in API ?
Georg, do you know how that bug would tie in with plugin structures and whether we have contacts at Oracle that we can poke about the status of this?
Blocks: 436344
Flags: needinfo?(gfritzsche)
This symptom is most likely to be caused by a failure within nsPluginHost::FindProxyForURL: http://mxr.mozilla.org/mozilla-central/source/dom/plugins/base/nsPluginHost.cpp#606

Can somebody who has this plugin set a breakpoint on that function and collect the values that are being passed in to FindProxyForURL by the java plugin? Bonus points for walking all the way through the function and looking for error codes, but that's not necessary.

Setting NI to the owner/reviewer from bug 436344 in case they have obvious clues.
Flags: needinfo?(mcmanus)
Flags: needinfo?(gfritzsche)
Flags: needinfo?(arthuredelstein)
operational system: Windows 7 pro
FF 37.0.2 - Run Java
FF 38.0.1 - Does not run java
used to test site: https://www.java.com/pt_BR/download/installed.jsp
I've used the CentOS re-build of Firefox 38 ESR - as there is a debuginfo package available - as I don't know how to do something similar with the mozilla.org download - using gdb I get:

Breakpoint 1, nsPluginHost::FindProxyForURL (this=0x7f48399039d0, url=
    0x7f4831538d88 "https://www.java.com/en/download/JavaDetection_applet.jnlp", result=0x7fff31807928)
    at /usr/src/debug/firefox-38.0/mozilla-esr38/dom/plugins/base/nsPluginHost.cpp:603
603     {
Missing separate debuginfos, use: debuginfo-install libcanberra-0.22-1.el6.centos.x86_64 libogg-1.1.4-2.1.el6.x86_64 libtdb-1.2.10-1.el6.x86_64 libtool-ltdl-2.2.6-15.5.el6.x86_64 libvorbis-1.2.3-4.el6_2.1.x86_64 rhythmbox-0.12.8-1.el6.x86_64
(gdb) list
598      * http://developer.netscape.com/docs/manuals/proxy/adminnt/autoconf.htm#1020923
599      * with the exception that multiple values are not implemented.
600      */
601
602     nsresult nsPluginHost::FindProxyForURL(const char* url, char* *result)
603     {
604       if (!url || !result) {
605         return NS_ERROR_INVALID_ARG;
606       }
607       nsresult res;
(gdb) print url
$1 = 
    0x7f4831538d88 "https://www.java.com/en/download/JavaDetection_applet.jnlp"
(gdb) print result
$2 = (char **) 0x7fff31807928
(gdb) next
604       if (!url || !result) {
(gdb) next
610         do_GetService(NS_PROTOCOLPROXYSERVICE_CONTRACTID, &res);
(gdb) next
611       if (NS_FAILED(res) || !proxyService)
(gdb) next
614       nsRefPtr<nsProtocolProxyService> rawProxyService = do_QueryObject(proxyService);
(gdb) next
616         return NS_ERROR_FAILURE;
(gdb) next
615       if (!rawProxyService) {
(gdb) next
667       return res;
(gdb) print **result
$6 = -128 '\200'
(gdb) next
668     }
(gdb) next
mozilla::plugins::parent::_getvalueforurl (instance=0x7f482a8b1490, variable=Unhandled dwarf expression opcode 0xf3
)
    at /usr/src/debug/firefox-38.0/mozilla-esr38/dom/plugins/base/nsNPAPIPlugin.cpp:2620
(gdb) print **value
$8 = -128 '\200'


Does this help?
Duplicate of this bug: 1166262
Keywords: regression
[Tracking Requested - why for this release]:
Regression that may affect enterprise customers significantly, at least while we still support the Java plugin.
Tracking enabled for 39, 40, 41, & esr39.
nsprotocolproxyservice doesn't qi to the right thing to let the plugin use the deprecated synchronous interface.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=ecaf80fb2c50
Flags: needinfo?(mcmanus)
Flags: needinfo?(arthuredelstein)
Assignee: nobody → mcmanus
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
The patch appears to have fixed the problem for me
Duplicate of this bug: 1166696
Duplicate of this bug: 1166357
I guess this patch needs to be included in 38.0.2, many corporates using proxies could be affected.
Comment on attachment 8607858 [details] [diff] [review]
java plugin no longer finds browser proxy settings

Review of attachment 8607858 [details] [diff] [review]:
-----------------------------------------------------------------

::: netwerk/base/nsProtocolProxyService.cpp
@@ +412,5 @@
> +NS_INTERFACE_MAP_BEGIN(nsProtocolProxyService)
> +NS_INTERFACE_MAP_ENTRY(nsIProtocolProxyService)
> +NS_INTERFACE_MAP_ENTRY(nsIProtocolProxyService2)
> +NS_INTERFACE_MAP_ENTRY(nsIObserver)
> +if ( aIID.Equals(NS_GET_IID(nsProtocolProxyService)) )  foundInterface = static_cast<nsIProtocolProxyService2*>(this); else

No lie, this is ugly. But, so it goes.
Attachment #8607858 - Flags: review?(hurley) → review+
Comment on attachment 8607858 [details] [diff] [review]
java plugin no longer finds browser proxy settings

[Approval Request Comment]
If this is not a sec:{high,crit} bug, please state case for ESR consideration:
User impact if declined: java plugin with proxies may be inoperable impacting enterprises
Fix Landed on Version: 41
Risk to taking this patch (and alternatives if risky): very low - its additive to one table
String or UUID changes made by this patch: none

See https://wiki.mozilla.org/Release_Management/ESR_Landing_Process for more info.

Approval Request Comment
[Feature/regressing bug #]: 436344 (landed on 38)
[User impact if declined]: see above
[Describe test coverage new/current, TreeHerder]: regression testing of proxy code passed, hand tested str, confirmed by user
[Risks and why]: see above
Attachment #8607858 - Flags: approval-mozilla-esr38?
Attachment #8607858 - Flags: approval-mozilla-beta?
Attachment #8607858 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/3c28c36311f0
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 41
Just to check, is this fix going to be applied to 38 ESR ?
(In reply to James Pearson from comment #19)
> Just to check, is this fix going to be applied to 38 ESR ?

That is currently the aim, subject to approval from the release drivers based on comment #17, yes.
Comment on attachment 8607858 [details] [diff] [review]
java plugin no longer finds browser proxy settings

We want that in ESR38 for sure as many corporations are still using applet.
For 38.0.5, I don't really know. This can wait 39, right? (or is it that really compartmentalized ?)
Attachment #8607858 - Flags: approval-mozilla-esr38?
Attachment #8607858 - Flags: approval-mozilla-esr38+
Attachment #8607858 - Flags: approval-mozilla-beta?
Attachment #8607858 - Flags: approval-mozilla-beta+
Attachment #8607858 - Flags: approval-mozilla-aurora?
Attachment #8607858 - Flags: approval-mozilla-aurora+
I don't think it is critical to have it on non-esr 38
My clients are using 38.0.1 (with Java 1.8_45) and with this problem. Around 300 machines. Any preview of this correction in 38.0.2?
(In reply to Daniel Bertuol Guimarães from comment #23)
> Around 300 machines. Any preview of this correction in 38.0.2?
It is not planned. However, we will publish 38.0.5 June second.
Sylvestre, this patch hasn't landed for 38.0.5 as far as I know. Is it supposed to?
Flags: needinfo?(sledru)
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #28)
> Sylvestre, this patch hasn't landed for 38.0.5 as far as I know. Is it
> supposed to?
Yes, cf comment #21. AFAIK, we are not planning to make a second rc for 38.0.5.
Flags: needinfo?(sledru)
Duplicate of this bug: 1167679
Flags: qe-verify+
I'm a little confused. Was this supposed to be fixed in 38.0.5?
Duplicate of this bug: 1171014
Duplicate of this bug: 1171336
In what version and what is planned to to solve the problem? 38.0.5 - the problem remained.
The fix will be in version 39.
We didn't take it to avoid potential side effects (cf comment #21 & #22).

Sorry for the inconvenience.
Just my cup of coffee:
This really needs to be fixed within 38ESR.
Private users should not care about this bug so much but this is quite a desaster for corporate users like us!
(In reply to knappe from comment #36)
> This really needs to be fixed within 38ESR.
> Private users should not care about this bug so much but this is quite a
> desaster for corporate users like us!
We agree, that is why it will be in 38.1.0 ;)
(In reply to Sylvestre Ledru [:sylvestre] from comment #37)
> We agree, that is why it will be in 38.1.0 ;)

Great, thank you! :-)
(In reply to Sylvestre Ledru [:sylvestre] from comment #37)

> We agree, that is why it will be in 38.1.0 ;)


38.1.0??

When is that scheduled?
(In reply to George K from comment #39)
> 
> 38.1.0??
> 
> When is that scheduled?

I believe 30th June 2015
I tried to reproduce the initial issue (in order to verify that is fixed in latest builds) on Firefox 38.0.1 and old Nightly from 2015-01-23 but with no success.
What I did:
- selected from Java control panel 'Use browser settings', introduced a random proxy server found online in Firefox, visited https://www.java.com/en/download/uninstallapplet.jsp, clicked Allow applet, applet loads fine.
- Added a proxy found online in Internet Options/Connections/LAN settings/'Use a proxy server for your lan', selected from Java control panel 'Use browser settings', selected 'Use system proxy settings' in Firefox, visited https://www.java.com/en/download/uninstallapplet.jsp, clicked Allow applet, applet loads fine.

I guess I`m doing something wrong in order to reproduce, can you help me with this?
Flags: needinfo?(mcmanus)
(In reply to Bogdan Maris, QA [:bogdan_maris] from comment #42)
> I guess I`m doing something wrong in order to reproduce, can you help me
> with this?

Do you have direct Internet access to https://www.java.com/en/download/uninstallapplet.jsp ?

If so, then it maybe the case Java loaded this applet directly irrespective of the Firefox browser settings?
(In reply to James Pearson from comment #43)
> (In reply to Bogdan Maris, QA [:bogdan_maris] from comment #42)
> > I guess I`m doing something wrong in order to reproduce, can you help me
> > with this?
> 
> Do you have direct Internet access to
> https://www.java.com/en/download/uninstallapplet.jsp ?
> 
> If so, then it maybe the case Java loaded this applet directly irrespective
> of the Firefox browser settings?

Yes I do have direct internet access to https://www.java.com/en/download/uninstallapplet.jsp
(In reply to Bogdan Maris, QA [:bogdan_maris] from comment #44)
> (In reply to James Pearson from comment #43)
> > (In reply to Bogdan Maris, QA [:bogdan_maris] from comment #42)
> > > I guess I`m doing something wrong in order to reproduce, can you help me
> > > with this?
> > 
> > Do you have direct Internet access to
> > https://www.java.com/en/download/uninstallapplet.jsp ?
> > 
> > If so, then it maybe the case Java loaded this applet directly irrespective
> > of the Firefox browser settings?
> 
> Yes I do have direct internet access to
> https://www.java.com/en/download/uninstallapplet.jsp

this bug is about proxy selection. you need to use that for str.
Flags: needinfo?(mcmanus)
(In reply to Bogdan Maris, QA [:bogdan_maris] from comment #44)
> (In reply to James Pearson from comment #43)
> > (In reply to Bogdan Maris, QA [:bogdan_maris] from comment #42)
> > > I guess I`m doing something wrong in order to reproduce, can you help me
> > > with this?
> > 
> > Do you have direct Internet access to
> > https://www.java.com/en/download/uninstallapplet.jsp ?
> > 
> > If so, then it maybe the case Java loaded this applet directly irrespective
> > of the Firefox browser settings?
> 
> Yes I do have direct internet access to
> https://www.java.com/en/down...

To reproduce this you need to set up a situation where you can only connect through the proxy and any attempts to connect outside the proxy fail (as is the case with most corporate proxies).

One way you could test this with your current setup is to find a Java applet that echoes your IP and run it in Firefox and IE. The Firefox one should echo your systems own IP since the proxy isn't being used and the IE one should echo the prxoxies IP since java is correctly detecting the settings in IE
(In reply to George K from comment #46)
> (In reply to Bogdan Maris, QA [:bogdan_maris] from comment #44)
> > (In reply to James Pearson from comment #43)
> > > (In reply to Bogdan Maris, QA [:bogdan_maris] from comment #42)
> > > > I guess I`m doing something wrong in order to reproduce, can you help me
> > > > with this?
> > > 
> > > Do you have direct Internet access to
> > > https://www.java.com/en/download/uninstallapplet.jsp ?
> > > 
> > > If so, then it maybe the case Java loaded this applet directly irrespective
> > > of the Firefox browser settings?
> > 
> > Yes I do have direct internet access to
> > https://www.java.com/en/down...
> 
> To reproduce this you need to set up a situation where you can only connect
> through the proxy and any attempts to connect outside the proxy fail (as is
> the case with most corporate proxies).
> 
> One way you could test this with your current setup is to find a Java applet
> that echoes your IP and run it in Firefox and IE. The Firefox one should
> echo your systems own IP since the proxy isn't being used and the IE one
> should echo the prxoxies IP since java is correctly detecting the settings
> in IE

Thanks George, but unfortunately I was still unable to reproduce even with other java applets. If this affected you as well, would you mind verify that using Firefox 39 beta 7 this issue does not reproduce anymore?
http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/39.0b7-candidates/build1/
Flags: needinfo?(KENDROSG)
(In reply to Bogdan Maris, QA [:bogdan_maris] from comment #47)
> (In reply to George K from comment #46)
> > (In reply to Bogdan Maris, QA [:bogdan_maris] from comment #44)
> > > (In reply to James Pearson from comment #43)
> > > > (In reply to Bogdan Maris, QA [:bogdan_maris] from comment #42)
> > > > > I guess I`m doing something wrong in order to reproduce, can you help me
> > > > > with this?
> > > > 
> > > > Do you have direct Internet access to
> > > > https://www.java.com/en/download/uninstallapplet.jsp ?
> > > > 
> > > > If so, then it maybe the case Java loaded this applet directly irrespective
> > > > of the Firefox browser settings?
> > > 
> > > Yes I do have direct internet access to
> > > https://www.java.com/en/down...
> > 
> > To reproduce this you need to set up a situation where you can only connect
> > through the proxy and any attempts to connect outside the proxy fail (as is
> > the case with most corporate proxies).
> > 
> > One way you could test this with your current setup is to find a Java applet
> > that echoes your IP and run it in Firefox and IE. The Firefox one should
> > echo your systems own IP since the proxy isn't being used and the IE one
> > should echo the prxoxies IP since java is correctly detecting the settings
> > in IE
> 
> Thanks George, but unfortunately I was still unable to reproduce even with
> other java applets. If this affected you as well, would you mind verify that
> using Firefox 39 beta 7 this issue does not reproduce anymore?
> http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/39.0b7-candidates/
> build1/

I just updated to 39b7 and it has resolved the issue. I was succesfully able to run the applet in the initial bug report (I've personally tried and failed to run it in all versions of Firefox 38).

Definately seems fixed as far as I can tell.
Thanks George!
I know it`s much to ask but, when you have time, would you mind verifying the other builds as well, just to close this bug as verified fixed?

Firefox ESR 38.1 - http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/38.1.0esr-candidates/build1/
latest Aurora - http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/
latest Nightly - http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-central/
(In reply to Bogdan Maris, QA [:bogdan_maris] from comment #49)
> Thanks George!
> I know it`s much to ask but, when you have time, would you mind verifying
> the other builds as well, just to close this bug as verified fixed?
> 
> Firefox ESR 38.1 -
> http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/38.1.0esr-candidates/
> build1/
> latest Aurora -
> http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/
> latest Nightly -
> http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-
> central/

Worked in everything except the last one but that issue seemed unrelated. The whole page was crashing so something else was going on there which was preventing me from running the test.
Flags: needinfo?(KENDROSG)
(In reply to George K from comment #50)
> (In reply to Bogdan Maris, QA [:bogdan_maris] from comment #49)
> > Thanks George!
> > I know it`s much to ask but, when you have time, would you mind verifying
> > the other builds as well, just to close this bug as verified fixed?
> > 
> > Firefox ESR 38.1 -
> > http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/38.1.0esr-candidates/
> > build1/
> > latest Aurora -
> > http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-aurora/
> > latest Nightly -
> > http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-mozilla-
> > central/
> 
> Worked in everything except the last one but that issue seemed unrelated.
> The whole page was crashing so something else was going on there which was
> preventing me from running the test.

Thanks George, will leave Firefox 41 fixed for now, marking verified for the rest of builds.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Duplicate of this bug: 1167355
The error occurs again in Firefox 49.0. Should this be handled in this Bug or should i create a new one for this?
Please create a new bug.
Depends on: 1313641
You need to log in before you can comment on or make changes to this bug.