IC2 does not play nicely under WSL2 via JetBrains Gateway

Issue #2825 open
Simon Wood created an issue

Hi

I am using JetBrains Gateway to run PhpStorm in the remote development configuration, with the client running on the Windows 11 host and the server running on Ubuntu in WSL2. I have multiple projects and lots of plugins, including paid ones and everything plays nicely…until I added a project using IC2.

At first, it seemed to work and I started the 30 day trial.

Then, next day, I tried to open the project via Gateway and it wouldn’t start. Inspecting the logs showed it was because it was trying to show me the ‘29 days left’ dialog before the client side had started up. I therefore started a different project then opened the IC2 one from the ‘Open’ menu.

Now, a day later, I found that I was starting to get a message saying “An unexpected error occurred during license validation: Failed because your system date and time settings are incorrect. Fix your date and time settings, restart your computer, and try to activate again”. My date and time settings are fine, and synchronised using the same NTP server as my Windows host, and I’ve not even shut down the WSL2 instance or changed anything since I installed the project apart from trying to use it two days in a row.

I tried restarting Phpstorm but with the same result. I then tried restarting WSL2 - when I tried to open any other project I got the same IC2 message, even though none of those other projects are Salesforce ones (Phpstorm has no concept of per-project plugins, but generally plugins don’t give you messages when you’re not using them in a project.

I then completely uninstalled the plugin and restarted the IDE with the intention of reinstalling it.

Now NONE of my remote projects start, and Phpstorm is apparently unusable! I’m a longtime user of Phpstorm and have never encountered this situation before. I’m not sure what’s going on but it seems IC2 is not only unhappy with WSL2, but also remote development AND tries to run stuff even when it’s not relevant to a project!

I note the response to this WSL issue was to shut it down but even if WSL2 does funny things with MAC addresses (it may do), I would note that none of my other plugins - paid or free - have a problem with it. And apart from anything else, I should still have 28 days left in the licensing period!

I liked IC2 for the brief period while it worked and want to pay for it, but not if I can’t trust it to work as well as my other plugins. I’ve searched issues for anything like this and can’t find any, so now I’m a bit stumped, and have NO working phpstorm projects…

I’ve chosen the ‘Licensing’ component because there isn’t one called ‘Absolutely Everything’…

Edit: I’ve now managed to get some projects working by installing them from github from scratch and can confirm the problem is this annoying dialog about system time trying to display on EVERY phpstorm project, even ones unrelated to Salesforce. And even then I have to dismiss about four or five dialogs: “it’ll be disabled”, “do you want to see licensing options?” etc

Further edit: I’ve since visited the homepage while logged in and it says this:

Not compatible with the version of your running IDE (Gateway 2025.1.2, PhpStorm 2025.1.3, PhpStorm 2025.1.3)

So am I just screwed with this? I’m surprised it let me install if it’s not compatible.

Comments (12)

  1. Scott Wells repo owner
    • changed status to open

    Hi, Simon. IC doesn't really work very well with WSL. There's some discussion on the topic here:

    https://groups.google.com/a/illuminatedcloud.com/g/discussion/c/RJGvPPNcC-s/m/0BNu43hJAQAJ

    I haven't tried it at all via JetBrains Gateway so perhaps that's different, but my experience trying it locally with a Window-native IDE, a project stored in WSL/Linux, and a WSL/Linux Salesforce CLI just had too many issues to be workable.

    Apologies that I don't have a better answer for you on this.

  2. Simon Wood reporter

    Hi Scott

    Thanks for the reply.

    My go-to for WSL development recently has been via the gateway as it should in theory get around a lot of the issues with WSL2 - essentially what this does is run a PhpStorm server in Ubuntu so any Windows element is just the ‘thin’ PhpStorm client side. If IC could play more nicely with Gateway, I really feel like that’s the route to go down as everything would really be running in Linux and Windows/WSL becomes irrelevant to most of this. I suspect the main problem with Gateway is your ‘licence days remaining’ popups as they try to instantiate before the client side - which shows the popups - has fully started.

    It may be that once it’s licensed and doesn’t pop up a dialog, it works under Gateway. But I’m reluctant to pay for a licence to see if that’s the case, in case it turns out to still be broken, haha.

    Simon

  3. Simon Wood reporter

    Update: We have a single-user licence here already which was being used by a colleage who has a Mac install, so we temporarily deactivated that and I spun the project up remotely in WSL2 via Gateway. It popped up the various dialogs about the date and time being wrong but this time I then went and entered the licence key. I set up the connection, told it to ignore the existing symbol table then after it had finished indexing, I chose ‘Invalidate Caches and Restart’.

    Phpstorm restarted and looks fine, all symbol resolution ok and things apparently behaving normally. This makes sense as it’s effectively a linux install and the plugin appears under Plugins: host in Phpstorm settings.

    I’m going to continue working in this Gateway setup and report back if there are any more problems but it does feel like what was stopping this working was the ‘days remaining' popup for the licensing system (and then the weird error about date and time settings). It’s ironic, if it turns out that once it’s licensed it works fine.

    Remote Gateway is a really good setup for WSL development as it decouples the meat of phpstorm from the UI, and you don’t then have to make your plugin specifically support Windows. I’d really recommend having a look at what is happening with the dialogs and seeing if you can get them to play nicely with Gateway as it would be a shame if you are losing WSL2 uptake because of these issues. I’d also point out that I get that ‘days remaining' alert when opening any Phpstorm project, whether or not it uses Salesforce, which again is unusual for a plugin - I’d expect the plugin to only show this on a project with a Salesforce config in it as otherwise it’s annoying: imagine you work on five different projects and you just happen to be playing with Salesforce!

  4. Scott Wells repo owner

    Thanks for the additional info. If everything is running under Linux and Gateway is just providing a view of those running processes, I would expect it to work.

    The licensing software’s message about date/time is based on comparing the expected date/time based on the client IP address making the request of the licensing servers to the encoded actual date/time of the client machine itself. It’s intended, of course, to prevent date/time spoofing as a way of working around licensing.

    Since this Linux VM is installed locally, I would expect things to work under it if they also work under Windows on the same machine, especially since you said they’re both syncing with the same NTP server. Have you tried IC on Windows just to see if you see the same behavior? It may just be an issue with the machine being behind a network – typically a VPN – that presents to the public network as being in a different time zone than configured locally.

  5. Simon Wood reporter

    I’m sure the date/time issue is WSL related (hard to see exactly how, as not only do they use the same NTP server but the networking mode is set up as Mirrored). Clearly something is amiss, possibly due to the initial interaction being via the client and the check then being on the server side. I do know that since Gateway came out of beta, there is a clear split of client and server plugins - some styling plugins appear in the client list and others appear only in server. So there will be some guidelines for developers when implementing plugins for remote compatibility, I assume. In the case of any of the dialogs, I’m guessing it’s a matter of waiting until you know there’s a UI available. In the case of the date/time check on the licensing, I’m not so sure!

    But the issue with date/time a) only occurs during evaluation (hasn’t happened since the licence was applied) and b) isn’t the only killer for this setup - the popup telling you how many days you have left will kill it even if the date/time issue doesn’t happen.

    As I say, it’s all working fine now that it’s licenced, and for devs like me who are longtime users of Phpstorm and WSL, you won’t get many people who are happy to either switch to working entirely in Windows or installing a full GUI for their WSL2 Ubuntu image just to run the Phpstorm UI. The Remote setup is perfect for this ecosystem.

  6. Simon Wood reporter

    Sorry - I meant to add that there is no VPN involved here, just mirrored networking WSL2 setup and I don’t see the date/time issue with Phpstorm running natively on Windows with a sample project, so it does point at somehow the two timestamps being skewed in the client/server setup but ONLY during the evaulation phase, so the time element of this may even be a red herring.

  7. Scott Wells repo owner

    Got it. I played with it a bit yesterday and saw some similar issues. We have some out-of-town company this week in conjunction with my twins' birthdays so I’m a bit limited in my ability to spend time on it immeduately, but I’m going to see if I can figure out what’s going on early next week. I’ll let you know what I find.

  8. Justin Julicher

    Just a note in relation to this…. There is also Code Canvas functionality (which is new - but I believe uses the same tech) - for securing down dev environments in large organisations. The client I’m currently working with don’t install IDEs on the laptop and secure using VDI’s - so this might be an alternative. Not sure how VSCode functions in this space but might be another point of difference.

  9. Log in to comment