continue icon indicating copy to clipboard operation
continue copied to clipboard

Error getting context items from codebase: TypeError: Cannot read properties of undefined

Open ErikGoldman opened this issue 1 year ago • 8 comments

Before submitting your bug report

Relevant environment info

- OS: Windows 11
- Continue version: 0.0.75
- IDE version: Rider 2024.2.5
- Model: GPT4o
- config.json:

Description

When I try to use @codebase, "Gathering context" sits there without any output and then I eventually get the error "Error getting context items from codebase: TypeError: Cannot read properties of undefined (reading 'sort')"

image

To reproduce

https://github.com/user-attachments/assets/e480e433-79a3-4f00-80c5-bb2590654c50

Log output

[2024-10-13T04:30:59] [info] Starting Continue core... 
[2024-10-13T04:30:59] Setup 
[2024-10-13T04:30:59] Core started 
[2024-10-13T04:30:59] Error [ERR_UNSUPPORTED_ESM_URL_SCHEME]: Only URLs with a scheme in: file, data are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' 
[2024-10-13T04:30:59] Could not load config.ts as absolute path, retrying as file url ... 
[2024-10-13T04:31:18] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Source\ThirdParty\silero_vad\silero_vad.jit: Error: did not chunk properly 
[2024-10-13T04:31:25] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Plugins\Sentry\Source\ThirdParty\IOS\Sentry.framework\Modules\Sentry.swiftmodule\arm64-apple-ios.swiftmodule: Error: did not chunk properly 
[2024-10-13T04:31:25] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Plugins\Sentry\Source\ThirdParty\Android\sentry-android-core-release.aar: Error: did not chunk properly 
[2024-10-13T04:31:25] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Plugins\Sentry\Source\ThirdParty\Android\sentry-android-ndk-release.aar: Error: did not chunk properly 
[2024-10-13T04:31:39] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\audience chair.blend: Error: did not chunk properly 
[2024-10-13T04:31:39] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\audience chair.blend1: Error: did not chunk properly 
[2024-10-13T04:31:39] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\buzzer.blend: Error: did not chunk properly 
[2024-10-13T04:31:39] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\buzzer.blend1: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy camera.blend: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy camera.blend1: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy clue board.blend: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy clue board.blend1: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy contestant podium.blend: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy contestant podium.blend1: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy curtain.blend: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy curtain.blend1: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy host podium.blend: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy host podium.blend1: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy score display.blend: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy score display.blend1: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy side board.blend: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\jeopardy side board.blend1: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\podium pen.blend: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\podium pen.blend1: Error: did not chunk properly 
[2024-10-13T04:31:40] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\contestant_fronthigh_clicking.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\contestant_fronthigh_clicking1.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\contestant_fronthigh_clicking2.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\contestant_fronthigh_clicking_chill.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\contestant_fronthigh_idle1.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\contestant_fronthigh_idle2.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\contestant_frontlow_clicking.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\contestant_frontlow_clicking_chill.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\contestant_frontlow_idle.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\host_chat1.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\host_chat2.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\host_chat3.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\host_gesture.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\host_idle.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\host_wave.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Models\Animation\walk.casc: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Content\UI\Fonts\ITC_Korinna_Std_Heavy.otf: Error: did not chunk properly 
[2024-10-13T04:31:41] LanceDBIndex, skipping G:/Unreal_Projects/JeopardyTrainer\Content\UI\Fonts\Swiss_911_Compressed_Regular.otf: Error: did not chunk properly 
[2024-10-13T04:33:03] (node:34036) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `continue-binary --trace-warnings ...` to show where the warning was created) 
[2024-10-13T04:34:38] Generated repo map for G:/Unreal_Projects/JeopardyTrainer at C:\Users\erikg\.continue\.utils\repo_map.txt 
[2024-10-13T04:34:43] Repo map retrieval response:  To address the question regarding how to submit a final jeopardy answer for a player, it's essential to focus on files that pertain to game events, player interactions, and specifically the mechanics surrounding "Final Jeopardy." The relevant files should ideally include those that handle player interactions with the game, state management for game modes, and event handling for submitting answers. This leads us to files that are likely to contain relevant classes and functions for managing submissions, player interactions, and game state changes during "Final Jeopardy." Subfolders like GameEvents and Game would be particularly important as they likely handle the core logic for the game's operations. Additionally, UI components that could involve user interaction for submitting answers should also be included, as they provide the interface for the players.

</reasoning>

<results>
Source\JeopardyTrainer\GameEvents\JeopardyClientGameEventManager.h
Source\JeopardyTrainer\GameEvents\JeopardyClientGameEventQueue.h
Source\JeopardyTrainer\GameEvents\ClientEvents\JeopardyClientGameEventChangeLocalClueState.h
Source\JeopardyTrainer\GameEvents\ClientEvents\JeopardyClientGameEventRevealCategory.h
Source\JeopardyTrainer\GameEvents\ClientEvents\JeopardyClientGameEventRevealFJResponse.h
Source\JeopardyTrainer\Game\JeopardyPlayerControllerBase.h
Source\JeopardyTrainer\Game\JeopardyGameModeBase.h
Source\JeopardyTrainer\Game\JeopardyGameState.h
Source\JeopardyTrainer\Game\JeopardyGameInstance.h
Source\JeopardyTrainer\UI\ClueBoardComponent.h
</results>
[2024-10-13T04:35:41] Generated repo map for G:/Unreal_Projects/JeopardyTrainer at C:\Users\erikg\.continue\.utils\repo_map.txt 
[2024-10-13T04:35:45] Repo map retrieval response:  To determine how to submit a Final Jeopardy answer for a player, we need to focus on files related to game events, player interaction, and the overall game logic. Given that Final Jeopardy is a significant part of the game, files that deal with events triggered for player answers, as well as mechanisms related to tracking game state and player actions, will be crucial. Specifically, files related to client events, game state management, and player controllers will be essential for understanding how answers are captured and processed in the game context. Therefore, files within the GameEvents and Game directories will be most relevant.

</reasoning>

<results>
Source\JeopardyTrainer\GameEvents\JeopardyClientGameEventManager.h
Source\JeopardyTrainer\GameEvents\JeopardyClientGameEventQueue.h
Source\JeopardyTrainer\GameEvents\ClientEvents\JeopardyClientGameEventChangeLocalClueState.h
Source\JeopardyTrainer\GameEvents\ClientEvents\JeopardyGameEventHostReadAnswer.h
Source\JeopardyTrainer\GameEvents\ClientEvents\JeopardyGameEventBuzzIn.h
Source\JeopardyTrainer\GameEvents\ClientEvents\JeopardyGameEventChangeGamePhase.h
Source\JeopardyTrainer\Game\JeopardyGameState.h
Source\JeopardyTrainer\Game\JeopardyPlayerControllerBase.h
Source\JeopardyTrainer\Game\JeopardyPlayerStateBase.h
</results>

ErikGoldman avatar Oct 13 '24 04:10 ErikGoldman

@ErikGoldman I'm trying to figure out the exact code path this is happening on and need a bit more info to reproduce. Can you share your config.json (without keys) and anything else you think might be relevant? Only a few places in the code where .sort is used, but want to figure out which it is before indiscriminately slapping on "?"'s

sestinj avatar Oct 13 '24 06:10 sestinj

@sestinj patched it :) -- take a look at the PR #2513 and let me know what you think

ErikGoldman avatar Oct 13 '24 06:10 ErikGoldman

Yup, that PR was great!

sestinj avatar Oct 14 '24 01:10 sestinj

Im still getting this in 1.0.2

  • OS: Windows 11
  • Continue version:1.0.2
  • IDE version: PyCharm 2024.3.4

Error getting context items from codebase: TypeError: Cannot read properties of undefined (reading 'sort')

as a popup and and context is not added. It does seem to include a list of files in the repo though

tjosgood avatar Feb 28 '25 17:02 tjosgood

@tjosgood I was able to confirm this as well, let's move convo over to #4430

Patrick-Erichsen avatar Mar 04 '25 02:03 Patrick-Erichsen

I encountered same problem on vscode, and I figured it out using this method in this reply in #4430

I got the same problem in JetBrains and vscode when using the pre-made assistants from hub.continue.

I found the cause is the voyager re-ranker which comes default enabled on those assistants. After removing the re-ranker the context works as expected in both IDEs

WatcherNinth avatar Mar 24 '25 17:03 WatcherNinth

Encountered this problem at VSCode: TypeError: Cannot read properties of undefined (reading 'map'). Please, fix it

mikhaylov-ya avatar May 22 '25 12:05 mikhaylov-ya

SAME ISSUE...

GouDanStar avatar Jun 16 '25 06:06 GouDanStar

This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.

github-actions[bot] avatar Sep 15 '25 02:09 github-actions[bot]

This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!

github-actions[bot] avatar Sep 26 '25 02:09 github-actions[bot]