Error: Could not load the schema for provider
Fixes OpenTofu's 'Could not load the schema for provider' when tofu can't start a provider plugin to read its schema. Use when plan, validate, or providers schema fails at plugin startup. Not for provider installation or registry errors.
TL;DR: tofu can't launch the provider plugin binary to read its schema, so plan, validate, or schema commands die before doing anything. Usually the plugin crashed on startup (a bad provider build), was installed for the wrong platform, or timed out on a loaded box. Reinstall the provider with tofu init -upgrade; if it persists, run the plugin binary by hand to see the real crash.
Error: Failed to load plugin schemas
Error while loading schemas for plugin components: Failed to obtain
provider schema: Could not load the schema for provider
registry.opentofu.org/hashicorp/azurerm: failed to instantiate provider
"registry.opentofu.org/hashicorp/azurerm" to obtain schema: timeout while
waiting for plugin to start..Steps
- Run
tofu init -upgradeto reinstall providers cleanly, then retry the failing command.
Expected: providers reinstall; the command proceeds past schema loading.
- If it still fails, check the plugin actually runs: find the binary under
.terraform/providers/...and execute it directly.
Expected: it prints plugin handshake info and waits. A Go stack trace or an immediate exit here is the real error.
- If the binary crashes, the provider build is bad for your platform. Pin a different provider version in
required_providers, or lock the right platform build withtofu providers lock -platform=[your platform].
Expected: schema loads on retry.
- On slow or loaded CI runners, retry once before concluding anything:
timeout while waiting for plugin to startis often plain resource contention.
Expected: the second run succeeds.
When this applies
tofu plan,tofu validate, ortofu providers schemafails while loading schemas, naming a specific provider.- The tail of the message says the plugin crashed, timed out, or sent an unrecognized message.
When it doesn't apply
Error: Failed to install provideris a download problem; the plugin never got installed.Error: Failed to query available provider packagesis a registry problem; tofu never got as far as launching anything.
Tool versions
All OpenTofu versions; provider protocol versions 5 and 6.
Why it happens
tofu shells out to one plugin process per provider to fetch schemas before it can plan or validate. If that process dies on startup, hangs, or speaks an unexpected protocol, every command that needs the schema fails with this wrapper error instead of the underlying crash.
Edge cases
- Antivirus or endpoint protection on Windows sometimes blocks plugin execution outright; allowlist the tofu plugin directory.
- Small CI runners can OOM-kill provider plugins mid-startup. A vendor KB attributes this exact error to broker memory pressure and fixed it by raising the memory limit.
- Mixed architectures (an arm64 plugin binary on an amd64 runner, or vice versa) crash instantly at startup; check
tofu versionoutput against the installed plugin platform.
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.