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 215635 - Chrome NB plugin fails to install automatically
Summary: Chrome NB plugin fails to install automatically
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Extbrowser (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-17 15:32 UTC by lxlyons
Modified: 2012-09-03 12:57 UTC (History)
4 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 lxlyons 2012-07-17 15:32:19 UTC
Product Version: NetBeans IDE Dev (Build EaselCSS-337-on-20120716)
Java: 1.7.0; Java HotSpot(TM) 64-Bit Server VM 21.0-b17
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
JavaFX 2.2 build 16

0. Deleted old NB extension from Chrome.  Closed browser.
1. I created a simple HTML client project without a template including 1 index.html with a div.
2. Configured Chrome as my default browser.
3. Ran index.html using the Run toolbar button
4. Confirmed that I wanted the extension installed automatically

chrome opened four tabs:

1. first has error message "cannot find files/NetBeans
2. second has error message "cannot find easel"
3. third says cannot connect to server
4. fourth is file:///C:/Users/LXLYON~1.ST-/AppData/Local/Temp/blank8910926072091351814.html with no content
Comment 1 David Konecny 2012-07-18 23:43:05 UTC
Sounds like URL has space characters in it and got split into several URLs? "...Program files/NetBeans easel..."
Comment 2 Kenneth Ganfield 2012-07-26 17:32:56 UTC
I see a message that extensions can only be added from the Chrome Web Store. I also keep getting additional copies of the extension downloaded to the Download folder
Comment 3 Denis Anisimov 2012-08-09 13:40:20 UTC
I'm using the same OS and I don't see any problems with spaces in the path.
My Chrome version is 21.0.1180.75.

What is your Chrome version ?

(In reply to comment #2)
> I see a message that extensions can only be added from the Chrome Web Store. I
> also keep getting additional copies of the extension downloaded to the Download
> folder

That's the main and serious issue.
Recent Chrome version doesn't allow to install extensions via requesting URL.
See http://support.google.com/chrome_webstore/bin/answer.py?answer=2664769&p=crx_warning .
The only way to install third party extension is manual installation via 
customization UI tool.

Probably we should use Chrome Web Store to publish the plugin.
In the latter case there is no reason to bundle this plugin with NB.
But such approach will introduce internet connection presence requirement.

I don't see a bulletproof way to resolve the situation :(
Comment 4 lxlyons 2012-08-09 14:21:21 UTC
my version: 21.0.1180.75 m
Comment 5 Denis Anisimov 2012-08-09 14:43:37 UTC
(In reply to comment #4)
> my version: 21.0.1180.75 m

It's the same as mine.
So there is no need to investigate the original issue ( probably with spaces 
in the path ) : even with proper URL it will not work because of the 
security restrictions mentioned previously.
We need to solve it somehow in the other way.
Any suggestions ?
Comment 6 Petr Jiricka 2012-08-10 09:51:31 UTC
As discussed on the mailing list, the workaround is to open the Chrome Extensions window and drag & drop the plugin to this window. The only way to fix this I can think of is:

Distinguish between development builds and release builds (I believe there already is a IDE-wide switch which is on for dev+beta builds, and off for RC and FCS builds). 
- For development builds, change the plugin installation alert dialog to tell the user to install the plugin using the above workaround from $NB_HOME/ide/modules/ext/netbeans-ros-chrome-plugin.crx
- For release builds, point the user to Chrome web store and request installation from the web store if this is possible
(it would be useful to implement this second approach as well, using some other random plugin as a placeholder, so we have a proof of concept)

What do you think? Other ideas?
Comment 8 Denis Anisimov 2012-08-13 12:16:52 UTC
Installation dialog is changed :
web-main#24b9855ec001

Final plugin has to be uploaded to the Google Web Store.
Comment 9 Petr Jiricka 2012-08-13 15:32:07 UTC
Thanks - I tested using the latest build, and I noticed one minor issue: when you click the "locate" link in the information message, the browser displays the message that "Extensions, apps, and user scripts can only be added from the Chrome Web Store." Would it be better to just display the real location of the plugin inside the IDE installation, i.e. /real-path-to-nb/ide/modules/ext/netbeans-ros-chrome-plugin.crx, instead of the "locate" link?

For example: "The NetBeans Chrome extension needs to be manually installed to Chrome. To do it, open the open the Chrome Extensions page and drag file /real-path-to-nb/ide/modules/ext/netbeans-ros-chrome-plugin.crx to this page. See link for more details."

Ken, what do you think about this wording?
Comment 10 Denis Anisimov 2012-08-14 07:11:17 UTC
(In reply to comment #9)
> Thanks - I tested using the latest build, and I noticed one minor issue: when
> you click the "locate" link in the information message, the browser displays
> the message that "Extensions, apps, and user scripts can only be added from the
> Chrome Web Store." Would it be better to just display the real location of the
> plugin inside the IDE installation, i.e.
> /real-path-to-nb/ide/modules/ext/netbeans-ros-chrome-plugin.crx, instead of the
> "locate" link?
> 
No problem. Let's just agree about it.
I did a link because a file path looks too long and lowers readability 
from my point of view. 
Link allows to open local file path in the browser. You are right about message.
The best approach would be the opening some "file explorer" where user may locate 
the plugin and use it for DnD. But it is system dependent and browser gives some
emulation of it ( file is "downloaded" and it is possible to open its containing 
folder ).

I've just realized that we can use link path_to_the_containing_folder of 
the plugin along with its name as a text. It allows to view the browse folder 
content  and see the link into the file in the browser.
What do you think about this ?
Comment 11 Petr Jiricka 2012-08-14 08:11:38 UTC
> Link allows to open local file path in the browser. You are right about message.

Right, I am concerned that an error message should not be a part of the "supported" workflow.

> The best approach would be the opening some "file explorer"

I thought about this too, but given the complexity of this approach, I think this solution is too fancy for the problem we are trying to solve.

> It allows to view the browse folder content  and see the link into the file in the browser.
> What do you think about this ?

Sounds interesting, I think it's worth trying. Needs to be tested thoroughly on all platforms though.
Comment 12 Denis Anisimov 2012-08-14 10:08:34 UTC
web-main#e09280ca1682 : the location link is changed to the folder and file name 
is used int the text.
Comment 13 Denis Anisimov 2012-08-14 10:23:58 UTC
Some notices about Google Web Store:
1) Developer has to pay for publishing apps to web store.
A one-time developer registration fee of US$5.00 is required to verify your account and publish items.
2) Plugin should uses manifest version 2 :http://developer.chrome.com/extensions/manifest.html .
Jan, could you please change the manifest respectively new format ( please note 
that some elements are removed ( no "background_page" f.e. ).
3) I don't see a way to easy install the plugin via just URL request.
It requires some UI user action :
either 
- open a Web store and click on button to install the plugin.
or
- it is possible to use inline installation : https://developers.google.com/chrome/web-store/docs/inline_installation
So we can use our own web page and initiate installation from this page.
But it still requires some user involvement : function 
chrome.webstore.install(url, successCallback, failureCallback)
has to be called only on user UI explicit action ( f.e. click on button ).

Probably we can use generated interim HTML page to provide smth like a button 
( or use some NB site page ). But I'm not sure is it possible to initiate 
installation from  any site ( Google may require some predefined set of "certified" sites ).
So probably it is not valuable to use inline installation at all.
Comment 14 Petr Jiricka 2012-08-14 12:02:32 UTC
> web-main#e09280ca1682 

Thanks - works great for me on Mac. The only thing I would change in the message is "...drag the file onto the Chrome Extensions page." - to make it clear that the Extensions page is in Chrome, not in the IDE.

And thanks for the investigation of the Chrome Web Store. I must say I was expecting that some user action would be required and we can not do it completely silently. 

If we did the inline installation, then I think it would need to be from some page on netbeans.org and not from a generated temporary page, because of the verification/certification requirement.

I personally prefer the inline installation approach, for the following reasons:
- we can add some explanatory text to this page, which tells you why you should install the plugin. This can replace the pre-installation dialog in the IDE - we can open this page directly without notifying the user. If we used a link to Chrome Web Store, then we would still need a pre-installation dialog in the IDE, I think.
- We can make the UI of this page minimal, and focus the user's attention on the "Add to Chrome" button, whereas with the Chrome Web UI there is a lot of other disturbing UI elements that we can't remove.
- With our own page, I can imagine we could pass a redirect_url parameter to it, which would contain the page to redirect to after successful installation. This way, user's project could be opened automatically.

I would love to hear Liza's opinion on what should the installation workflow be.
Comment 15 Denis Anisimov 2012-08-14 12:39:26 UTC
(In reply to comment #14)
> > web-main#e09280ca1682 
> 
> Thanks - works great for me on Mac. The only thing I would change in the
> message is "...drag the file onto the Chrome Extensions page." - to make it
> clear that the Extensions page is in Chrome, not in the IDE.
web-main#c1a5ea1aef4b
> 
> And thanks for the investigation of the Chrome Web Store. I must say I was
> expecting that some user action would be required and we can not do it
> completely silently. 
> 
> If we did the inline installation, then I think it would need to be from some
> page on netbeans.org and not from a generated temporary page, because of the
> verification/certification requirement.
> 
> I personally prefer the inline installation approach, for the following
> reasons:
> - we can add some explanatory text to this page, which tells you why you should
> install the plugin. This can replace the pre-installation dialog in the IDE -
> we can open this page directly without notifying the user. If we used a link to
> Chrome Web Store, then we would still need a pre-installation dialog in the
> IDE, I think.
> - We can make the UI of this page minimal, and focus the user's attention on
> the "Add to Chrome" button, whereas with the Chrome Web UI there is a lot of
> other disturbing UI elements that we can't remove.
> - With our own page, I can imagine we could pass a redirect_url parameter to
> it, which would contain the page to redirect to after successful installation.
> This way, user's project could be opened automatically.

I agree with this reasons.
Comment 16 Petr Jiricka 2012-08-21 11:16:48 UTC
There is still a minor problem on Windows for me, which I filed as bug 217154.

Can this bug now be closed?
Comment 17 Denis Anisimov 2012-08-21 12:05:43 UTC
(In reply to comment #16)
> There is still a minor problem on Windows for me, which I filed as bug 217154.
> 
> Can this bug now be closed?

At the moment there is no other possibility to install the plugin.
If we consider the installation from Google Web store as separate issue 
then this bug might be closed.
Comment 18 Petr Jiricka 2012-08-21 12:11:21 UTC
Ok, I filed a separate bug 217160 for the Chrome web store and closing this as fixed.
Comment 19 Quality Engineering 2012-09-03 12:57:56 UTC
Integrated into 'main-golden', will be available in build *201209031048* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/24b9855ec001
User: Denis Anisimov <ads@netbeans.org>
Log: Information about Chrome plugin istallation issue is addded into the dialog as a first step fix for BZ#215635 - Chrome NB plugin fails to install automatically