From 6578f5db1dd0a2728012718121ed050c4a1000e3 Mon Sep 17 00:00:00 2001 From: Ado Kukic Date: Tue, 5 Nov 2024 11:58:59 -0800 Subject: [PATCH 01/14] Hackathon - Troubleshooting --- docs/cody/troubleshooting.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index b601c5ec2..b8e3a8990 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -1,3 +1,4 @@ +{/* Hackathon */} # Troubleshooting Cody

Learn about common reasons for errors that you might run into when using Cody and how to troubleshoot them.

From 95f2ca6afd3de564b900f390e741b6257521af94 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Tue, 5 Nov 2024 16:01:58 -0800 Subject: [PATCH 02/14] feat(troubleshooting): add 429 error explanation - Add explanation for 429 errors on free and paid plans - Clarify that 429 errors can also be caused by too many requests in a short period --- docs/cody/troubleshooting.mdx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index b8e3a8990..1d0507ba9 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -74,6 +74,10 @@ On the free plan, Cody provides **unlimited autocomplete suggestions** and **200 On the Pro and Enterprise plans, there are much higher limits that are used to keep our services operational. These limits reset within a day. +#### 429 errors + +A 429 status code means you are on a free account, and you hit your usage limit/quota for the day. It can also mean you were sending too many requests in a short period of time. If you have Cody Pro and you are seeing 429 errors, you can contact us at [support@sourcegraph.com](mailto:support@sourcegraph.com) to get this resolved. + ### Error logging in VS Code on Linux and Windows If you encounter difficulties logging in to Cody on Linux using your Sourcegraph instance URL, along with a valid access token, and notice that the sign-in process in VS Code hangs, it might be related to underlying networking rules concerning SSL certificates. From 62c9a18b4a5345195ab948cc2361c40f08800511 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Tue, 5 Nov 2024 16:13:26 -0800 Subject: [PATCH 03/14] feat(troubleshooting): add Cloudflare request failure explanation - Add explanation for Cloudflare 403 Forbidden errors when using Cody - Suggest disabling anonymizers, VPNs, or open proxies, and using one.one.one.one VPN as a compatible alternative --- docs/cody/troubleshooting.mdx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index 1d0507ba9..54502946c 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -94,6 +94,18 @@ On Windows, - In your Command Prompt or PowerShell window, run the following command: `setx NODE_TLS_REJECT_UNAUTHORIZED 0` - Restart Visual Studio Code and try the sign in process again +### Cloudflare Request Failed + + If you encounter this error: + +``` +Request Failed: Request to https://sourcegraph.com/.api/completions/stream?api-version=1&client-name=vscode&client-version=1.34.3 failed with 403 Forbidden +``` + +It indicates that our web application firewall provider, Cloudflare, has flagged the source IP as suspicious. + +Consider disabling anonymizers, VPNs, or open proxies. If using a VPN is essential, you can try [one.one.one.one](https://one.one.one.one), which is recognized to be compatible with our services. + ### Error exceeding `localStorage` quota When using Cody chat, you may come across this error: From df6fe4975e8c9fb5e79bdf16e8cf32f099853622 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Tue, 5 Nov 2024 16:25:34 -0800 Subject: [PATCH 04/14] feat(troubleshooting): add VS Code Pro license issue explanation - Add explanation for VS Code prompting to upgrade to Pro when already having a Pro license - Clarify that this typically occurs when logged into a free Cody/Sourcegraph account instead of the Pro account --- docs/cody/troubleshooting.mdx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index 54502946c..5a3b86a6c 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -106,6 +106,13 @@ It indicates that our web application firewall provider, Cloudflare, has flagged Consider disabling anonymizers, VPNs, or open proxies. If using a VPN is essential, you can try [one.one.one.one](https://one.one.one.one), which is recognized to be compatible with our services. +### VS Code Pro License Issues + +If VS Code prompts you to upgrade to PRO when you already have a PRO license, this typically occurs when you have both a free and a PRO Cody/Sourcegraph account and are currently logged into the free account instead of your PRO account. To resolve this: + +- Check which account you're currently logged into +- If needed, log out and sign in with your PRO account credentials + ### Error exceeding `localStorage` quota When using Cody chat, you may come across this error: From 7ac46bd8c39c36745dbca8e6f5bcec9006ca4a35 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Tue, 5 Nov 2024 17:06:36 -0800 Subject: [PATCH 05/14] feat(troubleshooting): add explanation for regex asterisk removal - Explain that asterisks may be removed from regex queries when shared with Cody - Provide guidance on how to properly format code blocks to prevent this issue --- docs/cody/troubleshooting.mdx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index 5a3b86a6c..51aa6a253 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -213,3 +213,19 @@ This issue occurs because JCEF isn't supported in Android Studio and causes Cody 1. Then go to `Help` > `Find Action: Choose Boot runtime for the IDE`. 1. Select the last option. 1. Restart Android Studio. + +## Regular Expressions + +### Asterisks being removed + +If you send Cody a prompt with a query string like `$filteredResults = preg_grep('*\.' . basename($inputPath) . '\.*', $fileList);`, the asterisks may be removed because Cody interprets the content as a literal string rather than code. + +When sharing code with Cody, wrap your code in triple backticks (```) to ensure it's recognized as a code block rather than plain text. For example: + +````regex +``` +$filteredResults = preg_grep('*\.' . basename($inputPath) . '\.*', $fileList); +``` +```` + + From 4cd2351f64634ef4cb00a710083229300b192f75 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Wed, 6 Nov 2024 14:20:15 -0800 Subject: [PATCH 06/14] feat(troubleshooting): improve code formatting instructions - Update instructions for opening the Settings panel on macOS and Windows - Clarify that code should be wrapped in triple backticks to ensure proper formatting when sharing with Cody --- docs/cody/troubleshooting.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index 51aa6a253..07226a4a6 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -182,7 +182,7 @@ Following these steps will help the team understand and resolve the performance JetBrains logs can be accessed via the **Output** panel. To access logs, you must first enable Cody logs from the Settings menu. To do so: -- Open the Settings panel (⌘, for MacOS) (Ctrl Alt 0S for Windows) +- Open the Settings panel (`⌘,` for macOS) (`ctrl+alt+s` for Windows) - Go to `Sourcegraph & Cody` - Click on `Cody` - Check the box to Enable debug @@ -227,5 +227,3 @@ When sharing code with Cody, wrap your code in triple backticks (```) to ensure $filteredResults = preg_grep('*\.' . basename($inputPath) . '\.*', $fileList); ``` ```` - - From d20239a1852407d9247629a972af5f88db8e8167 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Wed, 6 Nov 2024 14:29:02 -0800 Subject: [PATCH 07/14] fix(troubleshooting): clarify Cody startup issue with JCEF in Android Studio - grammar fix --- docs/cody/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index 07226a4a6..7236817b4 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -205,7 +205,7 @@ This simple action of turning the plugin off and on again can often resolve the ### Cody cannot start. Stuck on spinning icon. -This issue occurs because JCEF isn't supported in Android Studio and causes Cody not to start. The suggested workaround is to; +This issue occurs because JCEF isn't supported in Android Studio and causes Cody to not start. The suggested workaround is to; 1. Go to `Help` > `Find Action: Registry`. 1. Scroll to `ide.browser.jcef.sandbox.enable`. From e0de9b29fb3b4bf753773fd0fa674a2c1b7eff79 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Wed, 6 Nov 2024 14:29:33 -0800 Subject: [PATCH 08/14] fix(troubleshooting): update Cody chat history storage instructions - Update the instructions for clearing Cody's chat history to use the correct domain placeholder --- docs/cody/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index 7236817b4..d78990611 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -123,7 +123,7 @@ Failed to execute 'setItem' on 'Storage': Setting the value of 'user-history:$us This error indicates that the chat history size surpasses the capacity of your browser's local storage. Cody stores comprehensive context data with each chat message, contributing to this limitation. -To fix this, navigate to https://sourcegraph.example.com/cody/chat and click `Clear Chat History` if your instance is on v5.2.3+. For older versions, clear your browsing data or browser history. +To fix this, navigate to https://sourcegraph.your-domain.com/cody/chat and click `Clear Chat History` if your instance is on v5.2.3+. For older versions, clear your browsing data or browser history. ### Record performance traces for Cody From 0d1f96028f53c3ae43f1c8cd429497c56a940de7 Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Wed, 6 Nov 2024 14:31:34 -0800 Subject: [PATCH 09/14] feat(troubleshooting): fix Markdown lint issue --- docs/cody/troubleshooting.mdx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index d78990611..1cf843e64 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -134,6 +134,7 @@ You can get performance traces from the Cody VS Code extension in production wit ```bash /Applications/Visual\ Studio\ Code.app/Contents/MacOS/Electron --inspect-extensions=9333 ``` + Note that you may need to quit VSCode first, then run that command to re-launch it. It will open all of your windows and tabs again. - After VS Code is started, head over to Chrome and go to `chrome://inspect`, which takes you to the following: @@ -174,8 +175,6 @@ If you are experiencing performance issues with Cody in VSCode, recording a CPU Following these steps will help the team understand and resolve the performance issues more effectively. - - ## JetBrains IntelliJ extension ### Access Cody logs @@ -199,8 +198,6 @@ If you notice the Cody agent reaching 100% CPU utilization, try the following: 1. Re-enable the plugin. This simple action of turning the plugin off and on again can often resolve the high CPU usage issue. - - ## Android Studio extension ### Cody cannot start. Stuck on spinning icon. From d43fae0dfc349ae799ce1974751b16a0d446600c Mon Sep 17 00:00:00 2001 From: Justin Dorfman Date: Wed, 6 Nov 2024 14:37:08 -0800 Subject: [PATCH 10/14] fix(troubleshooting): update rate limit information - Update the rate limit information to clarify the free plan limits and the "Fair Usage" policy on Pro and Enterprise plans - Provide guidance on what to do if rate limit issues persist - Grammar fixes --- docs/cody/troubleshooting.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index 1cf843e64..ed1e811ef 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -70,9 +70,9 @@ To troubleshoot further: ### Rate limits -On the free plan, Cody provides **unlimited autocomplete suggestions** and **200 chat and command invokations** per user per month. +On the free plan, Cody provides **unlimited autocomplete suggestions** and **200 chat and command invocations** per user per month. -On the Pro and Enterprise plans, there are much higher limits that are used to keep our services operational. These limits reset within a day. +On the Pro and Enterprise plans, usage is unlimited but controlled by "Fair Usage" - This means that occasionally, some users may be met with a limitation placed on their account. This limitation resets within 24 hours. If this issue persists, contact one of the support team via https://community.sourcegraph.com, Discord, or support@sourcegraph.com #### 429 errors @@ -202,7 +202,7 @@ This simple action of turning the plugin off and on again can often resolve the ### Cody cannot start. Stuck on spinning icon. -This issue occurs because JCEF isn't supported in Android Studio and causes Cody to not start. The suggested workaround is to; +This issue occurs because JCEF isn't supported in Android Studio and causes Cody to not start. The suggested workaround is to: 1. Go to `Help` > `Find Action: Registry`. 1. Scroll to `ide.browser.jcef.sandbox.enable`. From 7290d31fd91aad151dea82a7931dfb4aa8ccd562 Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Thu, 7 Nov 2024 15:06:55 -0800 Subject: [PATCH 11/14] Rmv banner --- docs/cody/troubleshooting.mdx | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index ed1e811ef..34d053321 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -1,4 +1,3 @@ -{/* Hackathon */} # Troubleshooting Cody

Learn about common reasons for errors that you might run into when using Cody and how to troubleshoot them.

From 37477ec6779ced7379d8b830ac2eb4ee74f89ffe Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Thu, 7 Nov 2024 15:10:40 -0800 Subject: [PATCH 12/14] Add some improvements --- docs/cody/troubleshooting.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index 34d053321..23d1b6362 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -69,9 +69,9 @@ To troubleshoot further: ### Rate limits -On the free plan, Cody provides **unlimited autocomplete suggestions** and **200 chat and command invocations** per user per month. +Cody Free provides **unlimited autocomplete suggestions** and **200 chat and command invocations** per user per month. -On the Pro and Enterprise plans, usage is unlimited but controlled by "Fair Usage" - This means that occasionally, some users may be met with a limitation placed on their account. This limitation resets within 24 hours. If this issue persists, contact one of the support team via https://community.sourcegraph.com, Discord, or support@sourcegraph.com +On Cody Pro and Enterprise plans, usage is unlimited but controlled by **Fair Usage**. This means that some users occasionally experience a limitation placed on their account. This limitation resets within 24 hours. If this issue persists, contact us through our [community forum](https://community.sourcegraph.com), Discord, or email support@sourcegraph.com. #### 429 errors From 7405cf25429de4d99360dc8d0393e98e710db81e Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Thu, 7 Nov 2024 15:14:59 -0800 Subject: [PATCH 13/14] Improve lingo --- docs/cody/troubleshooting.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index 23d1b6362..196636bb5 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -75,7 +75,7 @@ On Cody Pro and Enterprise plans, usage is unlimited but controlled by **Fair Us #### 429 errors -A 429 status code means you are on a free account, and you hit your usage limit/quota for the day. It can also mean you were sending too many requests in a short period of time. If you have Cody Pro and you are seeing 429 errors, you can contact us at [support@sourcegraph.com](mailto:support@sourcegraph.com) to get this resolved. +A 429 status code means you are on a free account and hit your usage limit/quota for the day. It can also mean you were sending too many requests in a short period of time. If you have Cody Pro and you are seeing 429 errors, you can contact us at [support@sourcegraph.com](mailto:support@sourcegraph.com) to resolve this. ### Error logging in VS Code on Linux and Windows @@ -103,11 +103,11 @@ Request Failed: Request to https://sourcegraph.com/.api/completions/stream?api-v It indicates that our web application firewall provider, Cloudflare, has flagged the source IP as suspicious. -Consider disabling anonymizers, VPNs, or open proxies. If using a VPN is essential, you can try [one.one.one.one](https://one.one.one.one), which is recognized to be compatible with our services. +Consider disabling anonymizers, VPNs, or open proxies. If using a VPN is essential, you can try [1.1.1.1](https://one.one.one.one), which is recognized to be compatible with our services. ### VS Code Pro License Issues -If VS Code prompts you to upgrade to PRO when you already have a PRO license, this typically occurs when you have both a free and a PRO Cody/Sourcegraph account and are currently logged into the free account instead of your PRO account. To resolve this: +If VS Code prompts you to upgrade to Pro despite already having a Pro license, this usually happens because you're logged into a free Cody/Sourcegraph account rather than your Pro account. To fix this: - Check which account you're currently logged into - If needed, log out and sign in with your PRO account credentials From d330683ffdfd49418af9328d712374dec266b2e1 Mon Sep 17 00:00:00 2001 From: Maedah Batool Date: Thu, 7 Nov 2024 15:16:45 -0800 Subject: [PATCH 14/14] Add more fixes --- docs/cody/troubleshooting.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cody/troubleshooting.mdx b/docs/cody/troubleshooting.mdx index 196636bb5..b1e961bd1 100644 --- a/docs/cody/troubleshooting.mdx +++ b/docs/cody/troubleshooting.mdx @@ -180,7 +180,7 @@ Following these steps will help the team understand and resolve the performance JetBrains logs can be accessed via the **Output** panel. To access logs, you must first enable Cody logs from the Settings menu. To do so: -- Open the Settings panel (`⌘,` for macOS) (`ctrl+alt+s` for Windows) +- Open the Settings panel (`⌘,` for macOS) (`Ctrl+Alt+S` for Windows) - Go to `Sourcegraph & Cody` - Click on `Cody` - Check the box to Enable debug