Thanks for reaching out to Microsoft Q&A forum support.
Based on your description, I suspect the root cause of the issue is that the SPGo extension in Visual Studio Code fails to recognize an active workspace due to a missing or misaligned spgo.json configuration file, which is critical for defining the workspace and its connection to SharePoint, as evidenced by the "No active workspace selected" error.
This misconfiguration prevents the extension from properly initializing, leading to downstream authentication failures ("Error while resolving authentication class" and "No Username") and null/undefined property errors ("Cannot read properties of null (reading 'password')" and "Cannot read properties of undefined (reading 'length')") when attempting to access uninitialized objects like 'password' or 'length'. Ultimately, the absence of a valid workspace setup disrupts the entire publishing process, hindering credential handling and file deployment to SharePoint.
So as the workaround method, ensure that your .spgo.json file is located at the root of your workspace and includes all required fields such as username, password, sharePointSiteUrl, and sourceRoot. Open the entire project folder in Visual Studio Code rather than a subfolder to ensure the workspace is recognized.
If the issue continues to persist, I’d like to share that, as a forum moderator, my capabilities are limited, and I’m unfortunately not able to provide a definitive solution in this case. Given the nature of the problem, I suggest raising it on platforms that offer deeper expertise and experience in this area. You might consider reaching out through the following channels:
- Microsoft TechCommunity: https://techcommunity.microsoft.com/
- GitHub – SpGO topic: https://github.com/projectoperations/spgo-server
I understand that being redirected may not be ideal, and I truly appreciate your patience. However, this is currently the most effective way to gain more insight into the issue. I genuinely hope you’ll find the support you need through these resources.
Hope my answer will help you and thank you for your understanding
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.