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.
Created attachment 151038 [details] logfile Hello! I'm using Archlinux with a regular GNOME 3.14, so my keyring is provided through the Login and Seahorse. NetBeans fails, at least since "8.0.0" to use the keyring. As you can see in the provided logfile, NetBeans tries to use a obsolete or unknown environment variable "GNOME_KEYRING_" to check if Seahorse is active[1]. The usage of the variable(s) in NetBeans just looks like a addidional sanity check to avoid throwing exceptions[2]. I suggest merely removing this lines from the code to fix the issue: boolean envVarSet = false; for (String key : System.getenv().keySet()) { if (key.startsWith("GNOME_KEYRING_")) { // NOI18N envVarSet = true; break; } } if (!envVarSet) { LOG.fine("no GNOME_KEYRING_* environment variable set"); return false; } As temporary workaround I just exported a the variable "GNOME_KEYRING_": $ export GNOME_KEYRING_=foobar $ netbeans # passes now sanity check Thank you [1]http://ftp.gnome.org/pub/GNOME/sources/gnome-keyring/3.11/gnome-keyring-3.11.92.changes [2]http://opensourcejavaphp.net/java/netbeans/org/netbeans/modules/keyring/gnome/GnomeProvider.java.html
According to [1], the GNOME_KEYRING_* variables are not set anymore if XDG_RUNTIME_DIR is present (which is valid for most modern distros). As a workaround, one can export GNOME_KEYRING_CONTROL=$XDG_RUNTIME_DIR/keyring/control before starting NetBeans.
Indeed, it turned out that it's not necessary to set GNOME_KEYRING_CONTROL to anything meaningful. I guess all the actual work is done through libgnome-keyring.so JNA wrapper, which handles everything correctly independently of GNOME_KEYRING_CONTROL not being set. The only thing we need to do is check that gnome-keyring-daemon is running and "Login" keyring is unlocked. This could be done similarly to KDE Wallet counterpart: gdbus call --session --dest org.gnome.keyring --object-path /org/freedesktop/secrets/collection/login --method org.freedesktop.DBus.Properties.Get org.freedesktop.Secret.Collection Locked or: dbus-send --print-reply --dest=org.gnome.keyring /org/freedesktop/secrets/collection/login org.freedesktop.DBus.Properties.Get string:org.freedesktop.Secret.Collection string:Locked These invocations should neither fail nor return true.
*** Bug 249874 has been marked as a duplicate of this bug. ***
Hi, I'm also effected by this. My system is... Product Version = NetBeans IDE 8.0.2 (Build 201411181905) (#8230772f5f18) Operating System = Linux version 3.18.8-201.fc21.x86_64 running on amd64 Java; VM; Vendor = 1.8.0_31; OpenJDK 64-Bit Server VM 25.31-b07; Oracle Corporation Runtime = OpenJDK Runtime Environment 1.8.0_31-b13 Java Home = /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.31-5.b13.fc21.x86_64/jre System Locale; Encoding = en_US (nb); UTF-8 I tried the suggestion on Comment2 but did not work for me. On my system both GNOME_KEYRING_CONTROL and GNOME_KEYRING_PID have to be set and should be valid. So i added below two lines to my .bash_profile, export GNOME_KEYRING_CONTROL=$XDG_RUNTIME_DIR/keyring/control export GNOME_KEYRING_PID=`pidof gnome-keyring-daemon` Dose anyone know when the FIX that is suggested in Comment2 is going to be implemented? If anyone needs more data for analisys pls let me know. Thank you.
Fixed - http://hg.netbeans.org/core-main/rev/7ac3a0c76eec I would like to ask all interested to verify the fix. I've only removed the check of the GNOME_KEYRING variable - I think it isn't necessary to check it because the library is used and is also checked. The suggestion from comment 2 would not work, because the keyring can be also unlocked and is still available...
Sorry to sound like a noob..... But, could someone please tell me how to test this. I'm not a developer of netbeans. Just a user using it for PHP development. Thank you.
(In reply to dilt100 from comment #6) > Sorry to sound like a noob..... But, could someone please tell me how to > test this. > > I'm not a developer of netbeans. Just a user using it for PHP development. > > Thank you. Hi, just try something in IDE that handles password. I usually test it on SVN - only try to checkout some repo and let IDE remember password. If the proper keyring app appears and there is nothing suspicious in the IDE log, you can consider it success. The IDE should not use the default (internal) keyring... Thanks
Oops maybe i didn't make my self clear. I do know how to test if the error gets triggered. What i was asking for is, how do i apply this FIX? Do i download the latest netbeand? do need to build the latest netbeans from source? Thank you...
(In reply to dilt100 from comment #8) > Oops maybe i didn't make my self clear. > > I do know how to test if the error gets triggered. > > What i was asking for is, how do i apply this FIX? Do i download the latest > netbeand? do need to build the latest netbeans from source? > > Thank you... My fault, sorry for misunderstanding. This patch is not in the daily builds yet. When it is be available, the comment from Quality Engineering will appear here. Then it will be available in the daily build.
(In reply to Libor Fischmeistr from comment #9) > (In reply to dilt100 from comment #8) > > Oops maybe i didn't make my self clear. > > > > I do know how to test if the error gets triggered. > > > > What i was asking for is, how do i apply this FIX? Do i download the latest > > netbeand? do need to build the latest netbeans from source? > > > > Thank you... > > My fault, sorry for misunderstanding. > > This patch is not in the daily builds yet. When it is be available, the > comment from Quality Engineering will appear here. Then it will be available > in the daily build. Hi again, Just wanted to check when this patch would be in the daily builds. It's been more than a month since you patched this. Thank you...
(In reply to dilt100 from comment #10) > Hi again, > > Just wanted to check when this patch would be in the daily builds. > > It's been more than a month since you patched this. > > Thank you... Hi, should be in daily build now.