Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 370086 - [Plugin] list.html: reload feature does not work.
Summary: [Plugin] list.html: reload feature does not work.
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.4   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 0.4 RC1   Edit
Assignee: Simon Kaegi CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-30 00:10 EST by John J. Barton CLA
Modified: 2012-01-30 16:42 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John J. Barton CLA 2012-01-30 00:10:38 EST
reload does not work, the Properties do not update.

0128-2050
Comment 1 Simon Kaegi CLA 2012-01-30 00:59:35 EST
I just tried this out with tonight's build ( I20120129-2230) and it seems to be working as far as I can see. Can you give me a bit more detail.

I've added a one hour time-out on plugin metadata in this build so am trying to more generally make sure we understand what's going on here. One thing to be aware of is that if the plugin.html does not return cache headers we might get the version from the browsers cache in which case we would not see things get updated. We're loading the plugin via IFrame so can only control the url and cannot even control the headers we send during the request for the plugin page.
Comment 2 John J. Barton CLA 2012-01-30 10:59:10 EST
I'm loading the plugin from Orion. I'll check but the headers usually contain Cache-Control no-cache.

The sequence copy-url, uninstall, install works.

Chrome 18-dev.
Comment 3 John J. Barton CLA 2012-01-30 13:56:33 EST
I verified that the no-cache header is on the plugin.js that does not update with reload.
Comment 4 John J. Barton CLA 2012-01-30 13:58:48 EST
When I clear the Net panel in Web Inspector and hit "reload", there are no entries added.
Comment 5 John J. Barton CLA 2012-01-30 14:14:12 EST
When I step in to: 

this._load = function(isInstall) {
		if (!_channel) {
			_channel = internalRegistry.connect(url, _responseHandler);
			window.setTimeout(function() {
				if (!_loaded) {
					if (!isInstall) {
						data = {};
						internalRegistry.updatePlugin(_self);
					}
					_deferredLoad.reject(new Error("Load timeout for plugin: " + url));
				}
			}, 15000);
		}
		return _deferredLoad.promise;
	};
	
_channel is defined, and we never execution updatePlugin.

If I set
_channel = undefined on entry, then the update happens.
Comment 6 Simon Kaegi CLA 2012-01-30 14:59:25 EST
Thanks John. I understand now.
Comment 7 Simon Kaegi CLA 2012-01-30 16:42:44 EST
Fixed. I've added an "update" command to Plugin that will aggressively try to update regardless if the plugin is already loaded.