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 191418

Summary: Initial SVN Authentication Doesn't Work With Save Option Checked
Product: versioncontrol Reporter: mikeytag
Component: SubversionAssignee: Ondrej Vrabec <ovrabec>
Status: RESOLVED INCOMPLETE    
Severity: normal    
Priority: P3    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: ps -af output
login dialog
login dialog 2
update success with the checkbox unchecked
the log you asked for

Description mikeytag 2010-10-27 19:46:08 UTC
Product Version = NetBeans IDE 7.0 M2 (Build 201010151251)
Operating System = Mac OS X version 10.6.4 running on x86_64
Java; VM; Vendor = 1.6.0_22
Runtime = Java HotSpot(TM) 64-Bit Server VM 17.1-b03-307

First off let me say I love 7.0. The only feature keeping me from using it as my default IDE was Line Wrap and it's now in there! Woot!

Ok this may just be related to my exact setup, but I encountered this bug and thought I should report it. Here is exactly what I did.

1. Made a New Project from Existing Sources that I have already been using with Subversion
2. Do an update,commit, anything and the authentication prompt comes up (no problem here)
3. For this first time ONLY, the authentication will NOT go through if I have Save Username and Password checked

I say first time ONLY because if I authenticate without checking the box. I can successfully authenticate later by checking the box with the same credentials. This is strange I know, but it has happened to me multiple times now and I got to think there is just something commented out in the code or something.

For the purposes of full disclosure, here is all the info I can give that I think would help:

Original Client SVN Version: (that was used before Netbeans import)

$ svn --version
svn, version 1.6.5 (r38866)
   compiled Oct 16 2009, 02:54:10

Server SVN Version: (the server is out of date I know, but we are doing an OS upgrade to bring it to 1.6 soon)
$ svn --version
svn, version 1.4.6 (r28521)
   compiled Aug  7 2009, 01:03:22

Server Setup:
SVN over https
nginx as SSL accelerator
Apache2 on the backend
Apache2 using Basic Auth for authentication
All through a PPTP tunnel

I realize, this is not the most normal of setups and if this problem is just limited to either my setup or the age of my server subversion I completely understand. I just wanted to post this in case there is something in the code that needs to be modified before 7.0 makes it out of beta.

TL:DR: SVN authentication only works if I initally connect without clicking "Save Username and Password" after initial, successful authentication I can later check the box with no problem and NetBeans remembers my credentials perfectly.
Comment 1 repasit 2010-11-03 10:07:04 UTC
Created attachment 102767 [details]
ps -af output
Comment 2 Ondrej Vrabec 2010-11-05 15:40:12 UTC
I am sorry, i was not able to reproduce. I ran the IDE with a clean userdir, opened an svn project, ran an svn update, the dialog came up and after i entered the credentials (and checked remember UN and PWD), the project was updated. I tried both with a commandline client as well as javahl, but no "success". 
Could you please try once more? Run the IDE with "--userdir PATH_TO_CLEAN_USERDIR -J-Dorg.netbeans.modules.subversion.level=500 -J-DsvnClientAdapterFactory=commandline". The open the project and try update. The second time the auth dialog shows, please look at the message.log (PATH_TO_CLEAN_USERDIR/var/log/message.log), try to locate the line with the command (svn update -r HEAD --force ...) and check if the credentials are correct and let me know. Also please try to generate a thread dump while the auth dialog is displayed for the second time (we'll at least see from where the dialog is opened).
Comment 3 mikeytag 2010-11-05 16:53:55 UTC
Thanks ovrabec. I will try to reproduce the problem on my end and post what I see. I forgot to mention in my first report that I am currently using Netbeans on OSX. I don't know if this creates any special environment to create this bug, but hopefully some info from the message.log will help.
Comment 4 Ondrej Vrabec 2011-02-09 13:55:36 UTC
Any update?
Comment 5 mihai 2011-02-23 15:00:54 UTC
I confirm the issue.
I've upgraded from 7.0 Beta to Beta 2 and i cannot login to svn anymore.

After i saw this bug description, i tried without the "Save Username and Password" check box and is working now.

Something was changed between:

Product Version: NetBeans IDE 7.0 Beta (Build 201011152355)
Java: 1.6.0_22; Java HotSpot(TM) Client VM 17.1-b03
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\mvasilache\.netbeans\7.0beta

where is working ok,
and 

Product Version: NetBeans IDE 7.0 Beta 2 (Build 201102140001)
Java: 1.6.0_22; Java HotSpot(TM) Client VM 17.1-b03
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\mvasilache\.netbeans\7.0beta2

where i had the problem.

If there is no path filled in tools/options/subversion,
then i assume that is using the one in the windows path:

svn, version 1.6.13 (SlikSvn/1.6.13) WIN32
   compiled Oct  4 2010, 15:02:10
Comment 6 Ondrej Vrabec 2011-02-23 15:11:20 UTC
Attach the message log, then: C:\Documents and Settings\mvasilache\.netbeans\7.0beta2\var\log\message.log
Are you saying you are not able to login either with or without the checkbox now?
Comment 7 mihai 2011-02-24 09:15:23 UTC
Created attachment 106392 [details]
login dialog
Comment 8 mihai 2011-02-24 09:22:32 UTC
No, i didn't say that i am not able to login either with or without the checkbox.

I can login only without the checkbox checked.

Every time i restart the IDE and perform an update against SVN, the ide is prompting for the username/password (see attachment).

The problem appeared in 7.0 Beta2, in the Beta version the update was ok.
Also i want to mention that my account on SVN require an username but no password. Maybe this can be the problem. 

The reporter of the issue, "mikeytag@netbeans.org" is another person.

I want to help you to fix the issue. Don't mark the issue as incomplete. Maybe we have very different timezones (i have GMT + 2).
Comment 9 mihai 2011-02-24 09:24:56 UTC
Created attachment 106393 [details]
login dialog 2
Comment 10 mihai 2011-02-24 09:27:01 UTC
Created attachment 106395 [details]
update success with the checkbox unchecked
Comment 11 mihai 2011-02-24 09:27:44 UTC
Created attachment 106396 [details]
the log you asked for
Comment 12 Ondrej Vrabec 2011-02-24 11:36:04 UTC
No, i can't reproduce this. I connect to a repository through svn protocol, authenticate with username and *empty password* successfully both with or without the checkbox selected.
Try to run the IDE with a fresh userdir (--userdir PATH_TO_EMPTY_USERDIR), do not import anything, open the project, call an update, enter UN/empty password, select the checkbox. Then attach the message log after the failed connection attempt.
Comment 13 Ondrej Vrabec 2011-02-24 11:38:22 UTC
> my account on SVN require an username but no password
no password = empty password, right? If you run 'svn info svn://repo --username mvasilache' it still asks for the password (and you simply enter empty one), right?
Comment 14 mihai 2011-02-24 12:49:32 UTC
on the command line is not asking for any password

C:\>svn info svn://sambasrv/blu/ --username mvasilache
Path: blu
URL: svn://sambasrv/blu
Repository Root: svn://sambasrv/blu
Repository UUID: 8f72bb94-0c05-4885-8da3-183e95a71f02
Revision: 361
Node Kind: directory
Last Changed Author: cmerlusca
Last Changed Rev: 361
Last Changed Date: 2011-02-24 12:18:21 +0200 (Thu, 24 Feb 2011)
Comment 15 Ondrej Vrabec 2011-02-24 16:47:21 UTC
Could you try the fresh userdir as i suggested in Comment #12?
As far as i know, there was no change in subversion between beta and beta2 regarding this issue. Have you changed something in your repository setup on the server? You have SASL enabled on the server, right? Any chance it's been enabled recently? I tried to setup SASL myself locally but did not succeed.

If the fresh userdir does not help, try running the IDE with -J-DsvnClientAdapterFactory=commandline
Comment 16 mihai 2011-02-28 13:01:51 UTC
It is still reproducing with a fresh userdir. (i renamed the .netbeans\7.0beta2 and the ide has created a new one.)

Next i will try:
-J-DsvnClientAdapterFactory=commandline
Comment 17 Ondrej Vrabec 2011-03-02 08:05:41 UTC
mihai: can you please setup a *non-empty* password for your account on the server? And then try if NetBeans is able to connect with the password?
Comment 18 DoctorZIP 2011-06-16 14:05:42 UTC
If login is 5 characters long with entered password and checked checkbox then password saves, but if login is 8 characters long with entered password and checked checkbox then login and password doesn't saves.
Comment 19 Ondrej Vrabec 2011-09-02 09:24:14 UTC
I added some logging, could you download the latest dev build (http://bits.netbeans.org/download/trunk/nightly/latest/), then start the IDE with:
--userdir EMPTY_USERDIR
-J-Dversioning.util.KeyringSupport.level=-1
-J-Dversioning.keyring.logpassword=true
-J-Dversioning.subversion.passwordCallback.level=-1
-J-Dversioning.subversion.logpassword=true, set the connection settings and try to connect.
Then please look into the message log, search for the password,
check that it's correct and replace it with '*' and send the files to me in an
email.
*Remember* to replace the real password, they are logged in plaintext