Skip to content

Error: Cannot read properties of undefined (reading 'length') when running "Populate local workspace" #188

@ramjam97

Description

@ramjam97

Hi team,

I encountered an issue while trying to populate my local workspace in SPGo. After entering my credentials, the process immediately fails with a TypeError related to reading the length property of an undefined variable.

Steps to Reproduce:

  1. Create a SPGo.json configuration file with the following contents:
{   
    "sourceDirectory": "src",     
    "sharePointSiteUrl": "https://tenant.sharepoint.com/sites/YourSite",
    "publishingScope": "SaveOnly",
    "authenticationType": "Application Password",
    "remoteFolders": [
        "/SitePages/**/*.*",
        "/SiteAssets/**/*.*"
    ]
}
  1. Run the command “Populate local workspace”.
  2. Enter valid SharePoint Online credentials.
  3. Observe the error output.

Actual Behavior:

SPGo immediately fails and outputs the following error:

[11/13/2025, 3:03:54 PM] ================================     ERROR     ================================  
[11/13/2025, 3:03:54 PM] Cannot read properties of undefined (reading 'length')   
[11/13/2025, 3:03:54 PM] Error Detail:  
[11/13/2025, 3:03:54 PM] ----------------------   
[11/13/2025, 3:03:54 PM] TypeError: Cannot read properties of undefined (reading 'length')    
[11/13/2025, 3:03:54 PM] ===============================================================================

Additional Context:

  • The same configuration works when using "authenticationType": "Online" or "Application Password", suggesting the issue may be specific to "Digest" authentication (which might not be supported for SharePoint Online).
  • It would be helpful if SPGo could handle unsupported authentication types gracefully and provide a clearer error message instead of a runtime exception.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions