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

Configure workspace doesn't do anything? #119

Closed JBWChris closed 3 years ago

JBWChris commented 4 years ago

Hey Chris,

Thanks for writing and maintaining this app. Unfortunately I am not having much luck and wonder if you've tested with the latest version of VSCode -v1.47 ? The behavior i get is the extension installs fine, but then when invoking an SPGo command, nothing happens, so if i try to configure workspace the next bit to enter the url doesnt appear. Any ideas?

Thanks.

Chris

chrishasz commented 4 years ago

Hello @JBWChris

Thanks for using SPGo, hopefully we can get this working for you. I've tested SPGo with the latest version of VSCode and it works for me.

Can you respond with the contents of the SPGo output when you try to configure workspace command?

Have you tried creating the spgo.json file directly? Here is a simplified config file that you can try out.

{
    "sourceDirectory": "src",
    "sharePointSiteUrl": "https://xxxx.sharepoint.com",
    "publishingScope": "Minor",
    "authenticationType": "Digest"
}

note: this assumes that you are using Digest/SharePoint Online

Please let me know if either of these steps work and I look forward to seeing the Output logs.

JBWChris commented 4 years ago

Hey @chrishasz ,

Thanks for coming back on this one. I guess if youve tested with the new version this isnt a bug and isnt your problem :) I'm back in the office tomorrow and will give this a go, (we have conditional access applied to O365 and so i have to be physically in the office) I'm not entirely sure where i should be putting the JSON file embarrasingly. Also where might i find the SPGo output logs? Somewhere in \AppData\Local\Programs\Microsoft VS Code ? I did attempt the other day when trying to get this to work, cheking the vscode debug concole but nothing appears in there.

Thanks again,

Chris

chrishasz commented 4 years ago

Hello @JBWChris -

In VSCode, you can view the extension output by opening the output window (View-> Output, or <Ctrl-Shift-u>) and then selecting "SPGo" from the dropdown window in the upper-right hand of the output window (see image below).

image

If SPGo launches correctly, you will see the message SPGo Enabled in the output window. Otherwise there should be an error describibing what failed.

Please respond with the contents of this output window and I'll help you get going.

JBWChris commented 4 years ago

[17/07/2020, 8:01:25 am] SPGo enabled. [17/07/2020, 8:01:25 am] ================================ ERROR ================================

[17/07/2020, 8:01:25 am] Cannot read property '0' of undefined [17/07/2020, 8:01:25 am] Error Detail: [17/07/2020, 8:01:25 am] ---------------------- [17/07/2020, 8:01:25 am] {} [17/07/2020, 8:01:25 am] ===============================================================================

JBWChris commented 4 years ago

the developer tools output is as follows:

console.ts:137 [Extension Host] rejected promise not handled within 1 second: No active workspace selected t.log @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 _doInvokeHandler @ rpcProtocol.ts:402 _invokeHandler @ rpcProtocol.ts:387 _receiveRequest @ rpcProtocol.ts:303 _receiveOneMessage @ rpcProtocol.ts:230 (anonymous) @ rpcProtocol.ts:105 fire @ event.ts:587 fire @ ipc.net.ts:453 _receiveMessage @ ipc.net.ts:733 (anonymous) @ ipc.net.ts:592 fire @ event.ts:587 acceptChunk @ ipc.net.ts:239 (anonymous) @ ipc.net.ts:200 t @ ipc.net.ts:28 emit @ events.js:203 addChunk @ _stream_readable.js:295 readableAddChunk @ _stream_readable.js:276 Readable.push @ _stream_readable.js:210 onStreamRead @ internal/stream_base_commons.js:166 log.ts:197 ERR No active workspace selected

chrishasz commented 4 years ago

Hello @JBWChris - Thanks for the additional output logging.

Based on the error you shared, I think what is happening is that SPGo does not detect an active workspace - this usually happens when you open a single file, rather than a folder (or solution) containing folders and files. I recommend you create a folder for your project, create the spgo.json config file at the root, and then open the root folder in VSCode.

An example project folder structure (projectName should be a folder - you can name it whatever you want):

projectName/
    |-spgo.json (note- you can start with the sample config file I posted above)
    |-src/

Let me know if you are still seeing issues after this.

chrishasz commented 3 years ago

Hello @JBWChris - were you able to resolve this issue?

JBWChris commented 3 years ago

Hey Chris, i'm sorry I had forgotten about this as I couldn't get it resolved before, but you reminded me to have another crack and your new version works a treat! This is life changing. Thanks loads!

chrishasz commented 3 years ago

@JBWChris - Glad to hear that SPGo is working out for you!

angelogianopulos commented 1 month ago

Hello, my organization just migrated to SharePoint SE and we are trying to connect via Visual Studio. I created the json file but when I try to populate the workspace it keeps spinning. Our servers are on premises so I chose NTMLas the authentication type.

{
    "sourceDirectory": "src",
    "sharePointSiteUrl": "https://bc-net",
    "workspaceRoot": "c:\\Users\\jangelogianopulos\\Desktop\\BCNetSE",
    "publishWorkspaceOptions": {
        "destinationFolder": "/",
        "globPattern": "c:\\Users\\jangelogianopulos\\Desktop\\BCNetSE\\src\\**\\*.*",
        "localRoot": "c:\\Users\\jangelogianopulos\\Desktop\\BCNetSE\\src"
    },
    "publishingScope": "SaveOnly",
    "authenticationType": "NTLM",
    "remoteFolders" :[
        "/_catalogs/masterpage/**/*.*"
    ]
}

Please let me know what I can do to fix this. Thanks