Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cody extension cause vscode-react-native debug failed #6250

Open
biaji opened this issue Dec 4, 2024 · 3 comments
Open

cody extension cause vscode-react-native debug failed #6250

biaji opened this issue Dec 4, 2024 · 3 comments
Assignees
Labels
bug Something isn't working question Further information is requested repo/cody

Comments

@biaji
Copy link

biaji commented Dec 4, 2024

Version

v1.46.0

Describe the bug

as described at microsoft/vscode-react-native#2253

TypeError: Cannot read properties of null (reading 'agent')
	at Object.patchedFn [as get] (/Users/xxxx/.vscode/extensions/sourcegraph.cody-ai-1.46.0/dist/extension.node.js:180958:21)
	at /Users/xxxx/workspace/vscode-react-native/src/common/node/request.js:11:50
	at new Promise (<anonymous>)
	at Request.request (/Users/xxxx/workspace/vscode-react-native/src/common/node/request.js:10:16)
	at Packager.<anonymous> (/Users/xxxx/workspace/vscode-react-native/src/common/packager.js:299:54)
	at Generator.next (<anonymous>)
	at /Users/xxxx/workspace/vscode-react-native/src/common/packager.js:10:71
	at new Promise (<anonymous>)
	at __awaiter (/Users/xxxx/workspace/vscode-react-native/src/common/packager.js:6:12)
	at Packager.isRunning (/Users/xxxx/workspace/vscode-react-native/src/common/packager.js:296:16)
	at Packager.<anonymous> (/Users/xxxx/workspace/vscode-react-native/src/common/packager.js:225:28)
	at Generator.next (<anonymous>)
	at /Users/xxxx/workspace/vscode-react-native/src/common/packager.js:10:71
	at new Promise (<anonymous>)
	at __awaiter (/Users/xxxx/workspace/vscode-react-native/src/common/packager.js:6:12)
	at Packager.stop (/Users/xxxx/workspace/vscode-react-native/src/common/packager.js:222:16)
	at StopPackager.<anonymous> (/Users/xxxx/workspace/vscode-react-native/src/extension/commands/stopPackager.js:48:94)
	at Generator.next (<anonymous>)
	at /Users/xxxx/workspace/vscode-react-native/src/extension/commands/stopPackager.js:10:71
	at new Promise (<anonymous>)
	at __awaiter (/Users/xxxx/workspace/vscode-react-native/src/extension/commands/stopPackager.js:6:12)
	at StopPackager.baseFn (/Users/xxxx/workspace/vscode-react-native/src/extension/commands/stopPackager.js:46:16)
	at StopPackager.<anonymous> (/Users/xxxx/workspace/vscode-react-native/src/extension/commands/util/reactNativeCommand.js:64:23)
	at Generator.next (<anonymous>)
	at /Users/xxxx/workspace/vscode-react-native/src/extension/commands/util/reactNativeCommand.js:10:71
	at new Promise (<anonymous>)
	at __awaiter (/Users/xxxx/workspace/vscode-react-native/src/extension/commands/util/reactNativeCommand.js:6:12)
	at /Users/xxxx/workspace/vscode-react-native/src/extension/commands/util/reactNativeCommand.js:56:31
	at /Users/xxxx/workspace/vscode-react-native/src/common/telemetryHelper.js:123:29
	at TelemetryGenerator.<anonymous> (/Users/xxxx/workspace/vscode-react-native/src/common/telemetryGenerators.js:64:30)
	at Generator.next (<anonymous>)
	at /Users/xxxx/workspace/vscode-react-native/src/common/telemetryGenerators.js:10:71
	at new Promise (<anonymous>)
	at __awaiter (/Users/xxxx/workspace/vscode-react-native/src/common/telemetryGenerators.js:6:12)
	at TelemetryGenerator.time (/Users/xxxx/workspace/vscode-react-native/src/common/telemetryGenerators.js:61:16)
	at TelemetryHelper.generate (/Users/xxxx/workspace/vscode-react-native/src/common/telemetryHelper.js:123:14)
	at StopPackager.<anonymous> (/Users/xxxx/workspace/vscode-react-native/src/extension/commands/util/reactNativeCommand.js:51:53)
	at Generator.next (<anonymous>)
	at fulfilled (/Users/xxxx/workspace/vscode-react-native/src/extension/commands/util/reactNativeCommand.js:7:58)

cody's patch code gen an error.

Expected behavior

remove this sideeffect

Additional context

No response

@biaji biaji added bug Something isn't working repo/cody labels Dec 4, 2024
Copy link

linear bot commented Dec 4, 2024

@PriNova PriNova self-assigned this Dec 10, 2024
@PriNova PriNova added the question Further information is requested label Dec 10, 2024
@PriNova
Copy link
Collaborator

PriNova commented Dec 10, 2024

Hey @biaji

Can you please describe the reproducible steps to pin down the issue and where it happens.

Thank you

@biaji
Copy link
Author

biaji commented Dec 11, 2024

Hey @biaji

Can you please describe the reproducible steps to pin down the issue and where it happens.

Thank you

  1. install cody and react native tools extension;
  2. Open a react-native project and using debug once(must load the application in client)
  3. close vscode
  4. open vscode and same project again,
  5. try to attach

as described in microsoft/vscode-react-native#2253.

it look like cody patched the Request API which not handle some scenario correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested repo/cody
Projects
None yet
Development

No branches or pull requests

2 participants