New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when trying to undo pending uninstall of a script #1898
Comments
Works for me in |
Confirmed in |
Ah, sorry, I knew I forgot something: |
Also WFM in For those with a confirmed failure, is this in a clean profile? If not, can you please try in one? |
Tried it in a clean profile with only current git HEAD of Greasemonkey installed on |
Can't reproduce this anymore in |
Actually, nevermind, I can still reproduce this - but only when uninstalling/restoring an enabled script (which makes sense, as the error occurs when GM tries to re-enable the script). Maybe this was the reason why you had trouble reproducing this, Anthony? |
Steps to reproduce:
Instead of restoring the script, this triggers
TypeError: item.onEnabled is not a function
on addons4-overlay.js:69.It looks like when the observer is called after clicking the "undo" button, the element returned by
gListView.getListItemForID(addon.id)
is still anaddon-uninstalled
element (see http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/content/extensions.xml#1703), which doesn't have theonEnabled
/onDisabled
methods.Simply dropping the call doesn't seem to be enough either, as then trying to cancel the removal of a disabled script leads to the steps described in #1811. I'm not too familiar with the whole addon manager stuff, but I think this is because during the call to
uninstall
(http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/extensions/content/extensions.xml#1476), the manager setsaddon.userDisabled = false
and keeps the previous state in awasDisabled
attribute - but when cancelling the uninstallation, we never check that attribute, but instead simply assume it's enabled. Not sure why this isn't handled by the addon manager itself though.The text was updated successfully, but these errors were encountered: