Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having a course workspace open and clicking download all exercises for two quickly results in error #660

Open
sebazai opened this issue Sep 1, 2022 · 0 comments

Comments

@sebazai
Copy link
Contributor

sebazai commented Sep 1, 2022

Describe the bug
I guess it's due to the "trusted workspace" prompt not popping up fast enough? Why I guess it's due to this is that if you have the workspace open and press download rapidly for all parts there is no problem.

Once opening a workspace and pressing download for part 1 and part 2 almost the same time results in an error.

Expected behavior
?

Screenshots

Desktop (please complete the following information):

  • OS: macOS Monterey 12.5
  • VSCode Version 1.70.2
  • TMC Extension Version 2.1.5
  • Other related extensions.

TMC Extension logs
TMC -> Settings -> Set log level to verbose and reproduce error and paste logs.

[2022-09-01 20:36:15:448] [INFO] Run: "/Users/subustian/Library/Application Support/Code/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-aarch64-apple-darwin-0.25.2" "--client-name" "vscode_plugin" "--client-version" "2.1.5" "list-local-course-exercises" "--course-slug" "mooc-programming-22"
[2022-09-01 20:36:15:470] [INFO] Run: "/Users/subustian/Library/Application Support/Code/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-aarch64-apple-darwin-0.25.2" "--client-name" "vscode_plugin" "--client-version" "2.1.5" "settings" "get" "closed-exercises-for:mooc-programming-22"
[2022-09-01 20:36:15:489] [INFO] Run: "/Users/subustian/Library/Application Support/Code/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-aarch64-apple-darwin-0.25.2" "--client-name" "vscode_plugin" "--client-version" "2.1.5" "list-local-course-exercises" "--course-slug" "mooc-ohjelmoinnin-jatkokurssi"
[2022-09-01 20:36:15:511] [INFO] Run: "/Users/subustian/Library/Application Support/Code/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-aarch64-apple-darwin-0.25.2" "--client-name" "vscode_plugin" "--client-version" "2.1.5" "settings" "get" "closed-exercises-for:mooc-ohjelmoinnin-jatkokurssi"
[2022-09-01 20:36:15:529] [INFO] Refreshing workspace structure in the current workspace
[2022-09-01 20:36:15:915] [INFO] Clearing new exercises for mooc-ohjelmoinnin-jatkokurssi
[2022-09-01 20:36:15:928] [INFO] Run: "/Users/subustian/Library/Application Support/Code/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-aarch64-apple-darwin-0.25.2" "--client-name" "vscode_plugin" "--client-version" "2.1.5" "list-local-course-exercises" "--course-slug" "mooc-programming-22"
[2022-09-01 20:36:15:954] [INFO] Run: "/Users/subustian/Library/Application Support/Code/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-aarch64-apple-darwin-0.25.2" "--client-name" "vscode_plugin" "--client-version" "2.1.5" "settings" "get" "closed-exercises-for:mooc-programming-22"
[2022-09-01 20:36:15:973] [INFO] Run: "/Users/subustian/Library/Application Support/Code/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-aarch64-apple-darwin-0.25.2" "--client-name" "vscode_plugin" "--client-version" "2.1.5" "list-local-course-exercises" "--course-slug" "mooc-ohjelmoinnin-jatkokurssi"
[2022-09-01 20:36:15:996] [INFO] Run: "/Users/subustian/Library/Application Support/Code/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-aarch64-apple-darwin-0.25.2" "--client-name" "vscode_plugin" "--client-version" "2.1.5" "settings" "get" "closed-exercises-for:mooc-ohjelmoinnin-jatkokurssi"
[2022-09-01 20:36:16:014] [INFO] Refreshing workspace structure in the current workspace
[2022-09-01 20:36:16:052] [ERROR] Replace operation failed.
[2022-09-01 20:36:16:052] [ERROR] Failed to refresh local exercises.
Error — Failed to refresh active workspace. — Error: Failed to refresh active workspace.
    at t.default.<anonymous> (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:450267)
    at Generator.next (<anonymous>)
    at /Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:443852
    at new Promise (<anonymous>)
    at n (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:443597)
    at t.default._refreshActiveCourseWorkspace (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:449232)
    at t.default.<anonymous> (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:445123)
    at Generator.next (<anonymous>)
    at /Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:443852
    at new Promise (<anonymous>)
    at n (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:443597)
    at t.default.setExercises (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:445059)
    at /Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:351093
    at Generator.next (<anonymous>)
    at o (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:349815)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Additional context
Same kind of error seems to happen if you rapidly click the "status" badge for an exercise. After erroring the status badge can't be clicked.

[2022-09-01 20:41:42:023] [INFO] Refreshing workspace structure in the current workspace
[2022-09-01 20:41:42:216] [INFO] Run: "/Users/subustian/Library/Application Support/Code/User/globalStorage/moocfi.test-my-code/cli/tmc-langs-cli-aarch64-apple-darwin-0.25.2" "--client-name" "vscode_plugin" "--client-version" "2.1.5" "settings" "set" "closed-exercises-for:mooc-ohjelmoinnin-jatkokurssi" "[\"osa01-Osa01_01.Hiekkalaatikko\"]"
[2022-09-01 20:41:42:613] [INFO] Refreshing workspace structure in the current workspace
[2022-09-01 20:41:42:646] [ERROR] Replace operation failed.
[2022-09-01 20:41:42:647] [ERROR] Errored while opening selected exercises.
Error — Failed to refresh active workspace. — Error: Failed to refresh active workspace.
    at t.default.<anonymous> (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:450267)
    at Generator.next (<anonymous>)
    at /Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:443852
    at new Promise (<anonymous>)
    at n (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:443597)
    at t.default._refreshActiveCourseWorkspace (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:449232)
    at t.default.openCourseExercises (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:445774)
    at /Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:368217
    at Generator.next (<anonymous>)
    at /Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:367792
    at new Promise (<anonymous>)
    at n (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:367537)
    at t.openExercises (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:367968)
    at Object.<anonymous> (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:495409)
    at Generator.next (<anonymous>)
    at /Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:490973
    at new Promise (<anonymous>)
    at n (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:490718)
    at /Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:495302
    at t.default.<anonymous> (/Users/subustian/.vscode/extensions/moocfi.test-my-code-2.1.5/dist/lib.js:2:531216)
    at w.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:145)
    at b.deliver (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:2266)
    at p.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:1844)
    at u.$onMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:87:187047)
    at o._doInvokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:95:13691)
    at o._invokeHandler (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:95:13373)
    at o._receiveRequest (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:95:12143)
    at o._receiveOneMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:95:11044)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:95:8952
    at w.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:145)
    at b.deliver (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:2266)
    at p.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:1844)
    at c.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:69:19006)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:111:17079
    at w.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:145)
    at b.deliver (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:2266)
    at p.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:1844)
    at c.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:69:19006)
    at i._receiveMessage (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:69:23593)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:69:21127
    at w.invoke (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:145)
    at b.deliver (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:2266)
    at p.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:61:1844)
    at p.acceptChunk (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:69:15837)
    at /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:69:14967
    at Socket.l (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:69:26303)
    at Socket.emit (node:events:390:28)
    at Socket.emit (node:domain:475:12)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant