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

❌ Known Issue: Einstein for Developers does not work in Code Builder environments #93

Open
AnanyaJha opened this issue Sep 5, 2024 · 9 comments
Labels
announcement INVESTIGATION P1 Owned by another team We are maintaining this feedback for visibility but it is not within the control of our team

Comments

@AnanyaJha
Copy link
Collaborator

AnanyaJha commented Sep 5, 2024

Summary

Code Builder users will see Einstein for Developers functionality fail when executing from a Code Builder environment. This is a regression that was introduced ~2 weeks ago due to org authentication changes.

The teams are actively investigating and we'll update this thread with an ETA on a fix asap.

Workaround

As a workaround, please use the following steps:

  • Open the integrated terminal inside Code Builder (CTRL+SHIFT)
  • Replace the alias and run the following CLI command sf org login device --set-default --alias <alias>
  • Open a new integrated terminal. Example Output:
=== Action Required!

Enter 05XJUQHV device code in this verification URL: https://login.salesforce.com/setup/connect
  • Click on the verification URL and enter the provided device code. Follow the rest of the prompts and you should be able to get started with Einstein!

⚠️ Note: You might need to give E4D a minute to pick up the auth. I’ve noticed if I click on something that is not E4D and then click back into E4D everything works.

⚠️ Additional note: The CLI will connect you to your current session, that means whichever org you are currently logged in to. If you want to connect to a different org, make sure to log out of any other orgs.

@AnanyaJha AnanyaJha added INVESTIGATION P1 announcement Owned by another team We are maintaining this feedback for visibility but it is not within the control of our team labels Sep 5, 2024
@AnanyaJha AnanyaJha pinned this issue Sep 5, 2024
@forcedotcom forcedotcom deleted a comment from git2gus bot Sep 6, 2024
@aidanfowler
Copy link

This workaround does not work. E4D continues to show not connected to default org after completing the authentication via command line.

@randi274
Copy link

randi274 commented Sep 9, 2024

Hi @aidanfowler are you seeing any additional errors in the Developer Tools, or under Output > Einstein for Developers? Here's a screen capture of a flow that worked for me to log in using the device login. I also been able to work with scratch orgs if I set up a Dev Hub and then create a scratch org from my dev hub.

CBAuthLoginFlow.mov

@aidanfowler
Copy link

aidanfowler commented Sep 9, 2024

After repeating your steps, there is an unknown error popup in the bottom right corner. Dev assistant shows "The Salesforce org you're connected to can't access Einstein for Developers. Connect to a different org and try again. Log an issue if the problem persists.".

Screen.Recording.2024-09-09.at.11.49.33.AM.mov

@randi274
Copy link

randi274 commented Sep 9, 2024

Thank you for adding the video as well! Is it possible for you to run >SFDX: Log Out from all Authorized Orgs first? I realize now I had done that first, restarted Code Builder, and then started with my auth flow.

@aidanfowler
Copy link

@randi274 that worked, thanks so much!

@thedanfernandez
Copy link

thedanfernandez commented Sep 16, 2024

Hey,

@randi274, I tried to reset my environment, and logged out of all orgs but I'm getting a Type error, below:

  1. List all orgs returns no orgs found
$ sf org list --all
 ›   Warning: @salesforce/cli update available from 2.57.7 to 2.58.7.

Result

No Orgs found.
  1. Login to an org (not a scratch org)
$ sf org login device --set-default --alias myorg
 ›   Warning: @salesforce/cli update available from 2.57.7 to 2.58.7.
=== Action Required!

Enter XXXXXX device code in this verification URL: https://login.salesforce.com/setup/connect

Result

    TypeError: Cannot read properties of undefined (reading 'includes')

Logging in from VS Code commands SFDX: Authorize an Org does login and shows the status as Connected via CLI, but E4D doesn't auth.

@goravseth
Copy link

I have tried the workarounds above multiple times, including logout from all orgs, but get the same 'oops looks like you ran into an issue with running E4D' error message with a link to this page.

If I refresh the browser window, E4D appears to load for a sec, and i can see the input prompt, and then it quickly gets replaced with "The Salesforce org you're connected to can't access Einstein for Developers."... i've tried prod and a partial-copy sandbox.

any ETA on a fix? or other suggestions to try?

@goravseth
Copy link

Tried again and was finally successful. This time I connected to prod first.

However, once I switched my default org to my partial copy sandbox, I got the error "The Salesforce org you're connected to can't access Einstein for Developers. Connect to a different org and try again"

Using a different sandbox is working. Pehrpas e4d doesnt work with partial copy sandboxes, or perhaps the sandbox needs to be refreshed. Calling it good for now.

@dstewart-fresenius
Copy link

I am continually running into the error, lower left, indicating 'No default org set.' after logging out of all orgs, restarting Code Builder and running the 'sf org login device --set-default --alias ' command. Question: Should the default be my production org, where Einstein is enabled, since that's where login.salesforce.com/.. takes me?

I am seeing the 'Login successful for ' in Terminal, and the Einstein: Dev Assistant looks hopeful for a moment, then it refreshes back to 'Welcome!..' and 'Connect to a Salesforce Org' and the little brown error in the lower right reappears w' 'No Default Org set.'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
announcement INVESTIGATION P1 Owned by another team We are maintaining this feedback for visibility but it is not within the control of our team
Projects
None yet
Development

No branches or pull requests

6 participants