This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 221325 - Chrome plugin can not be updated when installed from Chrome Web Store
Summary: Chrome plugin can not be updated when installed from Chrome Web Store
Status: VERIFIED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Extbrowser (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-02 09:57 UTC by Petr Jiricka
Modified: 2012-11-10 03:26 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2012-11-02 09:57:16 UTC
1. Assuming you installed a previous version of the Chrome plugin from the Chrome Web Store, using this procedure: http://jupiter.cz.oracle.com/wiki/view/Netbeans/ChromePluginWebStore (sorry for the Oracle internal link)
2. Use the same procedure to install the current version

=> The plugin page will say "Added to Chrome" and will not allow you to update to the latest version

The workaround is to delete the plugin from Chrome extensions - then you will be able to install the latest version.
Comment 1 Tomas Mysik 2012-11-02 10:12:19 UTC
I will have a look at it.
Comment 2 Tomas Mysik 2012-11-06 12:53:57 UTC
Strange, it works for me. I just updated NetBeans Connector extension from 0.6.1 to 0.6.2 without any problem. So, closing as WORKSFORME for now, let's wait for version 0.6.3 (see issue #221508 for more information), we will reopen this issue if it is still present.

Thanks.
Comment 3 Petr Jiricka 2012-11-06 14:05:21 UTC
Still happens for me :-(

Another workaround is to:
1. Go to Chrome extensions page
2. Check Developer Mode
3. Press Update extensions now

Tomas, what exact behavior do you see? When the IDE opens the extension page, does it say "Added to Chrome"? Does it automatically update to the latest version, or do you need to do some manual action to update it?
Comment 4 Tomas Mysik 2012-11-06 14:14:05 UTC
I did exactly the steps you have mentioned - that is why I did not see any problem I guess. Well, to reproduce, I have to wait for new version of the extension and let Chrome itself update it (feel free to increase the version and upload it).

Thanks.
Comment 5 Tomas Mysik 2012-11-06 14:17:29 UTC
(In reply to comment #3)
> When the IDE opens the extension page,

How can I do that? What are the steps please?

> Does it automatically update to the latest
> version

Have to wait for the new version of extension.

> or do you need to do some manual action to update it?

I updated it manually using the steps you described.
Comment 6 Petr Jiricka 2012-11-06 16:29:32 UTC
> How can I do that? What are the steps please?

http://jupiter.cz.oracle.com/wiki/view/Netbeans/ChromePluginWebStore

I uploaded version 0.6.3.1 (higher than the current version in sources) so this can be tested.
Comment 7 Tomas Mysik 2012-11-06 17:11:52 UTC
Yes, you are right. The Chrome Web Store says "Added to Chrome" and did not say anything about newer version available. I tried to restart the Chrome - but no effect. I tried to search the web and found this official info [1] - we should not do anything special, our extension should be updated automatically. Couldn't this be issue just of "invisible" (hidden, private) extensions? It seems that "Chrome checks every few hours if extension updates are available" [2]. From this Google group [3], it seems that the update should be done automatically in a few hours.

[1] http://developer.chrome.com/extensions/autoupdate.html
[2] http://www.ghacks.net/2010/08/20/how-is-google-chrome-handling-extension-updates/
[3] http://productforums.google.com/forum/#!topic/chrome/KwF994PEZ-c
Comment 8 Tomas Mysik 2012-11-07 05:21:24 UTC
FYI, today, my Chrome has been updated to version 23.0.1271.64 (from 22.x) - after the start, I still have our plugin in version 0.6.3 and not 0.6.3.1.
Comment 9 Tomas Mysik 2012-11-07 06:45:27 UTC
FYI I tried to start Chrome with a clean userdir, login to my Google account and after about 10 minutes my extensions were synchronized (I synchronize everything) - I got our extension in version 0.6.3.1.
Comment 10 Petr Jiricka 2012-11-07 21:42:12 UTC
Could the problem be that we don't include update_url in the manifest (see link [1] in comment 7)? I.e. if you install the extension from local filesystem, then the extension does not know where to check for updates. Also notice that in the Chrome extensions page, the plugin installed from filesystem does not have the "Visit website" link, which the plugins installed from web store have.

In any case, I would do no harm to include update_url, no?
Comment 11 Tomas Mysik 2012-11-08 05:46:59 UTC
Good catch, I will add it to the manifest.
Comment 12 Tomas Mysik 2012-11-08 06:08:49 UTC
(In reply to comment #11)
> Good catch, I will add it to the manifest.

Hmm, seems to be not possible to add update_url to the manifest according [1]:

"A manifest may contain an "update_url" field, pointing to a location for doing update checks.
The content returned by an update check is an update manifest XML document listing the latest version of an extension."

In any case, I will add homepage_url [2].

[1] http://developer.chrome.com/extensions/autoupdate.html
[2] http://developer.chrome.com/extensions/manifest.html#homepage_url
Comment 13 Tomas Mysik 2012-11-08 06:21:39 UTC
(In reply to comment #12)
> In any case, I will add homepage_url [2].

Done, version increased to 06.4. Petře, upload please this new version to Web Store to verify that the homepage_url can be present in the manifest (I do not expect any problems).

http://hg.netbeans.org/web-main/rev/0e23b559ed40

To the update problem - I still think that the cause could be (see my comment #7):

> Couldn't this be issue just of "invisible" (hidden, private) extensions?

Are there any possibility to ask Google?
Comment 14 Petr Jiricka 2012-11-08 15:21:56 UTC
Ok, I published 0.6.4 and then also 0.6.4.1 as an artificial update for testing. But adding homepage_url did not resolve the problem for me.

> Are there any possibility to ask Google?

Can you please do that on their forums? Basically we need to force an update of the plugin in both cases - whether it was originally installed from filesystem or from web store.
One other option - would it be possible for the plugin to request an update of itself? If so, we may be able to do it as a part of the IDE-plugin handshake.
Comment 15 Quality Engineering 2012-11-09 02:49:44 UTC
Integrated into 'main-golden', will be available in build *201211090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/0e23b559ed40
User: Tomas Mysik <tmysik@netbeans.org>
Log: #221325 - Chrome plugin can not be updated when installed from Chrome Web Store

Homepage URL added.
Comment 16 Tomas Mysik 2012-11-09 06:10:29 UTC
(In reply to comment #14)
> Can you please do that on their forums?

http://productforums.google.com/forum/#!mydiscussions/chrome/rhBMocL226A
Comment 17 Petr Jiricka 2012-11-09 08:36:58 UTC
Thanks. 
One other comment:

> after about 10 minutes my extensions were synchronized

For me, the plugin was updated to the latest version (0.6.4.1) overnight automatically (maybe the homepage_url helped?). So do you think we can rely on the plugin being updated eventually at some point?

If so, and if we get a negative answer on the Chrome forums regarding the ability to force the update, then I guess the solution could be to just ask users to do manual update using "Update extensions now". After FCS this situation will happen very rarely, so I think that solution is ok.
Comment 18 Tomas Mysik 2012-11-09 09:12:13 UTC
(In reply to comment #17)
> For me, the plugin was updated to the latest version (0.6.4.1) overnight
> automatically (maybe the homepage_url helped?). So do you think we can rely on
> the plugin being updated eventually at some point?

It seems so, at least from the official documentation. BTW I am still on 0.6.4 but I am not sure whether I have installed it from Web Store or manually...

> If so, and if we get a negative answer on the Chrome forums regarding the
> ability to force the update, then I guess the solution could be to just ask
> users to do manual update using "Update extensions now". After FCS this
> situation will happen very rarely, so I think that solution is ok.

Yes, I would definitely add a sentence about manual update to our dialogs. Also, let's wait for an answer on the Chrome forum - I hope we get any.

So, if there are no objections, I would add to both our dialogs something like:

"If the NetBeans Connector is already installed, try to update it manually via 'Update extensions now' button on Chrome extensions page ('Developer Mode' must be checked)."

Please, could anyone improve the wording?

Thanks.
Comment 19 Tomas Mysik 2012-11-09 10:02:05 UTC
(In reply to comment #18)
> So, if there are no objections, I would add to both our dialogs something like:
> 
> "If the NetBeans Connector is already installed, try to update it manually via
> 'Update extensions now' button on Chrome extensions page ('Developer Mode' must
> be checked)."

And we could also add button "Update now" with those instructions to the extension Options (this button would just open Chrome Extensions page).

Thanks.
Comment 20 Petr Jiricka 2012-11-09 10:19:20 UTC
Regarding "both our dialogs" - I think that's not needed, it's just the dialog that appears when it detects that the plugin version is out of date and has the "Go to Chrome Web Store" button.

This dialog should change - the "Go to Chrome Web Store" button is not needed, because you can not do any useful action from the plugin page in web store. 

Maybe this dialog could be laid out in a similar way as the "install locally" dialog, i.e. instructions in the text area including a link that takes the user to the Chrome Extensions page, and at the bottom there would be a "Yes, the plugin is updated now" button.

> we could also add button "Update now"

That's a possibility, but this solution has the disadvantage that users may just click the button without reading the instructions properly, and then they would not know what to do on the Extensions page.
Comment 21 Tomas Mysik 2012-11-09 11:35:25 UTC
(In reply to comment #20)
> text area including a link that takes the user
> to the Chrome Extensions page

Unfortunately, this seems to me to be not possible [1]; otherwise implemented, please verify.

http://hg.netbeans.org/web-main/rev/5bbbd17f9941

BTW I just installed CRX file manually and updated it from Web Store (via the Update button) so I think we can close this issue.

Thanks.
[1]  chrome://chrome/extensions/ -> java.net.MalformedURLException: unknown protocol: chrome
Comment 22 Petr Jiricka 2012-11-09 15:59:58 UTC
Thanks, works for me now.
Comment 23 Quality Engineering 2012-11-10 03:26:02 UTC
Integrated into 'main-golden', will be available in build *201211100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5bbbd17f9941
User: Tomas Mysik <tmysik@netbeans.org>
Log: #221325 - Chrome plugin can not be updated when installed from Chrome Web Store