sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.76k stars 298 forks source link

bug: I am being repeatedly logged out. #5783

Open warm--tape opened 1 month ago

warm--tape commented 1 month ago

Type: Bug

I am logged in. Often when I reopen a new vscode window, I need to reauthenticate with Cody. This has only started happening today.

Extension Information

Steps to Reproduce

  1. Log in
  2. Working, opening different windows etc
  3. Cody logs me out

Expected Behaviour

Stay logged in

Logs

█ telemetry-v2: recordEvent: cody.extension/savedLogin { "parameters": { "version": 0, "metadata": [] }, "timestamp": "2024-10-03T00:26:06.592Z" } █ ModelsService: User model preferences changed {"defaults":{"chat":"anthropic::2023-06-01::claude-3.5-sonnet","edit":"anthropic::2023-06-01::claude-3.5-sonnet","autocomplete":"fireworks::v1::deepseek-coder-v2-lite-base"},"selected":{}} █ ChatsController:constructor: init █ AutocompleteProvider:notSignedIn: You are not signed in. █ GraphQLTelemetryExporter: telemetry: failed to evaluate server version: Error: ETIMEDOUT: Request timed out after 6000ms (https://sourcegraph.com/.api/graphql?SiteProductVersion) █ CodyLLMConfiguration: {"siteHasCodyEnabled":false,"siteVersion":"unknown","codyLLMConfiguration":{},"userInfo":{}} █ telemetry-v2: recordEvent: cody.auth/failed { "parameters": { "version": 0, "metadata": [ { "key": "tier" } ], "billingMetadata": { "product": "cody", "category": "billable" } }, "timestamp": "2024-10-03T00:26:15.363Z" } █ AutocompleteProvider:notSignedIn: You are not signed in. █ GraphQLTelemetryExporter: Error exporting telemetry events: Error: ETIMEDOUT: Request timed out after 6000ms (https://sourcegraph.com/.api/graphql?RecordTelemetryEvents) █ GraphQLTelemetryExporter: telemetry: failed to evaluate server version: Error: ETIMEDOUT: Request timed out after 6000ms (https://sourcegraph.com/.api/graphql?SiteProductVersion) █ GraphQLTelemetryExporter: Error exporting telemetry events: Error: Variable "value" has invalid value null. Expected type "JSONValue!", found null. █ ChatController: updateViewConfig { "uiKindIsWeb": false, "serverEndpoint": "https://sourcegraph.com/", "experimentalNoodle": false, "smartApply": true, "webviewType": "sidebar", "multipleWebviewsEnabled": true, "internalDebugContext": false } █ ChatController: updateViewConfig { "uiKindIsWeb": false, "serverEndpoint": "https://sourcegraph.com/", "experimentalNoodle": false, "smartApply": true, "webviewType": "sidebar", "multipleWebviewsEnabled": true, "internalDebugContext": false } █ UpstreamHealth: Ping took 2710ms (Gateway: 2000ms) { "Latency": 2710.169109000002, "url": "https://sourcegraph.com/healthz", "status": 200, "headers": { "cf-cache-status": "DYNAMIC", "cf-ray": "8cc8cd2bbc44d997-AKL", "connection": "keep-alive", "content-length": "34", "content-type": "text/plain; charset=utf-8", "date": "Thu, 03 Oct 2024 00:26:34 GMT", "server": "cloudflare", "set-cookie": "__cf_bm=09Tv8Q9dTMZN03.Ajk5FlcqhoGB2qQnV7PoM7BNQIpo-1727915194-1.0.1.1-CZo9pfIVUPn_ywBqIy_Ttjfh3ZdqUAtud3ekxwHf1VLccNIyKmzSqu3.RICqAAkT4cwnJB4RdVZ2mfqebkMPuQ; path=/; expires=Thu, 03-Oct-24 00:56:34 GMT; domain=.sourcegraph.com; HttpOnly; Secure; SameSite=None, _cfuvid=_HYLbPSP_i9Q9cMNjSfWsq2QZQVFazMryaTd2o1b3Nk-1727915194423-0.0.1.1-604800000; path=/; domain=.sourcegraph.com; HttpOnly; Secure; SameSite=None", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "via": "1.1 google, 1.1 google", "x-content-type-options": "nosniff", "x-trace": "1c06fa28da3d6799706b5c785e82fce2", "x-trace-span": "bd1f77afd3474e4b", "x-trace-url": "https://sourcegraph.com/-/debug/jaeger/trace/1c06fa28da3d6799706b5c785e82fce2" } } █ telemetry-v2: recordEvent: cody.webview.auth/simplifiedSignInGoogleClick { "parameters": { "version": 0, "metadata": [ { "key": "tier" } ] }, "timestamp": "2024-10-03T00:33:47.868Z" } █ GraphQLTelemetryExporter: evaluated export mode: 5.2.5+ █ GraphQLTelemetryExporter: Error exporting telemetry events: Error: Variable "value" has invalid value null. Expected type "JSONValue!", found null.

Extension version: 1.36.0 VS Code version: Code 1.93.1 (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z) OS version: Windows_NT x64 10.0.22631 Modes: Remote OS version: Linux x64 5.15.133.1-microsoft-standard-WSL2 Remote OS version: Linux x64 5.15.133.1-microsoft-standard-WSL2

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (8 x 2096)| |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
webnn: disabled_off| |Load (avg)|undefined| |Memory (System)|29.93GB (15.73GB free)| |Process Argv|--crash-reporter-id 489651b5-df1d-420c-aedf-d2f26790a5e3| |Screen Reader|no| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu| |OS|Linux x64 5.15.133.1-microsoft-standard-WSL2| |CPUs|AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (8 x 0)| |Memory (System)|14.61GB (11.62GB free)| |VM|0%| |Item|Value| |---|---| |Remote|WSL: Ubuntu| |OS|Linux x64 5.15.133.1-microsoft-standard-WSL2| |CPUs|AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (8 x 0)| |Memory (System)|14.61GB (11.62GB free)| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805:30301674 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonnoceb:30805159 asynctok:30898717 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementst:30995554 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 dsvsc021:30996838 724cj586:31013169 a69g1124:31058053 dvdeprecation:31068756 dwnewjupytercf:31046870 impr_priority:31102340 nativerepl2:31139839 refactort:31108082 pythonrstrctxt:31112756 flighttreat:31134774 wkspc-onlycs-t:31132770 wkspc-ranged-c:31125598 cf971741:31144450 autoexpandse:31146404 iacca1:31150322 notype1:31151523 cc771715:31146322 ```
warm--tape commented 1 month ago

Have reverted to v1.34.3 and I am logged in correctly.

sqs commented 1 month ago

Sorry about this issue. I see some errors in your log file like:

Error: ETIMEDOUT: Request timed out after 6000ms ([sourcegraph.com/.api/graphql?SiteProductVersion](https://sourcegraph.com/.api/graphql?SiteProductVersion))

I am not sure why this would have started being a problem with the new version, but are you on a high-latency network connection by any chance?

sqs commented 1 month ago

Similar report from the forums at https://community.sourcegraph.com/t/i-cant-login-form-vs-code-plugin-on-wsl2/1172/2?u=prinova.

sqs commented 1 month ago

@warm--tape Are you using a proxy?

warm--tape commented 1 month ago

@sqs no, not using a proxy- and no, not a high latency network, this was just on my regular fibre connection at my office. I used 1.34.3 for a good few hours after I reported this with no issue. Might try to upgrade it again tomorrow and see if it persists.

thegoodduck commented 1 month ago

i have the same thing before it was just cannot connect at start automatically now at each start i need to login. :-(

Kynlos commented 1 month ago

@warm--tape @thegoodduck

Are either of you still experiencing this issue or has it been resolved now?

Thanks!

warm--tape commented 1 month ago

@Kynlos the issue seems to still be present on 1.36.3, have reverted back to v1.34.3

thegoodduck commented 1 month ago

Me too but reverting did nothing

thegoodduck commented 1 month ago

reverting to release instead of prerelease stopped the bug

warm--tape commented 1 week ago

This has not been resolved at all, is ongoing. I'll be canceling my subscription and moving services.

thegoodduck commented 1 week ago

Hey, i tried TabNine, its great. I mapplying for student Github Copilot to see if its better.