spmeesseman / vscode-taskexplorer

Run and Manage Tasks for Visual Studio Code
Other
140 stars 30 forks source link

Getting "Converting circular structure to JSON" error. #194

Open blu28 opened 1 year ago

blu28 commented 1 year ago

I have a gradle based Java project. Task Explorer is not showing anything under Gradle, and under batch it shows gradle.bat, but clicking on gradle.batch gives an error:

Converting circular structure to JSON --> starting at object with constructor 'o' | property 'next' -> object with constructor 'o' --- property 'prev' closes the circle

spmeesseman commented 1 year ago

same as other ticket, v3 may fix this, actually this one Im pretty sure it will. coming soon, maybe end of march, just haven't had a lot of time to work on it lately because of work

spmeesseman commented 1 year ago

also if you want to drop your .gradle file here, i can certainly test it myself

NoelAbrahams commented 1 year ago

Having the same problem with bunch of vscode tasks. Clicking on an item name brings up this error: image

However, clicking on the Play icon to the right of the item runs correctly image

I have Click Action set to 'Execute'.

DaFessor commented 2 months ago

Having the same problem, also with vscode tasks. Clicking on a task name gives:

Converting circular structure to JSON --> starting at object with constructor 'u' | property 'context' -> object with constructor 'Object' | property 'subscriptions' -> object with constructor 'Array' | ... | property 'selection' -> object with constructor 'Array' --- index 0 closes the circle

Clicking on the play icon also works fine for me, that circumvents the problem. Another (perhaps interesting) fact is that the configuration parameter "taskExplorer.clickAction": "Open", is ignored. As shown, I have tried to disable execute when clicking the task names, but that gets merrily ignored no matter what I do (restarting VSCode, uninstall/reinstall Task Explorer etc.). I am using a multi root workspace.

Here's how the Task Explorer settings look like in my workspace file:

"taskExplorer.enabledTasks": { "ant": false, "bash": false, "composer": false, "gradle": false, "grunt": false, "gulp": false, "make": false, "maven": false, "npm": false, "perl": false, "pipenv": false, "powershell": false, "python": false, "ruby": false, "tsc": false }, "taskExplorer.showHiddenWsTasks": false, "taskExplorer.showLastTasks": false, "taskExplorer.showFavoritesButton": true, "taskExplorer.enableAnsiconForAnt": false, "taskExplorer.groupStripTaskLabel": false, "taskExplorer.enableSideBar": true, "taskExplorer.enableExplorerView": false, "taskExplorer.clickAction": "Open", <<<<------ Ignored "taskExplorer.groupMaxLevel": 1, "taskExplorer.showExecuteWithArgumentsButton": false, "taskExplorer.showExecuteWithNoTerminalButton": false }

Things were working just nicely, until I did some extension install/uninstalls, then the error popped up. Let me know if there's anything I can do to help nail this one.

DaFessor commented 2 months ago

Ahhh ...! Just made an interesting discovery. When I reported the problem, I was using the "Enable Side Bar" setup. I just tried adding the "Enable Explorer View" option, just to see what happened. And things (executing the tasks directly when clicking the task name) suddenly worked fine, both in the explorer view AND in the side bar view! After disabling the explorer view again, the side bar view kept working.

So at least that suggest that there's a work-around for now: simply switch between the side bar and explorer views a couple of times. Ymmv ...... :-)