bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.6k stars 93 forks source link

Intelephense is constantly asking me for the premium key when switching profiles or when you connect using the tunnel service #2643

Open rkkoszewski opened 1 year ago

rkkoszewski commented 1 year ago

Describe the bug Intelephense keeps asking me for the premium key when switching between profiles, when I'm using the VS Code tunnel or whenever I sync my account on another VS Code instance.

This quickly becomes quite frustrating when you use different machines with the same account (Like working with Virtual Machines), when you frequently switch between profiles or when using the tunnel service.

To Reproduce Create a profile in VS Code (It probably also has the same issue without one). Install Intelephense, buy the premium version and set the license in VS Code.

  1. If using different profiles, switch to another profile which has no Intelephense installed. Switch back.
  2. Having a registered Intelephense plugin (Premium) running on your VS Code instance, connect to it via tunnel. The remote device will ask you the premium key again.
  3. Install and register the Intelphesense plugin (Premium), sync your profile/account with the cloud. Then install VS Code on another machine and sync your account on the new machine. Intelephense will ask for the key again.

Expected behavior I'd expect my key to migrate together with my synced account/profile.

Platform and version Intelephense version. 1.9.5

rkkoszewski commented 1 year ago

@bmewburn, any comments on this issue? The issue is actually even worse when using tunnels. You need to write the serial each time you close/open or refresh the page. Using the "deprecated" serial section in the settings of Intelephense seems to fix the issue though. Perhaps that section could be kept after all. The serial should really be part of the profile as I see it.

Nyanng commented 1 year ago

I have same issue on Github Codespace. Please re-activate deprecated section...

chw-webops commented 7 months ago

Similar issue. Seems like I need to re-enter the license key every time I open, or switch to, a new project. Otherwise, the extension doesn't work. Having to do this half a dozen or more times a day. It's annoying.

PixNyb commented 1 month ago

Any update on this? Also looking for a way to keep my license key synced between instances of vscode without having to enter it manually every time

imwis commented 3 weeks ago

Hello, I am experiencing the same issue when using code-server. I have already activated Intelephense, but every time I access code-server on my server, Intelephense reverts to an unactivated state. It only returns to the activated state after I re-enter the license key.

bmewburn commented 3 weeks ago

In 1.12.4 I 've added the licence to the vscode sync list. Does that solve this issue?

imwis commented 3 weeks ago

In 1.12.4 I 've added the licence to the vscode sync list. Does that solve this issue?

Thank you for the recent update! Unfortunately, the recent update still doesn't seem to maintain the activated state consistently. In my case when using the web-based code-server hosted on my own server. Even after successfully activating, if I open the same page in an incognito browser mode, the activation status is lost, and I receive a prompt to purchase the premium version.

I also checked the globalStorage directory, and there is indeed a license key file that starts with "intelephense_licencekey". The license key recorded in the filename is correct as well. Could it be that Intelephense is having trouble reading this file?

Thank you!

imwis commented 2 weeks ago

After testing Intelephense over the past few days, I think I've identified the cause of the issue. In the web version of VS Code, all configurations are stored in user browser's localStorage, including the globalState where Intelephense stores the license key. This means that whenever the browser clears localStorage or when a user accesses the web version VSCode on a new device, the license key read from globalState is empty. In such cases, reactivation is required.

I've noticed that when Intelephense is successfully activated, a file storing the license key is created in the globalStorage directory. I suggest that the extension checks if a file with the prefix intelephense_licencekey exists in this directory to determine the activation status when the extension starts. 😄