Skip to content
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

Scripts being deleted when updated #2274

Closed
silverwind opened this issue Sep 15, 2015 · 15 comments
Closed

Scripts being deleted when updated #2274

silverwind opened this issue Sep 15, 2015 · 15 comments
Milestone

Comments

@silverwind
Copy link
Contributor

Since 3.4, when I increment the version of a script like this and run the manual update check, I see a download bar and then the script seems to be deleted from the user's list with no way to restore, except a manual reinstallation.

When it happens a TypeError: oldItem is null is shown in the error console, pointing to this line.

@silverwind
Copy link
Contributor Author

In case it matters: test.meta.js is symlinked to test.user.js on the server.

@janekptacijarabaci
Copy link
Contributor

In case it matters: test.meta.js is symlinked to test.user.js on the server.

  • This setting has no effect.

Confirmed on:
GM 3.4

Not confirmed on:
GM 3.4beta3-

The problem is that commit: 47fac82

P.S. This probably is not good:
arantius@ed61cac#diff-4f75402aea01b39c35f95610c9571405R199
(this._script => script)

@silverwind
Copy link
Contributor Author

Also, for what it's worth: If I try to reinstall the script, I can't get past the installation popup and the TypeError is seen on every click of the 'Install' button.

@janekptacijarabaci
Copy link
Contributor

You must manually edit the file config.xml in the Firefox profile (and "gm_scripts") folder.
Delete this section: <Script basedir="null"...</Script>
(Firefox must be closed)

@arantius arantius added this to the 3.5 milestone Sep 15, 2015
@janekptacijarabaci
Copy link
Contributor

One option might be to quickly release a new version, e.g. 3.4.1. But it's just a suggestion...

@arantius
Copy link
Collaborator

Error seen in console:

1442434265425   addons.manager  WARN    InstallListener threw exception when calling onInstallStarted: TypeError: install.addon is null (resource:///modules/experiments/Experiments.jsm:871:1) JS Stack trace: 
Experiments.Experiments.prototype.onInstallStarted@Experiments.jsm:871:1 
< AMI_callInstallListeners@AddonManager.jsm:1744:15 
< AMP_callInstallListeners@AddonManager.jsm:2724:1 
< ScriptInstall.prototype.install/<@addons4.js:307:1 
< hitch/<@hitch.js:27:12 
< RemoteScript.prototype._downloadDependencies/<@remoteScript.js:527:7 
< hitch/<@hitch.js:27:12 
< timeout/observer.observe@timeout.js:17:7

@arantius
Copy link
Collaborator

I'm not seeing the same failure. Can someone produce a detailed set of steps to reproduce please?

@arantius
Copy link
Collaborator

Ah, possibly the same error, different STR:

  1. Open any page with a link to a user script.
  2. Open a separate window to the AOM.
  3. Install the script.
  4. Install the script a second time.

Step 4 implicitly uninstalls the existing script, to install the second copy. Update does effectively the same thing. Seems to trigger this issue. In the console:

TypeError: oldItem is null
observer_notifyEvent()     addons4-overlay.js:100
Config.prototype._notifyObservers()     config.js:39
Config.prototype._changed()     config.js:48
Config.prototype.install()     config.js:164
RemoteScript.prototype.install()     remoteScript.js:359
onOk()     install.js:77
anonymous()     dialog.xml line 375 > Function:1
_fireButtonEvent()     dialog.xml:376
_doButtonCommand()     dialog.xml:344
_handleButtonCommand()     dialog.xml:332

arantius added a commit to arantius/greasemonkey that referenced this issue Sep 16, 2015
@arantius
Copy link
Collaborator

Please confirm if 3.4.1beta1 ( https://addons.mozilla.org/firefox/downloads/file/352222/greasemonkey-3.4.1beta1-fx.xpi?src=devhub ) fixes this for you or not.

@janekptacijarabaci
Copy link
Contributor

The original bug is fixed - for me.

This problem persists:
#2274 (comment)
...but, this doesn't apply to this version (GM 3.4).
Firefox 40.0.0 - 43.0a1 (2015-09-16)
GM 2.1.1 - 3.4.1beta1
...this error is still present for me.
Not confirmed on:
Firefox 39.0.3-

@janekptacijarabaci
Copy link
Contributor

Unfortunately, I found another problem (if just one script is installed):

Confirmed on:
3.4.1beta1

1

Not confirmed on:
3.4beta3-

2

One option might be:

case 'uninstall'
...
setEmptyWarningVisible();
case 'install'
...
setEmptyWarningVisible();

and insert it (setEmptyWarningVisible();) after statement switch{}

@arantius
Copy link
Collaborator

Did 3b621bc just after cutting the build for this fix.

@arantius arantius modified the milestones: 3.4.1, 3.5 Sep 17, 2015
@arantius
Copy link
Collaborator

@janekptacijarabaci I really appreciate all the effort you put in, but wow you're hard to understand sometimes! I'm going to take "The original bug is fixed - for me." to mean it's worth moving forward with this dot release.

As far as the "just one script" thing you've mentioned just above, please report a distinct issue. And please include steps to reproduce; I don't know how to trigger it.

@arantius
Copy link
Collaborator

Pushing 3.4.1 release with just this fix now.

@silverwind
Copy link
Contributor Author

The fix looks to be working, thanks for the quick turnaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants