Scratch Orgでのエラー



# SFDX: Create a Default Scratch Org... failed to run

+ [SFDX: Create a Default Scratch Org... failed to run](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007Utazk)

再インストールしたらしい

# Error (1): This command can only be used on orgs that have source tracking enabled, such as sandboxes and scratch orgs.

+ [Error (1): This command can only be used on orgs that have source tracking enabled, such as sandboxes and scratch orgs.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000Pf8Dy)

:::note
Looks like the issue was reported to Github, but was closed. This prompted me to switch to a different sandbox and see if the problem existed in all of them, and it turns out it doesn't. They were both refreshed at the same time, so I can only deduce that something someone was working on in the first sandbox must have skronked something that broke the connection between that sandbox and prod so the differences couldn't be tracked.

Resetting tracking (sfdx project reset tracking) threw the same error, which makes perefect sense since you'd have to be able to reference the tracking info in order to reset it.

So I suppose the next thing to do is wait until we refresh the offending sandbox and see if that fixes it. It should, given that I can track source in the second andbox, which tells me the Dev Hub isn't corrupted, and since he devtest1 sandbox (the one with the problem) will be refreshed from prod, that shoud lfix it.

この問題は Github に報告されたようですが、クローズされました。このため、別のサンドボックスに切り替えて、すべてのサンドボックスに問題が存在するかどうかを確認するように促されましたが、実際には存在しないことが判明しました。それらは両方とも同時に更新されたため、誰かが最初のサンドボックスで作業していた何かが、そのサンドボックスと本番環境の間の接続を壊す何らかの問題を引き起こし、違いを追跡できなくなったに違いないと推測することしかできません。

トラッキングをリセットすると (sfdx プロジェクトのリセット トラッキング)、同じエラーがスローされました。リセットするにはトラッキング情報を参照できる必要があるため、これは完全に理にかなっています。

したがって、次に行うべきことは、問題のあるサンドボックスを更新して、それが修正されるかどうかを確認するまで待つことだと思います。2 番目のアンドボックスでソースを追跡できることを考えると、Dev Hub が破損していないことがわかり、devtest1 サンドボックス (問題のあるもの) が本番環境から更新されるため、それを修正する必要があります
:::

+ [Yet again: Error fetching metadata for org. Run "SFDX: Authorize an Org" to authorize your org again.](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007cmIIr)


:::note
he key seems to have been, for me, in the mode of installation. As you will be aware, the documentation offers a number of paths to installing salesforce-cli. I'm on a mac, and I had a homebrew installation of node and npm, so I installed manually using npm.

Almost all of the advice on problems of this kind centers on reinstalling or upgrading salesforce-cli or VS Code, but one commentator suggested settling on an LTS version of node, so I downgraded to node 20.15.0 in homebrew. I uninstalled and re-installed sf-cli more than once, but problems remained.

My latest attempt, currently successful, was to uninstall salesforce packages manually, and install MacOS ARM version from Salesforce, here. I also restarted VS Code to update any pending extensions.

Now things are working.

But this is like – I originally used a word that refers to certain rites in Haiti, but my post was rejected because of the language, so I will just say – magic. The question is WHY does this happen, and happen so frequently. It is enormously frustrating to large numbers of potential and actual developers, and nobody seem to know why. I say that because if anyone did know why this happened, surely the problem would be fixed, or at least documented so that a fix could be worked on.

:::

+ [org create scratch is not a sf command](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007eqdgc)

:::note
I did a clean install of the CLI and now it works. Should have tried that first, I guess.

CLI をクリーン インストールしたら動作するようになりました。最初にそれを試すべきだったと思います。
:::






# summer23 複数通貨が有効になっているスクラッチ組織でユーザーの詳細を更新するとエラーが発生する

+ [Currency ISO Code: invalid currency code: 000: [CurrencyIsoCode]](https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000PfB3b)

# 既知の問題

+ [RemoteOrgSignupFailed Error when creating scratch orgs](https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007cmBzE)

:::note
With working with support, a new known issue has been created for Summer '24: 

https://issues.salesforce.com/issue/a028c00000zJQl5/scratch-org-creation-failure-using-orgshape-after-summer24-release
:::