Closed Bug 443690 Opened 16 years ago Closed 16 years ago

FireFTP extension home page blocks BonEcho / GranParadiso / Minefield from downloading the extension

Categories

(Tech Evangelism Graveyard :: English US, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: tonymec, Assigned: mimecuvalo)

References

()

Details

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17pre) Gecko/20080704 BonEcho/2.0.0.17pre
- Build ID: 2008070403

Reproducible: Always

Steps to Reproduce:
1. Start a non-release (i.e., nightly or beta) version of Firefox, whose User-Agent string does not include the word "Firefox"
2. Browse to http://fireftp.mozdev.org/

Actual results:
The download link says "You need Firefox to use FireFTP - Download Firefox with Google Toolbar"

Expected Results
Download link for FireFTP should appear

More information:
Workaround: Create, in about:config, a new preference named "general.useragent.extra.firesomething" with the same value as general.useragent.extra.firefox except that the part before the slash is replaced by "Firefox" (without quotes). Then refresh the FireFTP homepage.

See also bug 405514 comment #24
To be fair, this is exactly the sort of situation for which UA sniffing is eminently appropriate. If the devs choose not to support their extension with nightly builds, that's their prerogative.

Of course, the workaround described in comment 0 makes me pretty sure that you could successfully download this extension with Camino, which can't use XUL-based Firefox extensions at all, so their sniffing definitely needs some help.

In an ideal world, the sniffer would look for [Firefox || BonEcho || Gran Paradiso || Minefield || Seamonkey || Iceweasel] (and possibly others? I'm not sure how many other Firefox-like browsers there are out there) and allow the download, and present a page to other browsers saying something along the lines of, "Your browser does not appear to be compatible with this software. Download it anyway?"
(In reply to comment #1)
[...]
> In an ideal world, the sniffer would look for [Firefox || BonEcho || Gran
> Paradiso || Minefield || Seamonkey || Iceweasel] (and possibly others? I'm not
> sure how many other Firefox-like browsers there are out there) and allow the
> download, and present a page to other browsers saying something along the lines
> of, "Your browser does not appear to be compatible with this software. Download
> it anyway?"
> 

IIUC, this extension seems not to be compatible with SeaMonkey; but if that page would just say "You appear not to be using Firefox, so this extension will probably not work with your browser - [Download Firefox] - [Download FireFTP anyway]" it would be good enough for me.
Thank you, Tony, for documenting a workaround!
Here's the code in question:

<script type="text/javascript">
                    <!--
                    if (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Iceweasel") != -1) {
                      document.writeln("<a style=\"color:#040\" href=\"https:\/\/addons.mozilla.org\/en-US\/firefox\/downloads\/file\/32890\/fireftp-0.99.2-fx.xpi\"><b>Download FireFTP<\/b><\/a><br\/>");
                      document.writeln("<span class=\"smaller\">0.99.2, English (0.5 MB)<\/span><br\/>");
                      document.writeln("<a class=\"smaller\" style=\"color: #666\" href=\"features.html\">Learn More<\/a><br/><a class=\"smaller\" style=\"color: #666\" href=\"all.html\">Other Languages and Versions<\/a>");
                    } else {
                      google_ad_client  = "pub-2033664521367391";
                      google_ad_width   = 180;
                      google_ad_height  = 60;
                      google_ad_format  = "180x60_as_rimg";
                      google_cpa_choice = "CAAQyaj8zwEaCIwcWMzeycafKMu293M";
                      document.writeln("<span class=\"smaller\">You need Firefox to use FireFTP.<\/span><br\/>");
                      document.writeln("<script type=\"text\/javascript\" src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\"><\/script>");
                    }
                    //-->
                  </script>
                  <noscript>
                    <div>
                      <a style="color:#040" href="https://addons.mozilla.org/en-US/firefox/downloads/file/32890/fireftp-0.99.2-fx.xpi"><b>Download FireFTP</b></a><br/>
                      <span class="smaller">0.99.2, English (0.5 MB)</span><br/>
                      <a class="smaller" style="color: #666" href="features.html">Learn More</a> - <a class="smaller" style="color: #666" href="all.html">Other Languages and Versions</a>
                    </div>
                  </noscript>

The obvious workaround, of course, is just to download the XPI directly from

https://addons.mozilla.org/en-US/firefox/downloads/file/32890/fireftp-0.99.2-fx.xpi

I don't have any idea why an extension would work with Firefox and not with Seamonkey, but it's trivially easy for the devs to add "support" for Firefox nightlies by adding "Bon Echo" and "Minefield" (and anything else they deem appropriate) to the if statement in the first script block.

As I noted in comment 1, however, simply searching for navigator.userAgent.indexOf("[appname]") is not a very intelligent approach, because navigator.userAgent.indexOf("Firefox") will succeed in Camino 1.6+, and Camino clearly can't use the extension. Telling Camino users that incompatible software *is* available for Camino is just as bad as telling Minefield users that compatible software isn't.

I assume mime@google is this extension's developer?
(In reply to comment #4)
[...]
> The obvious workaround, of course, is just to download the XPI directly from
> https://addons.mozilla.org/en-US/firefox/downloads/file/32890/fireftp-0.99.2-fx.xpi
[...]

yes, except when the desired version is not yet available at AMO, cf. https://www.mozdev.org/bugs/show_bug.cgi?id=19322#c17
(In reply to comment #4)
[...]
> I assume mime@google is this extension's developer?
> 

Yes, cf. bug 405514 (which he fixed) and the license block near the bottom of http://fireftp.mozdev.org/developers.html (where he appears with a different email address, unknown to bugzilla.mozilla.org).
I've updated the sniffing to just look for IE, the main impetus being to try convert IE users over anyway.  Thanks for the bug report!
Assignee: english-us → mime
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.17pre) Gecko/20080707 BonEcho/2.0.0.17pre
- Build ID: 2008070703

Works now.

-- Konqueror also sees the .xpi link, and I suppose Camino and Safari also would, but anyway, even without browser-sniffing the extension cannot be applied to them, which is no fault of FireFTP. I'm marking this as FIXED, the fix being at the FireFTP site.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Product: Tech Evangelism → Tech Evangelism Graveyard
You need to log in before you can comment on or make changes to this bug.