HodorNV / ALOps

ALOps
59 stars 24 forks source link

Exception occured reading settings.json Invalid array passed in, ',' expected. (402): { #404

Closed peterz84 closed 3 years ago

peterz84 commented 3 years ago

I have a settings.json in my project and the ALCompile step now fails. I must be overlooking something:

2021-07-27T18:06:26.6706440Z *** Working Direcotry: [c:\Run\DevOps\]
2021-07-27T18:06:26.7151367Z *** Target Project: [\app.json]
2021-07-27T18:06:26.7391923Z *** Project Directory: [c:\Run\DevOps]
2021-07-27T18:06:26.7454008Z *** VSCode Settings: [c:\Run\DevOps\.vscode\settings.json]
2021-07-27T18:06:26.7458443Z *** VSCode-Settings json found.
2021-07-27T18:06:26.7462182Z *** Loading Json Object: [c:\Run\DevOps\.vscode\settings.json]
2021-07-27T18:06:26.7465616Z *** Exception occured reading VSCode-Settings json. Content:
2021-07-27T18:06:26.7495728Z ##[error] Exception occured reading json [c:\Run\DevOps\.vscode\settings.json]: Invalid array passed in, ',' expected. (402): {
2021-07-27T18:06:26.7504772Z     "al.assemblyProbingPaths": [
2021-07-27T18:06:26.7516927Z         "./.netpackages",
2021-07-27T18:06:26.7518258Z         "C:/Windows/assembly/",
2021-07-27T18:06:26.7524037Z         "C:/Program Files/Microsoft Dynamics 365 Business Central/140/Service/Add-ins"
2021-07-27T18:06:26.7525020Z     ],
2021-07-27T18:06:26.7525725Z     "editor.wordWrap": "on",
2021-07-27T18:06:26.7527969Z     "editor.wrappingIndent": "deepIndent",
2021-07-27T18:06:26.7529136Z     "al.enableCodeAnalysis": true,
2021-07-27T18:06:26.7534046Z     "al.backgroundCodeAnalysis": false,
2021-07-27T18:06:26.7536285Z     "al.codeAnalyzers": [
2021-07-27T18:06:26.7566721Z         "${CodeCop}"
2021-07-27T18:06:26.7633130Z         //,${AppSourceCop}"
2021-07-27T18:06:26.7641131Z         //,"${PerTenantExtensionCop}"
2021-07-27T18:06:26.7642016Z     ],
2021-07-27T18:06:26.7644447Z     "al.ruleSetPath": ".codeanalysis/TSCWRuleset.json",
2021-07-27T18:06:26.7645477Z     "CRS.FileNamePattern": "<ObjectTypeShort>.<ObjectNameShort>.al",
2021-07-27T18:06:26.7650923Z     "CRS.FileNamePatternExtensions": "<ObjectTypeShort>-Ext.<ObjectNameShort>.al",
2021-07-27T18:06:26.7651963Z     "al.packageCachePath": ".alpackages",
2021-07-27T18:06:26.7752397Z     "editor.formatOnSave": true,
2021-07-27T18:06:26.7763756Z     "cSpell.words": [
2021-07-27T18:06:26.7764691Z         "ISEMPTY",
2021-07-27T18:06:26.7766221Z         "alpackages",
2021-07-27T18:06:26.7766847Z         "netpackages"
2021-07-27T18:06:26.7767399Z     ],
2021-07-27T18:06:26.7768044Z     "NAB.ReplaceSelfClosingXlfTags": false,
2021-07-27T18:06:26.7768724Z     "NAB.TranslationSuggestionPaths": [
2021-07-27T18:06:26.7769337Z         "Translation Basis/"
2021-07-27T18:06:26.7771670Z     ],
2021-07-27T18:06:26.7772284Z     "NAB.SearchOnlyXlfFiles": true
2021-07-27T18:06:26.7773602Z }
2021-07-27T18:06:26.7775941Z {
2021-07-27T18:06:26.7776552Z     "al.assemblyProbingPaths": [
2021-07-27T18:06:26.7811026Z         "./.netpackages",
2021-07-27T18:06:26.7811713Z         "C:/Windows/assembly/",
2021-07-27T18:06:26.7812549Z         "C:/Program Files/Microsoft Dynamics 365 Business Central/140/Service/Add-ins"
2021-07-27T18:06:26.7813195Z     ],
2021-07-27T18:06:26.7895834Z     "editor.wordWrap": "on",
2021-07-27T18:06:26.7919456Z     "editor.wrappingIndent": "deepIndent",
2021-07-27T18:06:26.8014025Z     "al.enableCodeAnalysis": true,
2021-07-27T18:06:26.8039676Z     "al.backgroundCodeAnalysis": false,
2021-07-27T18:06:26.8054012Z     "al.codeAnalyzers": [
2021-07-27T18:06:26.8062533Z         "${CodeCop}"
2021-07-27T18:06:26.8071191Z         //,${AppSourceCop}"
2021-07-27T18:06:26.8084951Z         //,"${PerTenantExtensionCop}"
2021-07-27T18:06:26.8250294Z     ],
2021-07-27T18:06:26.8252709Z     "al.ruleSetPath": ".codeanalysis/TSCWRuleset.json",
2021-07-27T18:06:26.8254971Z     "CRS.FileNamePattern": "<ObjectTypeShort>.<ObjectNameShort>.al",
2021-07-27T18:06:26.8271682Z     "CRS.FileNamePatternExtensions": "<ObjectTypeShort>-Ext.<ObjectNameShort>.al",
2021-07-27T18:06:26.8273008Z     "al.packageCachePath": ".alpackages",
2021-07-27T18:06:26.8274388Z     "editor.formatOnSave": true,
2021-07-27T18:06:26.8353324Z     "cSpell.words": [
2021-07-27T18:06:26.8677388Z         "ISEMPTY",
2021-07-27T18:06:26.8697335Z         "alpackages",
2021-07-27T18:06:26.8698160Z         "netpackages"
2021-07-27T18:06:26.8700302Z     ],
2021-07-27T18:06:26.8701068Z     "NAB.ReplaceSelfClosingXlfTags": false,
2021-07-27T18:06:26.8704832Z     "NAB.TranslationSuggestionPaths": [
2021-07-27T18:06:26.8705623Z         "Translation Basis/"
2021-07-27T18:06:26.8732075Z     ],
2021-07-27T18:06:26.8790762Z     "NAB.SearchOnlyXlfFiles": true
2021-07-27T18:06:26.8794565Z }
waldo1001 commented 3 years ago

I bet it's the comments in these arrays:

image

image

waldo1001 commented 3 years ago

VSCode JSON compiler also complains about it: image

waldo1001 commented 3 years ago

PowerShell also errors out with the comments...

image

waldo1001 commented 3 years ago

Were you able to fix this?

peterz84 commented 3 years ago

It looks like this was the problem. Which is weird, I thought I tried to remove these 2 lines before, which didn't help. Anyway, I'm getting the following error now. Should I open a new ticket for this one?

***
*** Working Direcotry: [c:\Run\DevOps\]
*** Target Project: [\app.json]
*** Project Directory: [c:\Run\DevOps]
*** VSCode Settings: [c:\Run\DevOps\.vscode\settings.json]
*** VSCode-Settings json found.
*** Loading Json Object: [c:\Run\DevOps\.vscode\settings.json]
*** Using Ruleset: [c:\Run\DevOps\.codeanalysis\TSCWRuleset.json]
***
*** Resolve Docker Credentials
*** Setup BC Username/Password from Container info
*** BC Container Parameters:

##[error] Admin password missing from captured Container Info.
*** Download Symbols
##[error]Because the session state for session WinRM1, 1a63b771-9f17-4190-80a2-0fa4030ee30c, 2edc3a1c9c288f835e0375330247922f8e69a4b2e28b76ae0d9a9f0f447c87b0 is not equal to Open, you cannot run a command  in the session.  The session state is Closed.
waldo1001 commented 3 years ago

Yes please, and provide a yaml as well.