GoogleCloudPlatform / cloud-code-vscode

Cloud Code for Visual Studio Code: Issues, Documentation and more
Other
403 stars 109 forks source link

Can not load extension #908

Open davidgalvan-ttec opened 1 month ago

davidgalvan-ttec commented 1 month ago

Type: Bug

2024-05-23 18:41:49.882 [error] Activating extension googlecloudtools.cloudcode failed due to an error: 2024-05-23 18:41:49.882 [error] SyntaxError: Unexpected token "... is not valid JSON at JSON.parse () at t.OAuthProvider. (c:\Users\dgalvan.vscode\extensions\googlecloudtools.cloudcode-2.10.0\dist\extension.js:14:10745165) at Generator.next () at i (c:\Users\dgalvan.vscode\extensions\googlecloudtools.cloudcode-2.10.0\dist\extension.js:14:10737077)

Extension version: 2.10.0 VS Code version: Code 1.89.1 (dc96b837cf6bb4af9cd736aa3af08cf8279f7685, 2024-05-07T05:13:33.891Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz (8 x 1805)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.39GB (18.60GB free)| |Process Argv|--crash-reporter-id 95c31b19-d8a3-48ca-8734-63014f6d3eff| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 a9j8j154:30646983 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 chatpanelc:31048052 dsvsc021:30996838 945dj816:31013170 pythoncenvpt:31049070 fchga941:31046352 pythonprt:31056678 dwnewjupytercf:31046870 fa862199:31048878 ```
IngMarcosLopez commented 1 month ago

Same problem here, when extension is starting it throws this error [error] SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>) at t.OAuthProvider.<anonymous> (/Users/marcos/.vscode/extensions/googlecloudtools.cloudcode-2.11.0/dist/extension.js:14:10764871) at Generator.next (<anonymous>) at i (/Users/marcos/.vscode/extensions/googlecloudtools.cloudcode-2.11.0/dist/extension.js:14:10757078)

glouischandra commented 1 month ago

Sorry about this, taking a look

simonebracaloni commented 1 month ago

I have the same problem. I added a comment here https://github.com/GoogleCloudPlatform/cloud-code-vscode/issues/872 that is very similar.

2024-05-31 11:05:47.617 [error] Activating extension googlecloudtools.cloudcode failed due to an error:
2024-05-31 11:05:47.617 [error] SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at t.OAuthProvider.<anonymous> (/Users/simonebracaloni/.vscode/extensions/googlecloudtools.cloudcode-2.11.0/dist/extension.js:14:10764871)
    at Generator.next (<anonymous>)
    at i (/Users/simonebracaloni/.vscode/extensions/googlecloudtools.cloudcode-2.11.0/dist/extension.js:14:10757078)
glouischandra commented 1 month ago

Hello, we will have a fix in the upcoming release (around 2 weeks), meanwhile can you try deleting this folder: mac: ~/Library/Application\ Support/cloud-code/vscode/auth/ linux: ~/.cache/cloud-code/vscode/auth/ windows: %LOCALAPPDATA%\cloud-code\vscode\auth\

Then close and reload the vscode. Let us know if this unblocks the extension from starting up. Note that you need to re-sign into Gemini + Cloud Code

Keepertje commented 1 month ago

Removing the auth folder worked for me.

simonebracaloni commented 1 month ago

removing the ~/Library/Application\ Support/cloud-code/vscode/auth/ folder worked for me. The extension is now loading without error

IngMarcosLopez commented 1 month ago

remove ~/Library/Application\ Support/cloud-code/vscode/auth/ worked for me, extension is loading now

accounts01 commented 1 month ago

i'm on Linux. worked for me as well. thank you!