Subversion Native Client Problem
Why, if I enabled the native Subversion client, would I be getting an error message like:
Subversion: (Accessing URL: https://xxx) Received fatal alert: handshake_failure
Please check Subversion SSL settings (Settings | Version Control | Subversion | Network)
Maybe you should specify SSL protocol manually - SSLv3 or TLSv1
My command line svn client can talk to the Subversion server just fine. That message
really seems to be coming from the built-in client because my command line client
wouldn't be telling me to go look at the PhpStorm Subversion settings, would it?
Now, I just checked out a brand new sandbox from Subversion and pointed PhpStorm
at it. Now I get those pink popups every minute or so and The background Refreshing
VCS history has been running for hours along with a direct file history.
Also, shouldn't those messages be logged somewhere? There's nothing in the Event
Log.
Oh, and why if I close that project and switch to a CVS project, even across PhpStorm
restarts, does that message keep that message keep popping up about the file I tried
to do a svn history on?
And in case you're wondering, this is PhpStorm 7.1.3 on OS X 10.8.5.
Thanks
Please sign in to leave a comment.
Dan,
When you enable the native svn client are you providing the full path to the executable in settings box?
I ran into some strange behavoir with the native svn client if I just put "svn" in the box instead of the full path. Once I provide the full path, it worked correctly. Maybe it's worth a try if you haven't done that.
If you don't know how to find the full path, just open up Terminal and type "whereis svn".
Yea, it's the full path. To verify that PhpStorm was even trying to use it I munged the path and got an expected error message:
Can't use Subversion command line client: /foo/opt/local/bin/svn
Probably the path to Subversion executable is wrong. Fix it. (show balloon)
This is the Macports 1.8.1 client if that matters.
Thanks again,
Dan
what your system locale is set to?
A possible reason is that the svn executable reads the locale from the environment and is using this to create messages (and PHPStorm can't then parse them). Setting LANG=en_US might help... You can try creating a wrapper script that will set LANG and run svn passing all the options, then configure this script as svn binary in PHPStorm , see https://code.google.com/p/svnx/issues/detail?id=146#c5 for the sample.
Nice idea. If nothing else it gave me the ability to log the commands and responses to see what was happening. When I open a project that was checked out on the command line from a https repo I do see a bunch of commands running (see below) and then it all quiets down for about a bit and then I get the pink error
Subversion: (Accessing URL: https://xxx) Received fatal alert: handshake_failure
Please check Subversion SSL settings (Settings | Version Control | Subversion | Network)
Maybe you should specify SSL protocol manually -SSLv3 or TLSv1
But when that error occurs in PhpStorm there is no command logged through my wrapper which makes me even more sure that PhpStorm is trying to use the internal client for something. I have the "Refreshing VCS history" process spinning as this is happening.
Also I'm pretty sure it wasn't a LANG issue. While building up the wrapper if PhpStorm couldn't parse the output I'd get the following error instead:
Can't Use Subversion command line client: /path-to-svnwrapper
Probably the path to Subversion executable is wrong.
and
Errors found while svn working copies detection.
Not sure if it matters but those errors were bright pink and pinned at the top-right corner of the PhpStorm window and were logged to the event log. The handshake_failure message is a lighter pink and pinned to the bottom-left of the tool window and is not logged to the event log.
I was able to use the script with and without LANG set and received the exact same behavior from PhpStorm.
Just for grins, here's the wrapper I used. I added synchronization to make reading the output better. I was slightly surprised when I discovered that PhpStorm was hitting up the native client from multiple threads, but whatever.
#!/bin/bash
#export LANG=en_US
LOCKFILE=/tmp/svnwrapper.lock
#Sleep until it's our turn to run.
lockfile -! -1 ${LOCKFILE}
# Ensure that the lock is released
trap "rm -f ${LOCKFILE}; exit" INT TERM EXIT
echo >> /tmp/svnwrapper.out
echo >> /tmp/svnwrapper.err
echo svnwrapper "$@" >> /tmp/svnwrapper.out
echo svnwrapper "$@" >> /tmp/svnwrapper.err
echo >> /tmp/svnwrapper.out
echo >> /tmp/svnwrapper.err
( ( /opt/local/bin/svn "$@" | tee -a /tmp/svnwrapper.out ) 3>&1 1>&2 2>&3 3>&- | tee -a /tmp/svnwrapper.err ) 3>&1 1>&2 2>&3 3>&-
echo >> /tmp/svnwrapper.out
echo >> /tmp/svnwrapper.err
echo --- >> /tmp/svnwrapper.out
echo --- >> /tmp/svnwrapper.err
rm -f ${LOCKFILE}
svnwrapper.out ($$vars$$ are my edits)
svnwrapper --version --quiet
1.8.1
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
kind="dir"
path="."
revision="107096">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --version --quiet
1.8.1
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
kind="dir"
path="."
revision="107096">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
kind="dir"
path="."
revision="107096">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion st $$path-to$$/main-svn/app --depth infinity --no-ignore --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<status>
<target
path="$$path-to$$/main-svn/app">
<entry
path=".idea">
<wc-status
props="none"
item="ignored">
</wc-status>
</entry>
<entry
path=".project">
<wc-status
item="ignored"
props="none">
</wc-status>
</entry>
<entry
path="source/common/login.cfg">
<wc-status
item="ignored"
props="none">
</wc-status>
</entry>
</target>
</status>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
path="."
revision="107096"
kind="dir">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
path="."
revision="107096"
kind="dir">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
path="."
revision="107096"
kind="dir">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
path="."
revision="107096"
kind="dir">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
kind="dir"
path="."
revision="107096">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
path="."
revision="107096"
kind="dir">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
path="."
revision="107096"
kind="dir">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion st $$path-to$$/main-svn/app --depth empty --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<status>
<target
path="$$path-to$$/main-svn/app">
</target>
</status>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
path="."
revision="107096"
kind="dir">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
kind="dir"
path="."
revision="107096">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
kind="dir"
path="."
revision="107096">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
kind="dir"
path="."
revision="107096">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --version --quiet
1.8.1
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
revision="107096"
kind="dir"
path=".">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion st $$path-to$$/main-svn/app --depth infinity --no-ignore --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<status>
<target
path="$$path-to$$/main-svn/app">
<entry
path=".idea">
<wc-status
props="none"
item="ignored">
</wc-status>
</entry>
<entry
path=".project">
<wc-status
item="ignored"
props="none">
</wc-status>
</entry>
<entry
path="source/common/login.cfg">
<wc-status
props="none"
item="ignored">
</wc-status>
</entry>
</target>
</status>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
revision="107096"
kind="dir"
path=".">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion st $$path-to$$/main-svn/app --depth empty --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<status>
<target
path="$$path-to$$/main-svn/app">
</target>
</status>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
path="."
revision="107096"
kind="dir">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
svnwrapper --config-dir /Users/dwilks/.subversion info --depth empty $$path-to$$/main-svn/app --xml --non-interactive
<?xml version="1.0" encoding="UTF-8"?>
<info>
<entry
kind="dir"
path="."
revision="107096">
<url>https://$$root$$/trunk/app</url>
<relative-url>^/trunk/app</relative-url>
<repository>
<root>https://$$root$$</root>
<uuid>$$a-uuid$$</uuid>
</repository>
<wc-info>
<wcroot-abspath>$$path-to$$/main-svn/app</wcroot-abspath>
<schedule>normal</schedule>
<depth>infinity</depth>
</wc-info>
<commit
revision="107096">
<author>rpavlicek</author>
<date>2014-02-24T22:33:58.621816Z</date>
</commit>
</entry>
</info>
---
From using a wrapper script for the svn cli I now know that during startup that PhpStorm does call out to the CLI.
At some point, however, it appears to decide that it doesn't want to use the cli anymore and switches to the internal client. I tried to do a history on a file and found that these two threads were indeed using the built-in SVNKit-based client:
java.lang.Thread.State: RUNNABLE
Here's another thread responding to a svn history request. So... although PhpStorm does use the native svn client during startup something during startup could be preventing it from using the native client later on."ApplicationImpl pooled thread 4" daemon prio=4 tid=116e85800 nid=0x126943000 runnable [126941000]
java.lang.Thread.State: RUNNABLE
>At some point, however, it appears to decide that it doesn't want to use the cli anymore and switches to the internal client.
Though the IDE is using the external svn1.8 command line client for 1.8 working copies, it still uses svnkit for some actions: repository browsing (for checkout, import, share operations and in the Browse SubversionRepositories actions), commits history collecting (Changes/Repository and Changes/Incoming views).
>Maybe you should specify SSL protocol manually - SSLv3 or TLSv1
Try setting the protocol manually in Settings/Version control/Subversion/Network ('All' is used by default, try changing it to exact protocol being used) and then restart the IDE
That's interesting and matches what I'm seeing. I assume that means that the Subversion addon is now using a 1.8 version of SVNKit because doing anything against my 1.8 checked-out sandbox is going to fail miserably otherwise.
One of the two stack traces I posted earlier is from a file history command (right-click on a file in the project pane / Subversion / Show History) so it looks like PhpStorm is trying to use svnkit for file history as well?
I downloaded the 1.7.11 and 1.8.3 versions of SVNKit to hopefully get a handle on the ssl handshake problem but the bundled cli apps (jsvn) both work as expected. That is 1.8 works fine and 1.7 generates "svn: E155021: This client is too old to work with the working copy:" So not sure why SVNKit works as a standalone app but not bundled inside of PhpStorm.
Yea, already tried all of that.
Also, since our server is using a certificate signed by our own CA I downloaded our CA .crt file and added it to Subversion's CA cert files list. I did it under both User and System file and neither seemed to make a difference, then again I didn't set any other fields on those dialogs so not sure what else might be required.
I also tried installing our CA cert into the Java runtime as described here: http://blog.alwold.com/2011/06/30/how-to-trust-a-certificate-in-java-on-mac-os-x/ but that didn't seem to make a difference.
And again, the standalone SVNKit isn't exhibiting these issues and it's using the same Java runtime. It works with and without our CA cert installed.
And it's not a difference between launching PhpStorm from the launcher or terminal, I've done both and it doesn't work from either.
I'm having the same issue.
At the same time that this problem started (after the 8.0.1 upgrade, not fixed by 8.0.2), I also developed a mysterious inability to have PHPStorm cache my SVN credentials too. Somehow, permissions in my ~/.subversion/auth directory had gotten changed so I couldn't write to them. I manually changed the permissions, and that solved that problem. But my original theory that this could be related turns out to be incorrect.
I'm on OS X 10.9.5, using macports command line subversion 1.8.10 (r1615264).
The constant failing VCS updates in the background seem to consume a lot of memory. I end up having to restart PHPStorm a couple of times a week.
Same thing happens to me; any help would be appreciated! Driving me nuts!! Can't find any rhyme or reason to it...