forcedotcom / salesforcedx-vscode

Salesforce Extensions for VS Code
https://developer.salesforce.com/tools/vscode
BSD 3-Clause "New" or "Revised" License
953 stars 406 forks source link

SFDX Extension is not working for Scratch Orgs #3953

Closed Schuchie closed 1 month ago

Schuchie commented 2 years ago

Summary

I only can use this extension for Sandboxes. When I'm switching to an existing Scratch Org. Im not able to push/pull/depoy/retrieve any source via the context menu.

It all works for Sandboxes. I also switched between multiple Scratch Orgs (also different from Different Dev Hubs). It looks like all Scratch Orgs are affected:

Connected to a sandbox:

image

Connected to a scratch org:

image

As you can see in the scratch org-screen: the sfdx: commands are missing completely in the context menu.

Steps To Reproduce:

  1. Auth a scratch org via the following: sfdx auth:sfdxurl:store -f ./test-randomscratchorg@example.com.auth -a test-randomscratchorg@example.com
  2. Set default org in the vscode-project
  3. You shouldnt be able to deploy anything via the context menu
  4. Try to switch to a sandbox
  5. You should be able.

Expected result

I can see all options from the salesforce extension in vscode.

Actual result

I can not see all options from the salesforce extension in vscode.

Additional information

I can also see some errors in the vscode-dev-console. This error only occurs on activating your extension:

image

Salesforce Extension Version in VS Code:

SFDX CLI Version: 7.143.0-7049747

OS and version: macOS Big Sur 11.6

Schuchie commented 2 years ago

Found a closed issue without any workaround or bugfix from your site: https://github.com/forcedotcom/salesforcedx-vscode/issues/3558

Or also closed: https://github.com/forcedotcom/salesforcedx-vscode/issues/3521

Schuchie commented 2 years ago

Also maybe one more hint:

jag-j commented 2 years ago

@Schuchie - There is a known limitation in source tracked orgs (which includes scratch orgs and some sandbox orgs) and so we don't show "SFDX: Deploy Source to Org" and "SFDX: Retrieve Source From Org" commands for them. We are actively working on this and should have a fix out in one of the upcoming releases. Thank you!

Schuchie commented 2 years ago

Hey @jag-sfdc, but some of mine colleges can use this functionality on scratch orgs (based on same org shape etc.) so its looks completely random for me.

Schuchie commented 2 years ago

@jag-sfdc any update on that problem?

randi274 commented 2 years ago

Hi @Schuchie to follow up on this one - this is an item we're actively working on! We have some big internal updates to roll out first, but once those are out the door we have a lot of this work ready to go. Keep an eye on your release notes over the next month for changes to the source deploy/retrieve behavior. ( #safeharbor of course 😄 )

Schuchie commented 2 years ago

@randi274 Thats sound pretty good. Thx for the feedback!

Schuchie commented 2 years ago

Any update? @randi274

randi274 commented 2 years ago

Getting real close 🤞 those big internal updates turned out to be BIG, but those are finally almost out the door. An updated timeline would likely be after the Dreamforce dust settles.

kevanmoothien commented 1 year ago

Got the same issue recently and not able to resolve it. :(

avaHitesh-github commented 1 year ago

I'm facing the same issue :(

kevanmoothien commented 1 year ago

Hi @avaHitesh-github, I was able to resolve this issue by removing the sf cli and keeping only the sfdx one. Hope it helps in you case.

Schuchie commented 1 year ago

I still have the same problem since the creation of the issue. I dont have sf cli installed only sfdx.

@randi274 did you already published your update?

avaHitesh-github commented 1 year ago

@kevanmoothien I've only installed SFDX CLI but I do see a .sf folder as well and also see the SF command in bin folder of sfdx. Is it just like removing the file from the bin folder or do I need any further steps or commands to remove the SF from sfdx? Thanks!

kevanmoothien commented 1 year ago

I had uninstalled everything including the sf and sfdx cli complement. I also deleted the project's .sf and .sfdx folders. And then I deleted all local configurations that may exist. (On Ubuntu, it was /home/user/.sf and /home/user/.sfdx. And then install sfdx from a fresh install.

randi274 commented 1 year ago

Hi @Schuchie thanks for the follow-up! We're actively working on this during this iteration, so those Deploy/Retrieve commands will appear against scratch orgs once that work is complete.

No ETA on it just yet, but @klewis-sfdc if you're able, can you tag this ticket once that work is ready?

randi274 commented 1 year ago

Just to make sure we're not confusing the issue though @Schuchie - are you still finding that the Push/Pull commands are neither working through the Command Palette nor appearing in a context menu when you're working against a scratch org? That functionality is what should be working today.

Schuchie commented 1 year ago

@randi274 Testest two days ago, these settings were not available on a new project. Also updated the CLI and all the other stuff to the latest version. Still no diff.

sfdx-cli/7.183.1 darwin-arm64 node-v18.11.0 SF Extension package v56.14.0

henriqueadonai commented 1 year ago

I've this problem.

diyer commented 1 month ago

Closing this old issue due to incomplete repro steps and lot of other similar but unrelated issues on same thread. We have now switched to sf. If this issues still occurs, please file a new issue with accurate repro steps.