As a security precaution, we have turned on the setting "Require API key authentication for API requests" for everyone. If this has broken something, please contact
Last Comment Bug 749352 - Firefox fails to connect when a proxy is used
: Firefox fails to connect when a proxy is used
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: Trunk
: ARM Android
: -- normal (vote)
: Firefox 19
Assigned To: Brad Lassey [:blassey] (use needinfo?)
: Sebastian Kaspari (:sebastian)
: 811045 (view as bug list)
Depends on: 812754
Blocks: 813688
  Show dependency treegraph
Reported: 2012-04-26 13:46 PDT by Leonard Camacho [:lcamacho]
Modified: 2016-07-29 14:24 PDT (History)
13 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

Proxy.js (997 bytes, text/plain)
2012-05-01 07:55 PDT, Leonard Camacho [:lcamacho]
no flags Details
patch (19.66 KB, patch)
2012-11-13 11:37 PST, Brad Lassey [:blassey] (use needinfo?)
mark.finkle: review+
dtownsend: review+
Details | Diff | Splinter Review

Description User image Leonard Camacho [:lcamacho] 2012-04-26 13:46:08 PDT
User Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120425 Firefox/15.0a1
Build ID: 20120425030647

Steps to reproduce:

1. Configure and start a proxy 
2. Set the proxy on Android (Gingerbread 2.3.4) Wifi settings
3. Start Firefox nightly, go to

Actual results:

It stays loading for a while and then shows the message "the connection has timed out"

Expected results:

It should show me
Comment 1 User image Aaron Train [:aaronmt] 2012-04-26 14:22:02 PDT
Which build of Firefox are you using?
Comment 2 User image Leonard Camacho [:lcamacho] 2012-04-26 14:29:01 PDT
Mozilla/5.0 (Android; Mobile; rv: 15.0) Gecko/15.0 Firefox/15.0a1

Comment 3 User image Aaron Train [:aaronmt] 2012-04-27 06:32:03 PDT
Adding 'qawanted' to see if anyone else can reproduce.
Comment 4 User image Adrian Tamas (:AdrianT) 2012-04-30 02:49:49 PDT
Unable to reproduce the issue on Nightly/15.0a1 2012-04-29 a Motorola Droid Pro ( Android 2.3.4) using several free proxy servers. 
Can you please provide more info about the proxy server used in order to try and reproduce the issue?
Comment 5 User image Leonard Camacho [:lcamacho] 2012-05-01 07:52:44 PDT
The actual result has changed and now connect but It just skip the proxy.

I have a small proxy made with nodejs, testing with native Android browser and Dolphin It shows me every request but with stable Firefox and Nightly It doesnt show a single request.
Comment 6 User image Leonard Camacho [:lcamacho] 2012-05-01 07:55:03 PDT
Created attachment 619929 [details]

This is the proxy.
Comment 7 User image Martijn Wargers [:mwargers] 2012-05-02 02:22:48 PDT
Leonard, how do I run this small proxy?
Comment 8 User image Leonard Camacho [:lcamacho] 2012-05-02 04:49:32 PDT
In Ubuntu:

1.- Install nodejs
2.- Execute in terminal: nodejs proxy.js
3.- Set the proxy on Android using the ip of your machine and the port is 8081
Comment 9 User image Martijn Wargers [:mwargers] 2012-05-02 15:32:08 PDT
Ok, I can reproduce the issue.
Opera Mobile suffers from the same thing.

I guess proxy setting is called here:

I don't see any defines for Android for:

Perhaps this library is useful for getting the proxy server in Android?
Comment 10 User image Catalin Suciu [:csuciu] 2012-05-03 01:22:23 PDT
Removing 'qawanted' per above comment
Comment 11 User image Hubert Figuiere [:hub] 2012-05-07 11:47:32 PDT
I have the same issue, except that my proxy is in the APN settings. The Android browser works fine. So I have no browsing on 3G.

(Samsung SGS2 with 2.3.3 stock Android - Firefox Nightly)
Comment 12 User image Aaron Train [:aaronmt] 2012-05-15 11:01:53 PDT
User reported issue with Beta:
Comment 13 User image Mark Finkle (:mfinkle) (use needinfo?) 2012-05-15 11:40:44 PDT
This could be handled by an add-on too
Comment 14 User image Hubert Figuiere [:hub] 2012-05-15 12:25:29 PDT
(In reply to Mark Finkle (:mfinkle) from comment #13)
> This could be handled by an add-on too

And how do you download the add-on?
Comment 15 User image Aaron Train [:aaronmt] 2012-11-12 12:25:12 PST
*** Bug 811045 has been marked as a duplicate of this bug. ***
Comment 16 User image Brad Lassey [:blassey] (use needinfo?) 2012-11-13 11:37:09 PST
Created attachment 681147 [details] [diff] [review]

Note that it seems proxy support is known to be broken in Android pre-ICS, but this patch will at least get things working in for ICS and later.
Comment 17 User image Mark Finkle (:mfinkle) (use needinfo?) 2012-11-13 12:05:10 PST
Comment on attachment 681147 [details] [diff] [review]

>diff --git a/mobile/android/base/ b/mobile/android/base/

>+    public static String getProxyForURI(String spec, String scheme, String host, int port) {

>+            } catch( uriEx2) {
>+                Log.i("GeckoProxy", "failed to create uri from spec", uriEx);
>+                Log.i("GeckoProxy", "also failed to create uri from parts", uriEx2);

nit: Log.d and use sentences:
                Log.d("GeckoProxy", "Failed to create uri from spec", uriEx);
                Log.d("GeckoProxy", "Failed to create uri from parts", uriEx2);

>+        Log.i("GeckoProxy", "no proxy for: " + spec +", " + "scheme" + ":" + host + ":" + port);

I'd rather remove this. It leaks the URL, which is bad for private browsing. Also, I don't think this is critical enough to log.

>diff --git a/widget/android/AndroidBridge.cpp b/widget/android/AndroidBridge.cpp

Looks OK to me

r+, but you should get a toolkit person to review the toolkit parts. I thought the windowsproxy/nsWindowsSystemProxySettings -> androidproxy/nsAndroidSystemProxySettings looked fine.
Comment 18 User image Ed Morley [:emorley] 2012-11-14 07:01:25 PST
Comment 19 User image Leonard Camacho [:lcamacho] 2012-11-14 11:38:29 PST
Still not working with a SGS2 with ICS.

This change is already on latest nightly right?
Comment 20 User image Aaron Train [:aaronmt] 2012-11-14 11:49:46 PST
(In reply to Leonard Camacho [:lcamacho] from comment #19)
> Still not working with a SGS2 with ICS.
> This change is already on latest nightly right?

Didn't make it on today's as it landed after it was built. Check tomorrow's.
Comment 21 User image Hubert Figuiere [:hub] 2012-11-20 11:54:43 PST
I just checked with the latest nightly on my SGS2 with CM9 (Android 4.0 base). And it works for both http and https.

Note You need to log in before you can comment on or make changes to this bug.