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 254083 - 8.x doesn't recogize netbeans connector in chrome
Summary: 8.x doesn't recogize netbeans connector in chrome
Status: RESOLVED FIXED
Alias: None
Product: ide
Classification: Unclassified
Component: Extbrowser (show other bugs)
Version: 8.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Jan Stola
URL:
Keywords:
: 254558 254660 255004 255071 255077 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-08-02 19:57 UTC by Sergey Petrov
Modified: 2015-09-08 11:26 UTC (History)
9 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 Sergey Petrov 2015-08-02 19:57:18 UTC
Tried with NetBeans IDE 8.1 Beta (Build 201507302201)
and chrome Version 44.0.2403.125 (64-bit)

Tried to start html5 project, got a dialog about connector,
ok, located, added, press 'already have' - passed

some stepos like "close" may not be necessary, but
close nb, close chrome, open nb and try to start the project.
you'll see the dialog, you can't pass through the dialog by pressing "already installed"
Comment 1 Sergey Petrov 2015-08-02 20:34:13 UTC
I can find the connector on the disk without problems,
under ~/.config/google-chrome/Default/Extensions/hafd...jnaa/1.1.5_0/
Comment 2 Vladimir Riha 2015-08-02 21:25:27 UTC
Works for me, but I'm on 32b Ubuntu, I'll try 64b tomorrow. I've seen similar problem on StackOverflow few hours ago...

The extension detection is being done by looking for it in "JSON like" files in Chrome's profile folder. In my case the information is in

~/.config/google-chrome/Default/Preferences


Chrome Version 44.0.2403.125
Product Version: NetBeans IDE 8.1 Beta (Build 201508011000)
Java: 1.8.0_51; Java HotSpot(TM) Client VM 25.51-b03
Runtime: Java(TM) SE Runtime Environment 1.8.0_51-b16
System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
Comment 3 Sergey Petrov 2015-08-02 22:25:26 UTC
I have
..
["contextMenus","tabs","debugger","storage"],"version":"1.1.5"},"path":"hafdlehgocfcodbgjnpecfajgkeejnaa/1.1.5_0","preferences":
..

in .../Preferences

full details from nb About:
Product Version: NetBeans IDE 8.1 Beta (Build 201507302201)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Linux version 3.19.0-25-generic running on amd64; UTF-8; en_US (nb)
User directory: /home/name/.netbeans/8.1beta
Cache directory: /home/name/.cache/netbeans/8.1beta

Ubuntu 15.04/64 bit

if it may matter, it's full bundle installed with nb installer
Comment 4 Vladimir Riha 2015-08-03 07:01:00 UTC
Weird, it works for me in

Chrome Version 44.0.2403.125 (64-bit)
Product Version: NetBeans IDE 8.1 Beta (Build 201507302201)
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Linux version 3.16.0-30-generic running on amd64; UTF-8; en_US (nb)
Comment 5 Sergey Petrov 2015-08-03 08:32:20 UTC
unfortunately, there is nothing in message.log about this.

did you use ubuntu software center + google-chrome-stable_current_amd64.deb to install you chrome?

I've verified, it's broken on my system in 8.0.2 also, so it may not be a stopper for 8.1 beta
Comment 6 Jan Stola 2015-08-03 09:11:55 UTC
Sergey, as you are the only one who experiences this problem, could you, please, try to investigate it more in the debugger? The code that checks whether the Chrome extension is installed is in ChromeManagerAccessor.isInstalled() in extbrower.chrome module.

It would be great to find out what differs between the invocations of this method (i.e. between the first that claims that the extension is installed and the subsequent one that is unable to locate the extension). Thank you in advance.
Comment 7 Sergey Petrov 2015-08-03 11:50:10 UTC
ok, I'm cloning sources
Comment 8 Sergey Petrov 2015-08-03 18:11:03 UTC
so, if I install the extesion,
receiver got the even and have status 'isInstaler' set to true.
in the dialog

                    if ( receiver.isInstalled() ){
                        return true;
                    }

is used, definitely, if plugin is already installed but isn't detected properly this code doesn't return and next is used

                    ExtensitionStatus status = isInstalled();
                    if (status == ExtensitionStatus.INSTALLED){
                        return true;
                    }

but this code never return true in my case
Comment 9 Sergey Petrov 2015-08-03 18:20:53 UTC
fast fix for the issue:
--- a/<html>ChromeManagerAccessor.java (<b>Today 12:06:02 AM</b>)</html>
+++ b/<html><b>Current File</b></html>
@@ -316,6 +316,8 @@
                                         } else {
                                             guessDefault = true;
                                         }
+                                    } else {
+                                        guessDefault = true;
                                     }
                                 }
                             }
Comment 10 Jan Stola 2015-08-03 19:30:01 UTC
Thank you for the investigation. If I understand correctly then the 'profile' section of your 'Locale State' Chrome configuration file does not have the 'last_used' section. The patch that you proposed seems like a reasonable solution in this case. Feel free to push this change into the repository if it solves your problem.
Comment 11 Sergey Petrov 2015-08-03 20:20:18 UTC
Yes there is no last_used in the file.
Unfortunately, I wasn't able to clone neither web-main nor main,
clone is stuck at adding manifests step for few hours without any progress.
I evaluated the issue on zip sources.
Comment 12 Jan Stola 2015-08-03 20:22:46 UTC
(In reply to Sergey Petrov from comment #11)
> Yes there is no last_used in the file.
> Unfortunately, I wasn't able to clone neither web-main nor main,
> clone is stuck at adding manifests step for few hours without any progress.
> I evaluated the issue on zip sources.

OK, no problem. I can apply the proposed patch myself if you want.
Comment 13 Sergey Petrov 2015-08-03 20:37:50 UTC
yes, please apply the patch
Comment 14 Jan Stola 2015-08-04 09:13:07 UTC
Fixed by https://hg.netbeans.org/web-main/rev/722e055dbd5c
Comment 15 Quality Engineering 2015-08-05 01:19:44 UTC
Integrated into 'main-silver', will be available in build *201508050002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/722e055dbd5c
User: Jan Stola <jstola@netbeans.org>
Log: #254083: NetBeans Connector not recognized (profile section of Local State doesn't contain last_used field)
Comment 16 VixxFar 2015-08-07 12:00:04 UTC
*** Bug 254196 has been marked as a duplicate of this bug. ***
Comment 17 Jan Stola 2015-08-21 07:20:57 UTC
*** Bug 254558 has been marked as a duplicate of this bug. ***
Comment 18 Jan Stola 2015-08-24 14:32:38 UTC
*** Bug 254660 has been marked as a duplicate of this bug. ***
Comment 19 Quality Engineering 2015-09-01 18:07:05 UTC
Integrated into 'releases/release801', will be available in build *201509011645* or newer. Wait for official and publicly available build.

Changeset: http://hg.netbeans.org/releases/rev/ec6352b9f174
User: Jan Stola <jstola@netbeans.org>
Log: #254083: NetBeans Connector not recognized (profile section of Local State doesn't contain last_used field)
Comment 20 Jan Stola 2015-09-04 12:13:59 UTC
*** Bug 255004 has been marked as a duplicate of this bug. ***
Comment 21 Jan Stola 2015-09-08 09:46:38 UTC
*** Bug 255077 has been marked as a duplicate of this bug. ***
Comment 22 Jan Stola 2015-09-08 11:26:41 UTC
*** Bug 255071 has been marked as a duplicate of this bug. ***