26

I got warn message

Could not get package info. Failed to connect to https://packagist.org/packages/list.json: java.lang.RuntimeException: Could not generate DH keypair Please check your internet connection.

when opening Composer Dependency on WebStorm.. after a bit search, some say maybe it's caused by java SDK. But the problem persist even after I update Java to the latest version java 8u45.

enter image description here

Tek Yin
  • 3,011
  • 3
  • 25
  • 42

6 Answers6

31

/Applications/PhpStorm.app/Contents/Info.plist

<key>JVMVersion</key> <string>1.6*</string>

change↓

<key>JVMVersion</key> <string>1.8*</string>

shuusetu
  • 526
  • 3
  • 2
  • 1
    I upgraded Java to 1.8.0_45 and then did this with PhpStorm 8.0.3 and OS X 10.10.4. PhpStorm will no longer launch. Actually, OS X kinda locks up in a very weird way when I try to launch PhpStorm after changing the above to the given value. I changed it back and it will launch again. – jlbang May 22 '15 at 15:17
  • It works, but now another problem regarding to font rendering and color arise. https://youtrack.jetbrains.com/issue/WI-27354#comment=27-1000130 – Kent Liau May 25 '15 at 08:27
  • @jlbang Did you find a resolution to this problem? I am running into the exact same issue as you described. – Tod Birdsall May 30 '15 at 15:31
  • 1
    @CutRateGamer I didn't! I downgraded back to the version I was previously using just to get PhpStorm working again. :-/ Had to move on to other more urgent things. – jlbang Jun 01 '15 at 14:21
  • 1
    This worked for me on IntelliJ IDEA 14.x. I changed the value from `1.6*,1.7+` to `1.8*` – Xaero Degreaz Jul 24 '15 at 03:50
  • after multiple test on osx yosemite, you need to upgrade jdk here before http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html – Kate Aug 06 '15 at 18:16
  • FYI had to do this after making this change from `1.6*,1.7+` to `1.8`: http://stackoverflow.com/questions/24342886/how-to-install-java-8-on-mac – Bryan Sep 03 '15 at 16:33
8

In /Applications/PhpStorm.app/Contents/Info.plist change

<key>JVMVersion</key>
<string>1.6*</string>

to

<key>JVMVersion</key>
<string>1.8*</string>

Works for me! Use PrefSetter App for OS X, open plist and change value.

Markus W Mahlberg
  • 19,711
  • 6
  • 65
  • 89
3

https://youtrack.jetbrains.com/issue/WI-27354 -- watch this ticket (star/vote/comment) to get notified on progress.

In that ticket devs say: "Workaround: install JDK 1.8".


From https://youtrack.jetbrains.com/issue/WI-27354#comment=27-999854

Here's result of the investigation: the issue is reproducible only on MacOsX.
It definitely does not happen on bundled JDK.

Also I failed to reproduce it on java 1.8.0_45

LazyOne
  • 158,824
  • 45
  • 388
  • 391
  • 3
    https://confluence.atlassian.com/display/STASHKB/Could+not+generate+DH+keypair+on+SSL says "there are reports coming in that upgrading to latest JDK version does not resolve the issue". Which is certainly my own experience. – thesunneversets May 14 '15 at 18:39
  • @thesunneversets Your OS? Same question -- Please show "Help | About" screen – LazyOne May 14 '15 at 18:44
  • Mac 10.10.3 with Java SE Development Kit 8u45 installed... already try PhpStorm version 9.0 EAP 141.1000, May 6.. The problem still exist.. – Tek Yin May 15 '15 at 00:59
  • 1
    @TekYin I still need `Help | About` screenshot. Accordingly to the comments in the ticket the PhpStorm with bundled JDK works just fine and it also works with Java 8.45. The fact that you have java installed does not necessarily mean that PhpStorm actually uses it. – LazyOne May 20 '15 at 20:10
0

Is there a solution to this problem? I could not find a workaround in any of the suggested issue trackers. I have

  • phpStrom 9.0
  • OS X Yosemite 10.10.4
  • Java Runtime Version 1.8.0_51

If I modify the Info.plist from 1.6*,1.7 to 1.8* then phpStorm would not launch anymore. With the initial setting I get exactly the same error message as Tek Yin

UPDATE

Tried lots of things but could not get it working, so my workaround was installing all necessary packages manually through the console...

Flo Ragossnig
  • 1,341
  • 14
  • 38
0

I found the solution:

Go to JetBrains' download page, and donwload the bundled version of PHPStorm.

PHPStorm Bundled version link for MacOSX

catchke2ro
  • 36
  • 1
  • 4
0

Not only I was required to update Java, edit /Applications/PhpStorm.app/Contents/Info.plist as shuusetu suggested but I had to install Java SE Development Kit. Remember, there are Java install and JDK (java development kit) install, they are different and have to be installed both.

FFinn
  • 2,615
  • 2
  • 13
  • 6