chrishasz / spgo

SPGo: A Lightweight, Open Source, SharePoint IDE for Visual Studio Code
https://www.chrishasz.com/spgo
MIT License
60 stars 11 forks source link

V1.7.1 'Publish Local Workspace' now not working. V1.7.0 still works #146

Closed ianoel230982 closed 3 years ago

ianoel230982 commented 3 years ago

Note: for support questions, please use stackoverflow and tag the post with #spgo.

chrishasz commented 3 years ago

Thank you, @ianoel230982. I think I know the root cause of this error.

As of 1.7.1, I made the parser much more explicit regarding absolute paths. Since you are using /src/development/web, and /**/*.* in the publishWorkspaceOptions node, SPGo is interpreting this to mean "start at the root of the file system and look for the path /src/development/web.

Can you remove the leading '/' character from the localRoot and globPattern properties?

That said, since the config file you use has web-style slashes, I did find a bug translating those to windows slashes. I'll have a fix up on the marketplace today.

chrishasz commented 3 years ago

I've published SPGo 1.7.2 to the VSCode Marketplace. Once you make the changes I listed in the message above to your spgo.json file, workspace publish should work again for you.

ianoel230982 commented 3 years ago

Hi,

Thanks for your quick turn around on this. I now face another problem, which i'll try and explain below.

I've tried installing the new v1.7.2 extension via the market place but it was not compatible with the version of vs code i was running 1.54.3

I have updated VSCode to the latest version 1.56.2 and installed the latest version of the extension you published last night but now i have another error that is stopping me populating the workspace or carrying out any SPGo actions.

The error i now received in the terminal output is [14/05/2021, 09:36:43] ================================ ERROR ================================ [14/05/2021, 09:36:43] 401 - undefined [14/05/2021, 09:36:43] Error Detail: [14/05/2021, 09:36:43] ---------------------- [14/05/2021, 09:36:43] StatusCodeError: 401 - undefined [14/05/2021, 09:36:43] ===============================================================================

A colleague of mine is also receiving the same error since updating VScode to the latest version.

Is there any possible advice you could provide as to this?

I'll regress VSCode and the SPGo extension to what is currently working for me, but will certainly be happy to try any suggestions you have?

chrishasz commented 3 years ago

Do you see this with every command, or only publish workspace?

Can you post the SPGo.json file you were using?

ianoel230982 commented 3 years ago

Hi,

Its the same SPGo.json file as above. Do i need to try it by removing the '/' as suggested to fix the other issue?

I tried the Populate Workspace command which asked for my credentials, I entered my credentials in format of 'domain\username' and then my password, on hitting 'enter' the error message appears in the output. I can't try any other commands as it just asks for my credentials each time, which keeps failing with the above error.

sg-chrishasz commented 3 years ago

Yes, you will need to remove the leading slash, as per the comment above.

Having a leading slash tells SPGo “start at the root” just like having “c:/“ would.

On May 14, 2021, at 7:51 AM, ianoel230982 @.***> wrote:

 Hi,

Its the same SPGo.json file as above. Do i need to try it by removing the '/' as suggested to fix the other issue?

I tried the Populate Workspace command which asked for my credentials, I entered my credentials in format of 'domain\username' and then my password, on hitting 'enter' the error message appears in the output. I can't try any other commands as it just asks for my credentials each time, which keeps failing with the above error.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

ianoel230982 commented 3 years ago

Thanks, i'll give that a go and report back in a little while.

ianoel230982 commented 3 years ago

OK, so i am now at the following

Version: 1.56.2 (system setup) Commit: 054a9295330880ed74ceaedda236253b4f39a335 Date: 2021-05-12T17:13:13.157Z Electron: 12.0.4 Chrome: 89.0.4389.114 Node.js: 14.16.0 V8: 8.9.255.24-electron.0 OS: Windows_NT x64 6.3.9600

SPGo V1.7.2

My SPGo.json file is as below

 {
    "sourceDirectory": "src",
    "sharePointSiteUrl": "http://siteURL/sites/SiteName",
    "publishingScope": "SaveOnly",
    "authenticationType": "NTLM",
    "publishWorkspaceOptions": {
        "destinationFolder": "Web/",
        "localRoot": "src/Development/Web",
        "globPattern": "**/*.*"
    },
    "workspaceRoot": "c:\\SPGo\\RootFolderName",
    "checkInMessage": "Updated by Me",
    "remoteFolders": ["/Web/**/"],
    "subSites": [
        {
            "sharePointSiteUrl": "http://siteURL/sites/SiteName/Development",
            "remoteFolders": ["/Web/**/"]
        }
    ]
}

As soon as i try and do any SpGo command i am prompted with the credentials, to which i use my domain\username and password. I still receive the same 401 error in the output.

Any thoughts?

ianoel230982 commented 3 years ago

Hi, further update for this. I came across this issue #73 and noticed it was similar behaviour to what i am now seeing. I have carried out the advice for disabling the proxy support for extensions and i am back up and running. I can even publish the workspace with your update instructions for removing the slash.

With that in mind i will close this bug now, as you have fixed the original issue. I guess the other issue is with VSCode.

Thanks again for your continued support.