Firefox 4 Compatibility

<<

jorge-villalobos

AMO Administrator

Posts: 3005

Joined: Tue Sep 29, 2009 7:30 pm

Location: San José, Costa Rica

Post Thu Jul 22, 2010 8:39 am

Firefox 4 Compatibility

Hello everybody,

As you all probably know, Firefox 4 is coming, and we all need to prepare for it. Please read my blog post about Firefox 4 Add-on Compatibility: Time to Get Started. If there's anything in your add-on that isn't working on Firefox 4 anymore and isn't mentioned in the documents, please let us know in this forum, or in a comment in the blog post. We want the documentation to cover everything that Firefox 4 breaks.

Like I said in the blog post, the first betas of Firefox 4 are not stable enough for you to produce a final Firefox 4 version of your add-ons, but there are enough changes to be made that it's really worthwhile spending some time adapting your add-on and getting closer to Firefox 4 support.

- Jorge
<<

tyunshan

Posts: 6

Joined: Tue Jul 20, 2010 7:19 pm

Post Tue Jul 27, 2010 5:49 am

Re: Firefox 4 Compatibility

I need more infomation about XPCOM. I have a binary component and it isn't working at 4.0b2
I know I have to declare it in chrome.manifest, but seems I need to revise the C++ source and compile it again.
I need more details about how to revise the C++ source.
The sample in XPCOM Changes in Gecko 2.0 is too simple to understand.
<<

jorge-villalobos

AMO Administrator

Posts: 3005

Joined: Tue Sep 29, 2009 7:30 pm

Location: San José, Costa Rica

Post Thu Jul 29, 2010 10:51 am

Re: Firefox 4 Compatibility

You will definitely need to use the new version of the SDK and compile your component against it. I haven't checked recently, but I think the SDK is still not available in binary form. You would need to compile the SDK from source first.
Keep in mind that Gecko is being "upgraded" to 2.0 with the purpose of changing interfaces that were previously considered as frozen. This means that some (or many) previous assumptions will be broken, and you'll need to be careful to verify everything is working correctly.
<<

tyunshan

Posts: 6

Joined: Tue Jul 20, 2010 7:19 pm

Post Fri Jul 30, 2010 2:41 am

Re: Firefox 4 Compatibility

jorge

Thanks. As you said the SDK is not ready and I will keep an eye on it.
I tried xulrunner-sdk-2.0b2pre but can not find the "ModuleUtils.h" header.
<<

webgapps

Posts: 100

Joined: Sun Jan 17, 2010 5:17 pm

Post Sat Jul 31, 2010 12:21 am

Re: Firefox 4 Compatibility

I'm experiencing issues with nsIAlertsService in 4.0b3pre. The problems doesn't happen on 4.0b2.

Whenever my function fires a showAlertNotification() after a copyTo() or a database operation the browser crashes.

Any changes I need to know about?
<<

webgapps

Posts: 100

Joined: Sun Jan 17, 2010 5:17 pm

Post Sun Aug 01, 2010 11:58 am

Re: Firefox 4 Compatibility

lovinglinux wrote:I'm experiencing issues with nsIAlertsService in 4.0b3pre. The problems doesn't happen on 4.0b2.

Whenever my function fires a showAlertNotification() after a copyTo() or a database operation the browser crashes.

Any changes I need to know about?


Never mind. Seems to be fixed on the latest build.
<<

webgapps

Posts: 100

Joined: Sun Jan 17, 2010 5:17 pm

Post Tue Aug 03, 2010 6:53 pm

Re: Firefox 4 Compatibility

I just received the latest Add-ons Review Update and saw this:

>> From Matthew Wilson: after being deprecated for a while, the nsIPref interface has been removed.

Does this means the following code won't work?

  Code:
   this.prefs = Components.classes["@mozilla.org/preferences-service;1"]
      .getService(Components.interfaces.nsIPrefService)
      .getBranch("extensions.checkit.");


In which version this is going to happen?
<<

jorge-villalobos

AMO Administrator

Posts: 3005

Joined: Tue Sep 29, 2009 7:30 pm

Location: San José, Costa Rica

Post Wed Aug 04, 2010 8:01 am

Re: Firefox 4 Compatibility

That should work fine. It's nsIPref, not nsIPrefService, which seems to be gone. Nobody should be using this interface unless they based their code on some very old documentation.
<<

webgapps

Posts: 100

Joined: Sun Jan 17, 2010 5:17 pm

Post Wed Aug 04, 2010 8:23 am

Re: Firefox 4 Compatibility

jorge villalobos (jorgev) wrote:That should work fine. It's nsIPref, not nsIPrefService, which seems to be gone. Nobody should be using this interface unless they based their code on some very old documentation.


Thanks a lot. That's very reassuring. Indeed I couldn't find any documentation about nsIPref, so I assumed it was about nsIPrefService.
<<

idevfh

Posts: 128

Joined: Thu Oct 29, 2009 8:22 am

Post Fri Aug 06, 2010 8:23 am

Re: Firefox 4 Compatibility

Hi,

jorge villalobos Quote:
That should work fine. It's nsIPref, not nsIPrefService, which seems to be gone. Nobody should be using this interface unless they based their code on some very old documentation.


https://developer.mozilla.org/en/Code_s ... references
Their Quote:
It's worth noting that there also is an nsIPref interface. Despite it being used in some places, it is deprecated and should not be used.


Regards,
IDEVFH
<<

alfonsoml

Posts: 19

Joined: Wed May 26, 2010 1:03 pm

Post Mon Aug 09, 2010 8:09 am

Re: Firefox 4 Compatibility

A hint for other people and a suggestion:

I did notice in b1 that the context menu shown in the toolbar in our extension didn't look nice, it lacked the rounder borders but I thought that it was another glitch in that beta. The problem still existed in b2 so today I looked at it and finally trying to find someone else reporting similar problems with context menu I've found that this is the problem:
The popup element is no longer supported; you should use menupopup instead.

Yes, that's straight for the what's new doc, but I think that almost no one will notice or understand it and they might think that it's a problem in the beta as I initially thought (after all they are changing the look too much).

So the suggestion is:
Would it be possible in AMO to add in the extension checks a search for <popup and then fire a warning suggesting to use <menupopup instead?

Thanks
<<

brianfernandes

Posts: 3

Joined: Mon Aug 09, 2010 8:01 pm

Location: Pune, India

Post Mon Aug 09, 2010 9:03 pm

Re: Firefox 4 Compatibility

My FireBible extension (AMO/Hosted) is heavily dependent on Java. In Firefox 4 beta 2 and beta 4 pre however, I get a "java not defined error" when attempting to use the extension. Java applets work just fine in Firefox 4, so I know Java and the Java plugin are correctly installed, and the extension itself works without issue in Firefox 3.6.8.

Taking a step back from extensions, even something as simple as executing "javascript:alert(java)" in the address bar does not show the expected Java Object alert which appears in 3.6.

I have described the issue in more detail here and just found a bug covering this topic: Bug #563891 where some preliminary investigation has already been carried out.

If this issue is not addressed, I have no idea how to port my extension to Firefox 4.
Thanks!
<<

itamt

Posts: 4

Joined: Sat Jul 17, 2010 4:54 am

Post Mon Aug 30, 2010 4:54 pm

Re: Firefox 4 Compatibility

how to "getInstallLocation" of extension in Firefox 4?
<<

jorge-villalobos

AMO Administrator

Posts: 3005

Joined: Tue Sep 29, 2009 7:30 pm

Location: San José, Costa Rica

Post Mon Aug 30, 2010 5:33 pm

Re: Firefox 4 Compatibility

tamt wrote:how to "getInstallLocation" of extension in Firefox 4?


You can use the Directory Service to get the profile directory and navigate from there. For an example, see line 162 in this code file. The Add-ons Manager will not support that feature anymore, as far as I know.
<<

HarleyRider1958

Posts: 2

Joined: Wed Sep 01, 2010 7:40 am

Post Wed Sep 01, 2010 7:44 am

Re: Firefox 4 Compatibility

I like the new version, but I am not completely satisfied with it. I am encountering difficulties in adding extensions. When is Firefox going to address this issue. I need ad blocker, for sure.
<<

mkaply

Posts: 6

Joined: Thu Mar 25, 2010 8:45 pm

Post Thu Sep 02, 2010 7:43 am

Re: Firefox 4 Compatibility

jorge villalobos (jorgev) wrote:
tamt wrote:how to "getInstallLocation" of extension in Firefox 4?


You can use the Directory Service to get the profile directory and navigate from there. For an example, see line 162 in this code file. The Add-ons Manager will not support that feature anymore, as far as I know.


Please don't do it that way. Then it won't work if your add-on is installed anywhere but the profile directory.

Here's some code that does what you want with the new Addons manager:
  Code:
  Components.utils.import("resource://gre/modules/AddonManager.jsm"); 
  AddonManager.getAddonByID("YOUREXTENSIONID", function(addon) {
    var addonLocation = addon.getResourceURI("").QueryInterface(Components.interfaces.nsIFileURL).file;
  });

<<

stanislas-rolland

Posts: 3

Joined: Sat Sep 04, 2010 2:50 pm

Post Sat Sep 04, 2010 3:22 pm

Re: Firefox 4 Compatibility: installTrigger Issue

Hi,

After adjusting the maxVersion property of an Add-on hosted on the AMO site, installTrigger.install does not work in Firefox 4.0b4. The callback returns -228 and Firefox pops-up a message saying that the add-on could not be downloaded because the "(url of requesting site)" could not be accessed!

Yet , installTrigger.install still does work when requesting the same url in Firefox 3.6.8. And the Add-on can be installed in 4.0b4 when entering the url directly in the browser navigation bar.

Is this a bug or a new feature of Firefox 4?

Regards,
Stanislas Rolland
<<

jorge-villalobos

AMO Administrator

Posts: 3005

Joined: Tue Sep 29, 2009 7:30 pm

Location: San José, Costa Rica

Post Mon Sep 06, 2010 8:35 am

Re: Firefox 4 Compatibility

This can happen for a couple of hours while the add-on listing is updated. Can you please check again and tell us if you can reproduce the problem? Thanks.
<<

stanislas-rolland

Posts: 3

Joined: Sat Sep 04, 2010 2:50 pm

Post Tue Sep 07, 2010 7:50 pm

Re: Firefox 4 Compatibility

jorge villalobos (jorgev) wrote:This can happen for a couple of hours while the add-on listing is updated. Can you please check again and tell us if you can reproduce the problem? Thanks.


Yes, I can still reproduce the problem 3 days later.
<<

jorge-villalobos

AMO Administrator

Posts: 3005

Joined: Tue Sep 29, 2009 7:30 pm

Location: San José, Costa Rica

Post Wed Sep 08, 2010 8:13 am

Re: Firefox 4 Compatibility

It's probably related to this bug. Please add your input there if that's the case.
<<

matthias-schuetz

Posts: 1

Joined: Fri Sep 10, 2010 4:27 pm

Post Fri Sep 10, 2010 4:29 pm

Re: Firefox 4 Compatibility

Are there any news for this bug related to Java?
<<

jorge-villalobos

AMO Administrator

Posts: 3005

Joined: Tue Sep 29, 2009 7:30 pm

Location: San José, Costa Rica

Post Fri Sep 10, 2010 4:34 pm

Re: Firefox 4 Compatibility

The bug (and its duplicate) are both flagged as blocking the Firefox 4.0 release, so at the moment they're scheduled to be fixed in an upcoming beta, or even a release candidate. They're definitely not very high priority at the moment, judging by their activity. If you can include more useful information, the bug can progress faster. For example, you could try to identify the timeframe where the bug began to appear. Or you could also try to identify in the source code where the bug is occurring, and maybe suggest a patch. Otherwise you'll have to wait for somebody else to pay attention to it.
<<

brianfernandes

Posts: 3

Joined: Mon Aug 09, 2010 8:01 pm

Location: Pune, India

Post Fri Sep 10, 2010 10:37 pm

Re: Firefox 4 Compatibility

Jorge,

Regarding the Java issue, I first noticed it with FF 4 beta 1 which is when I first tried my extension. Urs already did some inspection which can be seen in comment #3 and pointed out that the bug had most likely been caused by bug #556849 which includes a patch with code modified. I have no experience with the Firefox code base so will not have the ability to help more with the code given the time left and especially with the magnitude of the changes that have possibly caused this issue (judging from the size of the patch in 573180).

This bug would certainly break all FF extensions that use Java, unfortunately I don't know how many extensions this affects. Even if there aren't too many extensions out now, I know how many options it makes available to Firefox extension developers and it would be a very sad thing indeed to see this capability die (in the near term at the very least) Would it be possible for you, in some way, to highlight the importance of this bug and the fact that it breaks extensions? A comment has already been made on bug #556849, but has elicited no response.

Thanks!
<<

jorge-villalobos

AMO Administrator

Posts: 3005

Joined: Tue Sep 29, 2009 7:30 pm

Location: San José, Costa Rica

Post Mon Sep 13, 2010 10:01 am

Re: Firefox 4 Compatibility

I added a comment, just to clarify the impact on extensions. Since the add-on is already flagged to be fixed on the betas, its importance is already clear. I'll make sure to keep track of the bug and get it fixed before 4.0 final.
<<

brianfernandes

Posts: 3

Joined: Mon Aug 09, 2010 8:01 pm

Location: Pune, India

Post Mon Sep 13, 2010 4:28 pm

Re: Firefox 4 Compatibility

Jorge,

Awesome, that's a big relief, thanks!
Next

Return to Extension Development

Who is online

Users browsing this forum: No registered users

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
CA Gen2 style designed by Vjacheslav Trushkin.