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

Cannot read properties of undefined (reading 'type') #5361

Closed
AmineId opened this issue Jan 24, 2024 · 5 comments
Closed

Cannot read properties of undefined (reading 'type') #5361

AmineId opened this issue Jan 24, 2024 · 5 comments

Comments

@AmineId
Copy link

AmineId commented Jan 24, 2024

Summary

Hello,

I was trying to retrieve a profile from a Sandbox (UAT) to commit on Gitlab (Using VS Code), the retrieve run indifinetly, but when canceling i have the error Cannot read properties of undefined (reading 'type').

I tried downgrading the CLI version form 59.13.0, upgrading and downgrading @salesforce/cli with npm, Still same issue.

I have deleted the .sf and .sfdx in my system, log out of all orgs registered, then starting fresh, installing the latest @salesforce/cli 2.26 and downgrading vs code cli to 58.14.1. I Auth a sandbox (DEV) for the same project that caused the issue, I get a metadata and done. But if I try logging in to the UAT, the issue persists and nothing will ever work.

But when retrieving or executing a diff on another projet it works.

Salesforce Extension Version in VS Code: 58.14.1

SFDX CLI Version: @salesforce/[email protected]

OS and version: Win 10 Professionnel

VS Code version: version 1.85.2

image

@daphne-sfdc
Copy link
Contributor

Hi @AmineId,
Sorry to hear that none of the workarounds we have provided work for you.

Since the VSCode extensions and the CLI both call a shared library for deploy/retrieve, I was wondering whether retrieving your profile directly from the Terminal using the CLI would result in a slow or fast retrieval time? (If they're both slow then it's an issue inside the shared library)

The command is sf project retrieve start --target-org=MichelinUAT --source-dir=<absolute path to your profile>

@AmineId
Copy link
Author

AmineId commented Jan 25, 2024

Hello @daphne-sfdc,

I tried retrieving directly with the command (I tried with a known working org SUBMGT), and I got this
image
image

Still the CLI is working fine on other projects, I was wondering maybe, It's something in the package that causes the issues, I'm still trying to find out...

Edit 1: Is there a way to run --verbose with the CLI ?

@daphne-sfdc
Copy link
Contributor

HI @AmineId, Have you seen this issue from the CLI team's repo yet? It's a possible duplicate of what you're showing me when you run the retrieve command using the CLI.

From your screenshots, I had a few observations, which leads me to some questions:

  1. When you run sf project retrieve start without the --source-dir flag to specify the file/folder that you want, the default is to retrieve every file in your org. I'm assuming that's not what you were intending and thus a possible reason for the timeout. Can you set the --source-dir flag to point to just one file?
  2. Can you try increasing the wait time to 4 hours and let me know how long the retrieve command actually takes? Add --wait=240 to the end of your command before running it.
  3. I can tell that the SUBMGT org is a Spring 24 (API version v60.0) preview sandbox. What happens if you try to retrieve one file from a Winter 24 (API version v59.0) non-preview sandbox instead? Is it also taking a long time?

@AmineId
Copy link
Author

AmineId commented Jan 29, 2024

Hello @daphne-sfdc,

Sorry for my late reply.

This was an issue with our Hyperforce instance FRA8S, as all orgs in this instance were very slow in performance

see the attached picture
image

I confirm VS Code extension SF CLI and @salesforce/cli are working correctly

For this time, I think best to close the issue, thanks for the support 👍

Amine,

@AmineId AmineId closed this as completed Jan 29, 2024
@daphne-sfdc
Copy link
Contributor

Hi @AmineId, Thank you for the update. And feel free to open a new issue if you are still facing slow deployment after the Hyperforce capacity is increased.

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

No branches or pull requests

2 participants