spgo icon indicating copy to clipboard operation
spgo copied to clipboard

getting told that there is an unexpected close tag but no error message is being displayed when i try and retrieve any file

Open arch563 opened this issue 4 years ago • 7 comments

When I try and retrieve files i get an error saying that there is an unexpected close tag on line nine column 7, i do not have a line 9 in my SPGo.Json here is the error message:

[13/08/2020, 15:03:48] Unexpected close tag Line: 9 Column: 7 Char: > [13/08/2020, 15:03:48] Error Detail: [13/08/2020, 15:03:48] ---------------------- [13/08/2020, 15:03:48] {} [13/08/2020, 15:03:48] ===========================================================================

and my SPGo.json file

{ "sourceDirectory": "src", "sharePointSiteUrl": "https://xxx.sharepoint.com/sites/xxx", "publishingScope": "SaveOnly", "authenticationType": "Digest" }

not sure what is happening here so any help would be appreciated!

arch563 avatar Aug 13 '20 14:08 arch563

Hello @arch563, sorry for the late reply. Can you confirm for me which folder you are trying to sync? I've seen this issue before when trying to synchronize publishing/page folders (e.g. /sitepages) via API.

chrishasz avatar Dec 17 '20 06:12 chrishasz

I also facing this issue as well, with the same exact configuration as @arch563

ArakP avatar Jan 20 '21 02:01 ArakP

assume it's authentication issue, my SharePoint online is using one-login with OIDC (OpenID Connect) method for authentication.

ArakP avatar Jan 20 '21 07:01 ArakP

Hello @ArakP - unfortunately SPGo's authenticaion will not work if you are using a third-party interactive identity provider.

chrishasz avatar Jan 21 '21 23:01 chrishasz

Hi @chrishasz thanks for confirmation. I wonder, even the third-party using OAuth2.0 standard for authentication. There should be a way to take it and follow the authentication flow just like ADFS.

ArakP avatar Jan 22 '21 04:01 ArakP

@ArakP the trouble here is that most 3rd party IDPs require interactive login which is a common scheme for OAuth flows. Interactive login means that you need to enter your username + password into a webpage and, unfortunately, VSCode and the authentication libraries that I use under the covers do not support opening a web browser to perform the

As a workaround, you could try one of these approaches:

Let me know if either of these work for you.

More Context: I have had another user report a similar issue, and provided the source of the error that you see. It originates from the node-sp-auth library and appears to occur when attempting to use ADFS/external authentication to request the login token.

=== Error ===
 TypeError: Cannot read property 'firstChild' of undefined
    at /Users/******/node-sp-auth-troubleshoot/node_modules/node-sp-auth/lib/src/utils/AdfsHelper.js:29:69
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async /Users/*****/node-sp-auth-troubleshoot/index.js:22:24

chrishasz avatar Jan 23 '21 18:01 chrishasz

@chrishasz thanks I'll check this out, don't think I could figure this out soon though.

ArakP avatar Feb 01 '21 06:02 ArakP