Unable to log in - Cody hangs on "Signing in to Sourcegraph"

Hi!

My Cody login expired a couple of days ago. When I tried to log in using GitHub, I get the prompt to open VS Code, but it never happens.

I tried the latest and previous version (1.40.2 and 1.40.1), and the extension output says:
█ GraphQLTelemetryExporter telemetry: failed to evaluate server version:: Error: accessing Sourcegraph HTTP API: Error: HTTP status code 401: Invalid access token.
(https://sourcegraph.com/.api/graphql?SiteProductVersion)
█ GraphQLTelemetryExporter Error exporting telemetry events:: Error: accessing Sourcegraph HTTP API: Error: HTTP status code 401: Invalid access token.
(https://sourcegraph.com/.api/graphql?RecordTelemetryEvents)

Thank you in advance!

Hey @ToledoN sorry to hear about this. I looked at your account and it said the token was last used 4 minutes ago which I’m assuming that means it’s fixed? If not login to your Sourcegraph account, delete the token, and try signing in again.

Hi,
i have the same problem with VSCodium at Arch based OS (try’d witch Cachy-OS and Manjaro).
At OpenSuse Tumbleweed it works like expected.

Hey @herbk

When you experience the same login issue, please delete your token and try signing in again.

Thank you and sorry for the inconvenience

Don’t askme how offten i did the last few day’s… :smile:
Because at OpenSuse it works, im in mind it’s a problem how the process is made by the OS, - and other CSCodium extensions showing the same problem to.

1 Like

Hi @PriNova
today i made again a few tests to find out why Cody don’t get access at Arch based OSs, - i use CachyOS at this laptop.
I deinstalled VSCodium and removed all folders related to VSCodium and Cody, here at CachyOS and at one Tumbleweed Laptop.
After this, i re installed all new all new to compare what happens.

Like expected at Tumbleweed everything works without error.
At CachyOS i get after installing Cody the error message:

Error reading markdown document at `file:///home/herbert/.vscode-oss/extensions/sourcegraph.cody-ai-1.42.0-universal/walkthroughs/autocomplete.md`: Error: Unable to read file '/home/herbert/.vscode-oss/extensions/sourcegraph.cody-ai-1.42.0-universal/walkthroughs/autocomplete.md' (Error: Unable to resolve nonexistent file '/home/herbert/.vscode-oss/extensions/sourcegraph.cody-ai-1.42.0-universal/walkthroughs/autocomplete.md')

OK, the file is not there, but it is also not there at Tumbleweed where i don’t get this error.

If i now try to log in (at CachyOS) it dos not work. The attempt to log in via Github creates a new token, but the connection is not created. I get the error message:

Datei vscodium://sourcegraph.cody-ai?code=sgp-token_schortened3ea2b70ebe6715eb47 kann nicht gelesen werden.

The Cody logg file output:

█ telemetry-v2 recordEvent: cody.extension/savedLogin:
█ telemetry-v2 recordEvent: cody.auth/disconnected:
█ ModelsService User model preferences changed: {"defaults":{},"selected":{}}
█ ChatsController:constructor init:
█ telemetry-v2 recordEvent: cody.signInNotification/shown:
█ Autocomplete:createProvider You are not signed in.:
█ GraphQLTelemetryExporter evaluated export mode:: 5.2.5+
█ GraphQLTelemetryExporter evaluated export mode:: 5.2.5+
█ GraphQLTelemetryExporter evaluated export mode:: 5.2.5+
█ ChatController updateViewConfig:
█ ChatController updateViewConfig:
█ GraphQLTelemetryExporter Error exporting telemetry events:: Error: Variable "value" has invalid value null.
Expected type "JSONValue!", found null.
█ GraphQLTelemetryExporter Error exporting telemetry events:: Error: Variable "value" has invalid value null.
Expected type "JSONValue!", found null.
█ UpstreamHealth Ping took 363ms (Gateway: 409ms):
█ Autocomplete:createProvider You are not signed in.:
█ UpstreamHealth Ping took 271ms (Gateway: 409ms):

Du you have any suggestions what could be wrong? - may be at pakaging or is something missing…

About this missing autocomplete.md file, I need to investigate.

How many access tokens do you have still generated? You can see them when you login into Sourcegraph → Settings → Access Tokens.

If there are too many it can lead to trouble. Delete the ones you don’t need any more and try again.

But overall, this is interesting for further investigation.

Much to much… :slight_smile:
I know about this and delete allways the not needed.

As far as I know it should not exceed more than 30 tokens.

A little update to this problem.
First the most important: The prob is not based at Cody or CachyOS (or Arch at genaral) !
I’m quite sure the foult is somewhere at VSCodium, because i try’d VS-Code and Code-OSS now and with both i have no problems to access Cody and “auto logg in” each time.

About this missing autocomplete.md file, the message still shows up, also at Code-OSS and VS-Code. But it seams only to be a hint, i don’t notice any restriction till now. The File (and a few more) is there if one download and installs Cody v1.43 from MS Marketplace.
The Extension Installer still is at Cody v1.42

1 Like