Closed Bug 1341011 Opened 3 years ago Closed 3 years ago

”Undefined” message in installation pop-up while installing locally from about:addons

Categories

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

defect
Not set
minor

Tracking

()

VERIFIED FIXED
mozilla55
Tracking Status
firefox51 --- unaffected
firefox52 --- unaffected
firefox-esr52 --- unaffected
firefox53 --- verified
firefox54 --- verified
firefox55 --- verified

People

(Reporter: vasilica.mihasca, Assigned: aswan)

References

Details

(Keywords: regression, Whiteboard: investigating)

Attachments

(1 file)

[Affected versions]:
Firefox 54.0a1 (2017-02-19)
Firefox 53.0a2 (2017-02-20)

[Affected platforms]:
Windows 10 64-bit
Ubuntu 16.04 32-bit


[Steps to reproduce]:
1.Launch Firefox with clean profile.
2.Navigate to about:addons.
3.Install via drag&drop or using “Install Add-on from file” option any legacy add-on. 


[Expected Results]:
Remove “Undefined” word from installation pop-up while installing locally via about:addons.

[Actual Results]:
See screenshots: 
  - https://www.screencast.com/t/m7x5k7Z279BX
  - https://www.screencast.com/t/eMTOivB2

[Regression Range]:
Last good revision: b14520ebf7cc599f73adba54b3d74e8b61ebf213
First bad revision: 4afc167417876569e9e317a44ad41fa9da5c8177
Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=b14520ebf7cc599f73adba54b3d74e8b61ebf213&tochange=4afc167417876569e9e317a44ad41fa9da5c8177

Looks like the following bug has the changes which introduced the regression:
https://bugzilla.mozilla.org/show_bug.cgi?id=1323129
The install calls for drag and drop and from the AOM menu to install from file both pass document.documentURI which gets used as displayURI which gets used as origin in the popup in the end. Because the documentURI for the AOM is about:addons, the uri is not a nsIFileURL and also doesn't have a hostPort, so "undefined" gets shown:
https://dxr.mozilla.org/mozilla-central/rev/32dcdde1fc64fc39a9065dc4218265dbc727673f/toolkit/mozapps/extensions/content/extensions.js#3964
https://dxr.mozilla.org/mozilla-central/rev/5069348353f8fc1121e632e3208da33900627214/toolkit/modules/PopupNotifications.jsm#779-788
Flags: needinfo?(aswan)
Whiteboard: investigating
The problem here is that originatingURI is supposed to be an nsIURI but we're passing in a string.  I am unpleasantly surprised to discover that this regression was added a few months ago but never caught by any tests.  The attached patch is the quick&dirty fix, I'd like to get some testing added before landing this.
Assignee: nobody → aswan
Flags: needinfo?(aswan)
Duplicate of this bug: 1344693
andrew - is this ready to land, and will it be upliftable to 53?  Thanks
Flags: needinfo?(aswan)
Upon further consideration, I'm not sure how useful a test here will be so lets go with this as is.
Flags: needinfo?(aswan)
Attachment #8842743 - Flags: review?(dtownsend)
Comment on attachment 8842743 [details]
Bug 1341011 Pass uri objects in originatingURI for addon install notifications

https://reviewboard.mozilla.org/r/116506/#review123552
Attachment #8842743 - Flags: review?(dtownsend) → review+
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again.

hg error in cmd: hg rebase -s d2512deb0bd2 -d 24631a2250f7: rebasing 382671:d2512deb0bd2 "Bug 1341011 Pass uri objects in originatingURI for addon install notifications r=mossop" (tip)
merging toolkit/mozapps/extensions/content/extensions.js
warning: conflicts while merging toolkit/mozapps/extensions/content/extensions.js! (edit, then use 'hg resolve --mark')
unresolved conflicts (see hg resolve, then hg rebase --continue)
Pushed by aswan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9ef832b5f02e
Pass uri objects in originatingURI for addon install notifications r=mossop
https://hg.mozilla.org/mozilla-central/rev/9ef832b5f02e
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
Duplicate of this bug: 1348590
Verified as fixed on Firefox 55.0a1 (2017-03-20) under Windows 10 64-bit, Ubuntu 16.04 32-bit and Mac Os X 10.12.1. “Undefined” message is no longer displayed in installation pop-up https://www.screencast.com/t/1BGmBmEjQUa
Status: RESOLVED → VERIFIED
Please request Aurora/Beta approval on this when you get a chance.
Flags: needinfo?(aswan)
Comment on attachment 8842743 [details]
Bug 1341011 Pass uri objects in originatingURI for addon install notifications

Approval Request Comment
[Feature/Bug causing the regression]:
Bug 1323129

[User impact if declined]:
User interface glitch during local add-on installation

[Is this code covered by automated tests?]:
no

[Has the fix been verified in Nightly?]:
yes (see comment 13)

[Needs manual test from QE? If yes, steps to reproduce]: 
see above

[List of other uplifts needed for the feature/fix]:
none

[Is the change risky?]:
[Why is the change risky/not risky?]:
no, the changes are in code that only runs during local add-on installs, and that operation has been tested.

[String changes made/needed]:
none
Flags: needinfo?(aswan)
Attachment #8842743 - Flags: approval-mozilla-beta?
Attachment #8842743 - Flags: approval-mozilla-aurora?
Comment on attachment 8842743 [details]
Bug 1341011 Pass uri objects in originatingURI for addon install notifications

Fix a regression related to installing addon from file and was verified. Aurora54+ & Beta53+.
Attachment #8842743 - Flags: approval-mozilla-beta?
Attachment #8842743 - Flags: approval-mozilla-beta+
Attachment #8842743 - Flags: approval-mozilla-aurora?
Attachment #8842743 - Flags: approval-mozilla-aurora+
need rebasing for beta:

grafting 406791:81032f42c222 "Bug 1341011 Pass uri objects in originatingURI for addon install notifications r=mossop a=gchang"
merging toolkit/mozapps/extensions/content/extensions.js
warning: conflicts while merging toolkit/mozapps/extensions/content/extensions.js! (edit, then use 'hg resolve --mark')
abort: unresolved conflicts, can't continue
(use 'hg resolve' and 'hg graft --continue')
Flags: needinfo?(aswan)
Confirm that this issue is fixed on Firefox 54.0a2 (2017-03-28) and Firefox 53.0b7 (20170327081421) under Windows 10 64-bit, Ubuntu 16.04 32-bit and Mac Os X 10.12.1: https://www.screencast.com/t/Q02aqeEe7l
You need to log in before you can comment on or make changes to this bug.