Opened 8 years ago
Closed 7 years ago
#897 closed defect (fixed)
Check for outdated plugins is broken
Reported by: | killyourtv | Owned by: | zzz |
---|---|---|---|
Priority: | minor | Milestone: | 0.9.7 |
Component: | apps/plugins | Version: | 0.9.5 |
Keywords: | Cc: | killyourtv | |
Parent Tickets: | Sensitive: | no |
Description
Steps to reproduce:
- Have an old plugin version installed for which there is an updated version available remotely. In my case it was i2pbote 0.2.7-b129 (upstream version is 0.2.8-b132).
- Go to http://127.0.0.1:7657/configclients. Click the Check for Updates button for i2pbote.
Result: Checking plugin i2pbote for updates and immediately on the sidebar: No new version is available for plugin i2pbote.
Expected result: Plugin update found
The remote site has been accessible during this testing. Using a script like the following the correct plugin version is found.
#!/bin/sh -e TZ=UTC EEPPROXY='127.0.0.1:4444' I2P=/usr/share/i2p SOURCES=" \ http://tjgidoycrw6s3guetge3kvrvynppqjmvqsosmtbmgqasa6vmsf6a.b32.i2p/i2pbote.xpi2p \ " trap 'rm -rf $TMPDIR; exit' 0 1 2 15 TMPDIR=$(mktemp -d) cd $TMPDIR for plugin in $SOURCES; do echo -n "checking version of $plugin ..." FILE=`basename $plugin` if java -cp $I2P/lib/i2p.jar net.i2p.util.PartialEepGet -p $EEPPROXY $plugin > /dev/null 2>&1; then tail -c +41 $FILE; echo else echo "*** failed to fetch $plugin" fi rm -f $FILE done
e.g.
$ ./botecheck checking version of http://tjgidoycrw6s3guetge3kvrvynppqjmvqsosmtbmgqasa6vmsf6a.b32.i2p/i2pbote.xpi2p ...0.2.8-b132
Subtickets
Change History (6)
comment:1 Changed 8 years ago by
Summary: | Manual plugin check possibly broken → Check for outdated plugins appears to be broken |
---|
comment:2 Changed 8 years ago by
Cc: | killyourtv added |
---|
comment:3 Changed 8 years ago by
Milestone: | → 0.9.7 |
---|---|
Priority: | minor → major |
Summary: | Check for outdated plugins appears to be broken → Check for outdated plugins is broken |
Version: | 0.9.4 → 0.9.5 |
Still a problem with 0.9.6.
comment:4 Changed 8 years ago by
Owner: | set to zzz |
---|---|
Status: | new → accepted |
re: not finding an update (OP)
It looks like a bug.
re: updating when it shouldn't (comment 1):
The "Update" button on /configclients unconditionally downloads (w/o checking the .xpi2p version in the header with eephead), then extracts to a temp dir and does sanity in version checks. If newer, it then extracts the zip again to ~/.i2p/plugins. So you'll see one or two sets of extract messages in wrapper.log.
When I tried updating an already-up-to-date zzzot plugin, I got the following in the router log:
WARN [onsole Jetty] er.update.ConsoleUpdateManager: Install plugin: zzzot VersionAvailable "" {HTTP=[http://stats.i2p/i2p/plugins/zzzot-update.xpi2p]} INFO [onsole Jetty] er.update.ConsoleUpdateManager: Starting RegisteredUpdater net.i2p.router.update.PluginUpdateHandler for PLUGIN HTTP @pri 0 WARN [pdate Runner] er.update.ConsoleUpdateManager: Failed net.i2p.router.update.PluginUpdateRunner PLUGIN zzzot HTTP http://stats.i2p/i2p/plugins/zzzot-update.xpi2p for PLUGIN: <b>Downloaded plugin version 0.10.0-b1 is not newer than installed plugin</b> WARN [pdate Runner] er.update.ConsoleUpdateManager: Nothing left to try for: UpdateItem PLUGIN zzzot
… and a "transfer failed from stats.i2p/…" in the console summary bar. Which isn't the best message.
IIRC the unconditional download behavior has been that way since the beginning.
So you're getting confused by the wrapper.log messages when it extracts to a temp dir. Perhaps we should hide that?
And should we check the header before downloading the whole thing?
comment:5 Changed 8 years ago by
Priority: | major → minor |
---|
OP fixed in 0.9.6-15-rc 8ba9ef85b8131d36e36b95a59bd7831bba50be8d, it was broken since the beginning of the new update subsystem (0.9.4). I think it may have been checking the plugin version against the router version. Not sure how it got missed.
Also in that rev, reduce the logging in FileUtil?.extractZip() by default, and don't log at all when extracting the xpi2p file to the temp dir.
Leaving ticket open to consider whether to have the update button check the version before downloading. Reducing to minor.
comment:6 Changed 7 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
No, not checking. Closing as fixed in 0.9.7.
I don't know if the automatic check when a new -0 I2P release is installed works. For some reason I had plugin updating disabled in /configadvanced. I don't remember setting that but apparently I did at one time. <shrug>
Clicking "Update all installed plugins" gave the appearance of checking the plugins but it did not find the updated I2PBote plugin.
Clicking the update button for the plugin on /configclients will update the plugin but it appears to unconditionally update. For example:
For the heck of it I clicked update again:
That was for the JAMWiki plugin, a plugin for which there is no updated version.
Also, when I clicked the update button for i2pbote it appeared to extract the plugin twice:
I only clicked the Update button once.