r/salesforce • • 1d ago

help please User gets frozen each time i start VS Code

I work behind the corporate VPN. I know, Salesforce is not happy with this, but thats how it works for me, its not my choice and i cant do anything about this. My VPN places me in Amsterdam. Unfortunately, last week something happened to our VPN and for several hours i was working behind some different country IP. This was found and resolved, but, as soon as correct VPN settings were restored, my use was frozen. Another admin unfroze my user, ive created new passwords/reauthenticated orgs in cli etc. I also switched to a different VPN(different IP, same place). Next day ive logged in as usual using a browser and everything was fine UNTIL i opened VS Code. Immediately my users was frozen again. I thought that this, maybe, was just a coincidence.

But this morning this happened again - logging through browser works just fine, but as soon as VS Code was started - immediate user freeze. Ive deleted SLI and VS Code, deleted all remaining folders, related to CLI and VS Code and re-installed everything back, now waiting next day to see if this actually helped. Im the only one, who experiences this problem.

Any ideas what else i need to check? I cant start each day with unfreezing my user 🤣

5 Upvotes

16 comments sorted by

5

u/V1ld0r_ 1d ago

You have VSCode proxy settings off, especially around using it for the extensions.

0

u/New-Score-5199 1d ago

Can you explain this a bit, please?

1

u/V1ld0r_ 1d ago

It depends on your exact setup. You likely have the proxy settings turned to manual and not automated so it's not picking up the default setting of your network: https://code.visualstudio.com/docs/setup/network

1

u/New-Score-5199 4h ago

UPD: user is also getting frozen if i try to open Developer Console.

3

u/Dazzling-Escape-3595 1d ago

Since the freeze happens right when VS Code starts, check whether an extension or saved Salesforce CLI session is making repeated login attempts from a different network route or IP. Try launching VS Code with extensions disabled, then reconnect to the org and watch the Salesforce login history for the exact time and source IP. If it happens again, ask your Salesforce admin to check the login history and any transaction security or identity alerts—they may show what’s triggering the freeze. Reinstalling may not clear credentials stored separately by the OS or CLI.

1

u/GedAWizardOfEarthsea 1d ago

Look at the login logs for when you login via vscode, if its different than when logging in via browser either a) fix whats different upstream or b) allowlist that ip/regional login for your user. Eg could passthru an ms proxy or something.

1

u/Fast4Cure 16h ago

Salesforce doesn't normally freeze a user by itself just for an IP change, that's usually an admin or some automation doing it. I'd get whoever unfroze you to check Setup Audit Trail and your login history around the time it happened. It should show what froze you and how the VS Code login differs from your browser one.

0

u/nosensiblesuggestion 1d ago

I never found a solution to this. My work around is to have a second admin account for myself that I use only briefly (unprotected by the VPN usually hotspotting off my phone) to quickly go in and unfreeze my main account. I would love to know if there is a clean and less risky way of managing this.

1

u/New-Score-5199 1d ago

Maybe delete and create a new user will work? I can ask another admin to unfreeze, but it still a problem, since a lot of people are getting these letters about my user was blocked each day.

0

u/nosensiblesuggestion 1d ago

It didn't for me. All admin users failed this VPN test in our org. Luckily we were not all affected at the same time. Hence our keeping a "spare" admin account (which just gives me the chills) that we ONLY use outside the VPN.

0

u/New-Score-5199 1d ago

Dang, thats a problem... Salesforce kills me sometime.

-9

u/big-blue-balls 23h ago

Salesforce doesn’t care you use a VPN. WTF comment is that.

3

u/ThatOneKid1995 23h ago

https://help.salesforce.com/s/articleView?id=005318944&type=1

It's good to stay updated instead of being rude. They've been automatically freezing many VPN users if the VPN usage doesn't follow their updated security setups.

It's not that you use one and login through the browser directly, but using one while logging in with specific methods.

For example, our users logging in through the mobile app with Apple Relay VPN on get auto blocked by Salesforce.

-6

u/big-blue-balls 23h ago

That’s not what OP said. They aren’t against using VPN, they are blocking risky known IP addresses. So yea, you took my bait.

1

u/New-Score-5199 23h ago

Have you read the article above? It literally says "Preventing Connections from Anonymizing VPNs, Proxies and High-Risk IP Addresses". 'And' not 'only'.

1

u/big-blue-balls 13h ago

Do you understand why they are doing it?