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

Only Generate For Tests working in Agentforce for dev #140

Open
djamouha opened this issue Mar 11, 2025 · 5 comments
Open

Only Generate For Tests working in Agentforce for dev #140

djamouha opened this issue Mar 11, 2025 · 5 comments

Comments

@djamouha
Copy link

djamouha commented Mar 11, 2025

Summary

Hi,
We're having trouble with E4D as only "Generate Tests" is working. All other features throw this error : "Oops, something went wrong. Try rewording your request or clearing the chat. If the problem persists, please let us know and we'll get it sorted out for you. "

Steps To Reproduce:

  1. Authorize an org
  2. Switch to the E4D extension
  3. Try to run : "Please create an apex class for a customer object creating a new account object"

Expected result

Chat propose some apex code

Actual result

Oops, something went wrong. Try rewording your request or clearing the chat. If the problem persists, please let us know and we'll get it sorted out for you.

Additional information

Image

Salesforce Extension Version in VS Code: 63.2.3

Salesforce Einstein For Developers Version in VS Code:2.0.1

OS and version: Windows 10 Version 10.0.19045 Build 19045

VS Code version:1.98.1

@smarvez
Copy link

smarvez commented Mar 11, 2025

Hi @djamouha - Could you please try using the A4D Chat feature again but first, setup debug logging following these steps:

  1. Open up your VS Code Settings and search for Einstein For Developers: Enable Debug Logging. Turn this on if it isn't already.
  2. Open the developer console by running the command Developer: Toggle Developer Tools .
  3. Try Chat again.

The error message you're seeing in the UI should be present in the console logs as well as (hopefully) the root cause. Please follow-up on this thread with what you're seeing in the console.

@djamouha
Copy link
Author

Hi @djamouha - Could you please try using the A4D Chat feature again but first, setup debug logging following these steps:

  1. Open up your VS Code Settings and search for Einstein For Developers: Enable Debug Logging. Turn this on if it isn't already.
  2. Open the developer console by running the command Developer: Toggle Developer Tools .
  3. Try Chat again.

The error message you're seeing in the UI should be present in the console logs as well as (hopefully) the root cause. Please follow-up on this thread with what you're seeing in the console.

Hi @smarvez ,
Just tried that and I am getting this :
log.ts:456 ERR [Extension Host] Error encountered requesting chat stream: Error: Error while validating prompt: Error: Failed to create embedding for prompt at t.isOnTopic (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:166:280) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async t.validatePrompt (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:164:57155) at async qs.validateChatPrompt (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:335:150) at async qs.buildChatRequestBody (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:334:1173) at async qs.getChatStream (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:334:402) at async Bm.handleWebviewMessage (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:331:20660) at async Th.value (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:331:15969) error @ log.ts:456 error @ log.ts:561 error @ logService.ts:51 vls @ remoteConsoleUtil.ts:58 $logExtensionHostMessage @ mainThreadConsole.ts:38 S @ rpcProtocol.ts:458 Q @ rpcProtocol.ts:443 M @ rpcProtocol.ts:373 L @ rpcProtocol.ts:299 (anonymous) @ rpcProtocol.ts:161 B @ event.ts:1208 fire @ event.ts:1239 fire @ ipc.net.ts:652 l.onmessage @ localProcessExtensionHost.ts:378 console.ts:137 [Extension Host] Error encountered requesting chat stream: Error: Error while validating prompt: Error: Failed to create embedding for prompt at t.isOnTopic (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:166:280) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async t.validatePrompt (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:164:57155) at async qs.validateChatPrompt (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:335:150) at async qs.buildChatRequestBody (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:334:1173) at async qs.getChatStream (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:334:402) at async Bm.handleWebviewMessage (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:331:20660) at async Th.value (c:\Users\XXX\.vscode\extensions\salesforce.salesforcedx-einstein-gpt-2.0.1\dist\index.js:331:15969) mls @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 S @ rpcProtocol.ts:458 Q @ rpcProtocol.ts:443 M @ rpcProtocol.ts:373 L @ rpcProtocol.ts:299 (anonymous) @ rpcProtocol.ts:161 B @ event.ts:1208 fire @ event.ts:1239 fire @ ipc.net.ts:652 l.onmessage @ localProcessExtensionHost.ts:378

Just FYI I am behind a company proxy

@smarvez
Copy link

smarvez commented Mar 12, 2025

@djamouha Thanks for that info. I have a suspicion it may be related to your company proxy based on several past issues we've seen (see the root cause for issue #128). If you are able to test it without the proxy and let me know if the issue persists, that would be great. If you're still seeing the error then I would need your Org ID so I can dig further on our end.

@mouhamedSfo
Copy link

@djamouha Thanks for that info. I have a suspicion it may be related to your company proxy based on several past issues we've seen (see the root cause for issue #128). If you are able to test it without the proxy and let me know if the issue persists, that would be great. If you're still seeing the error then I would need your Org ID so I can dig further on our end.

Yes @smarvez , when I try with my personnal computer it works, but not with the company computer.
But what can we do in company side to make it work, specially as when I use the feature Generate test class it works in the company computer.

@smarvez
Copy link

smarvez commented Mar 17, 2025

Hi @mouhamedSfo, you'll have to work with a company admin or IT person to figure out how to allow this endpoint. Unfortunately, there's nothing we can do to get around company proxies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants