Salesforce Org Authorization Fails in VS Code?

Salesforce Org Authorization Fails in VS Code?

On September 9, 2025, Posted by , In Salesforce Technical Questions, With Comments Off on Salesforce Org Authorization Fails in VS Code?
Authentication Successful

Question:

I can create a Salesforce project in VS Code, but when I try to authenticate an org, it opens a browser where I enter my credentials. The browser confirms “Authentication successful,” but in VS Code, the process remains stuck at “in progress.” If I cancel it, I get the following error:

9:53:02.435 sf org:login:web --alias Dev --instance-url https://login.salesforce.com --set-default
(node:4380) [DEP0040] DeprecationWarning: The punycode module is deprecated. 
Please use a userland alternative instead. 
(Use node --trace-deprecation ... to show where the warning was created) 

10:10:48.563 sf org:login:web --alias Dev --instance-url https://login.salesforce.com --set-default 
ended with exit code 1

Why is this happening, and how can I fix it?

Answer:

This issue has been linked to a known problem with the Salesforce CLI. As of version 2.69.14 (December 11, 2024), the issue has been addressed.

The deprecation warning about punycode has been appearing intermittently in various sf commands and is related to an open GitHub issue. If you’re experiencing this error, try the following solutions:

1. Reinstall Salesforce CLI via NPM

If you’re on Windows and installed Salesforce CLI using the Windows installer, uninstall it first. Then, reinstall it using NPM:

npm install @salesforce/cli -g

2. Check the GitHub Issue

Since this problem has been reported before, check the latest updates on the official GitHub repository. You can also comment on the issue if you need further assistance.

If the issue persists, ensure you’re running the latest version of Salesforce CLI and restart VS Code before trying to authenticate again.

Salesforce Training in Chandigarh – Accelerate Your Career Today!

Unlock your potential with our industry-recognized Salesforce online training program in Chandigarh, tailored for aspiring professionals and seasoned experts alike. Gain in-depth knowledge of Salesforce CRM, hands-on experience with real-world projects, and expert guidance to help you ace certifications like Salesforce Admin and Developer. Our curriculum is designed to make you job-ready and elevate your career to new heights.

Our focuses on practical, industry-relevant learning. Salesforce training in Chandigarh With personalized guidance, comprehensive course materials, and expert support for certification and interview prep, we make sure you’re job-ready.

Enroll today for a free demo session and take the first step towards a successful Salesforce career!!!

Comments are closed.