Closed Bug 1422665 Opened 6 years ago Closed 5 years ago

Firefox does not release WebExtension file even if canceling installation in local

Categories

(Toolkit :: Add-ons Manager, defect, P5)

Unspecified
Windows
defect

Tracking

()

RESOLVED DUPLICATE of bug 1473837

People

(Reporter: magicp.jp, Unassigned, Mentored)

Details

(Keywords: good-first-bug)

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0 ID:20171203220339

Steps to reproduce:
1. Save any WebExtensions in local
2. Launch Firefox on Windows
3. Go to about:addons
4. Install Add-on from file...
5. Select "Cancel" in addon-webext-permissions-notification
6. Delete its xpi file

Actual Results:
Cannot delete xpi file with below message until quit Firefox. Unreproducible for legacy extension file.
"The action can’t be completed because the file is open in another program"

Expected Results:
Can delete xpi file without any error messages.
I think this is just a matter of fixing the logic inside AddonInstall.cancel():
https://searchfox.org/mozilla-central/rev/f5f1c3f294f89cfd242c3af9eb2c40d19d5e04e7/toolkit/mozapps/extensions/internal/XPIInstall.jsm#1471

to call flushJarCache() in more cases.  We should limit it to cases when it is necessary, but go through the possible values of states and make sure all relevant states are covered.
Mentor: aswan
Component: WebExtensions: General → Add-ons Manager
Keywords: good-first-bug
Priority: -- → P5
I'm a student from coventry university studying an opensource module, I would like to be assigned this as my first bug! Could you please point me in the right direction of how to start
(In reply to Syed Ali from comment #2)
> I'm a student from coventry university studying an opensource module, I
> would like to be assigned this as my first bug! Could you please point me in
> the right direction of how to start

Yes, thanks for your interest!
If you haven't already, you should start by downloading and building the Firefox source code:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Simple_Firefox_build

For this bug, using artifact builds is fine, which will save you quite a bit of time:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Artifact_builds

I briefly outline what I think needs to be done above in comment 1, please feel free to ask any questions as they come up.  And please set the needinfo flag when you do to make sure I see the question.
Hi I'm a student from the University of Toronto, I'd love to try and tackle this bug!
Flags: needinfo?(aswan)
Hi Mack, welcome and thanks for your interest.  The notes from the comments above should still apply, please let me know if you have any questions.
Flags: needinfo?(aswan)
I've found that the bug also occurs when you remove a just installed Addon
Steps to reproduce:
1. Save any WebExtensions in local
2. Launch Firefox on Windows
3. Go to about:addons
4. Install Add-on from file...
5. Remove Add-on
6. Try to delete its xpi file

Actual Results:
Cannot delete xpi file with below message until quit Firefox.
"The action can’t be completed because the file is open in another program"

Expected Results:
Can delete xpi file without any error messages.
I tried adding 'flushJarCache' code in every state I could think of and I still got the bug. Because it occurs even with Installed Add-ons, which is the case that uses 'flushJarCache', I wonder if the problem is bigger then that?

Any advice? Thanks! 
Mack
Flags: needinfo?(aswan)
Sorry for the slow reply.
I suspect that the scenario you're describing in comment 6 is different from the one originally reported in this bug.
When you say you "still got the bug", is that with the steps from comment 0 or those from comment 6?
Flags: needinfo?(aswan) → needinfo?(mack.heller)

Hi, I am Phoenix, a participant for the current Outreachy round.
I would like to work on this, do we need a complete build for this, or will an artefact build suffice?
Also, I am new to mozilla codebase, so I might need help :)

Hi. First of all, if you're stuck on something, please put a clear question in a comment, then check the "Need more information" box at the bottom of this page and enter my name to make sure I know you're waiting for a response here.

The first step here is to reproduce the bug and confirm that it is still actually an issue, as described in earlier comments.

Flags: needinfo?(mack.heller)

Hi, I would like to contribute to this. Can you please assign it to me?

Hi Phoenix & Divya, thanks for your interest in this bug! Divya, Phoenix reached out and asked to work on this a few days ago. Could I interest you in working on one of our other good-first-bugs? https://mzl.la/2yq1XA8

Phoenix, our contribution onramp will answer your questions about builds and navigating the codebase: https://wiki.mozilla.org/WebExtensions/Contribution_Onramp

As a side note: the WebExtensions team doesn't have a project for Outreachy Summer 2019. :/ If you could email me at cneiman@mozilla.com and let me know which project(s) you are interested in, I can try to direct you to those project mentors.

(In reply to Caitlin Neiman [:caitmuenster] from comment #12)

Hi Phoenix & Divya, thanks for your interest in this bug! Divya, Phoenix reached out and asked to work on this a few days ago. Could I interest you in working on one of our other good-first-bugs? https://mzl.la/2yq1XA8

Phoenix, our contribution onramp will answer your questions about builds and navigating the codebase: https://wiki.mozilla.org/WebExtensions/Contribution_Onramp

As a side note: the WebExtensions team doesn't have a project for Outreachy Summer 2019. :/ If you could email me at cneiman@mozilla.com and let me know which project(s) you are interested in, I can try to direct you to those project mentors.

Hi Caitlin,
Actually I already got an issue to work with.
So, if Divya is still interested you can assign this bug to her while I work on the currently assigned bug :)

Flags: needinfo?(cneiman)

Excellent! :) Divya, want to get started on this? :)

Flags: needinfo?(cneiman) → needinfo?(divyabaid16)

Yes, I am ready to solve this.

Flags: needinfo?(divyabaid16)

(In reply to Caitlin Neiman [:caitmuenster] from comment #14)

Excellent! :) Divya, want to get started on this? :)

Yes, sure!

Assignee: nobody → divyabaid16

Hey Divya, how is it going with this bug?

Flags: needinfo?(divyabaid16)

Hi Divya, we're going to unassign you from this bug to open it up to other folks.

We'll re-assign this bug to a contributor once they open a patch.

Assignee: divyabaid16 → nobody
Flags: needinfo?(divyabaid16)
Mentor: aswan → tomica

This looks like the exact same underlying issue that we recently fixed as part of Bug 1473837 (landed in 70 and uplifted to 69), and so I'm closing this as a duplicate.

(:zombie, feel free to reopen if you have looked into it and you think that it is a separate issue from what Bug 1473837 has already fixed).

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.