{"record":{"id":"c0f366cbee98848e","repo":"pulumi/pulumi","slug":"load-provider-w","errorCode":null,"errorMessage":"load provider: %w","messagePattern":"load provider: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/cmd/pulumi/do/do.go","lineNumber":200,"sourceCode":"\t\thost, err := newHost(ctx, diagFwd, statusFwd)\n\t\tif err != nil {\n\t\t\treturn nil, nil, fmt.Errorf(\"create plugin host: %w\", err)\n\t\t}\n\n\t\tpctx, err := plugin.NewContext(\n\t\t\tctx, diagFwd, statusFwd, host, nil, wd, nil, false,\n\t\t\tnil)\n\t\tif err != nil {\n\t\t\tcontract.IgnoreClose(host)\n\t\t\treturn nil, nil, fmt.Errorf(\"create plugin context: %w\", err)\n\t\t}\n\n\t\tp, err := pluginFromSource(ctx, pctx, wd, pkgargs[0])\n\t\tif err != nil {\n\t\t\t// Close the plugin context we opened above since we're not returning it to the caller.\n\t\t\tcontract.IgnoreClose(pctx)\n\t\t\tcontract.IgnoreClose(host)\n\t\t\treturn nil, nil, fmt.Errorf(\"load provider: %w\", err)\n\t\t}\n\t\tcleanup := func() {\n\t\t\tcontract.IgnoreClose(p)\n\t\t\tcontract.IgnoreClose(pctx)\n\t\t\t// host is owned here, closed after the context\n\t\t\tcontract.IgnoreClose(host)\n\t\t}\n\n\t\t// Parse \"name@version\" out of pkgargs[0] so we can also describe the package to downstream consumers\n\t\t// (such as snippet converters) in the form the codegen loader expects.\n\t\tpkgName := pkgargs[0]\n\t\tvar pkgVersion string\n\t\tif at := strings.Index(pkgName, \"@\"); at != -1 {\n\t\t\tpkgVersion = pkgName[at+1:]\n\t\t\tpkgName = pkgName[:at]\n\t\t}\n\t\tpackageDescriptor := &codegenrpc.GetSchemaRequest{\n\t\t\tPackage: pkgName,","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/pulumi/pulumi/blob/793f7b2e160db4321fb7fb6b0607461e01cb251e/pkg/cmd/pulumi/do/do.go#L182-L218","documentation":"pluginFromSource loads the provider plugin named by the first package argument (e.g. \"terraform-provider@5.0.0\"). Failure typically means the plugin binary is not installed, cannot be downloaded, or crashed during startup; the error is wrapped as \"load provider\".","triggerScenarios":"Running `pulumi do --package <name>` where the provider plugin is not installed (`pulumi plugin ls` lacks it), the download from pulumi.com fails, or the provider binary exits during GetSchema handshake.","commonSituations":"Offline/air-gapped environment blocking plugin download; wrong plugin name/typo; incompatible plugin version for the current CLI; corrupt plugin binary in the cache.","solutions":["Install the plugin explicitly: `pulumi plugin install resource <name> <version>`.","Check network access to the plugin registry (or configure an offline mirror).","Verify the package name spelling in --package / the token.","Remove the cached plugin and reinstall: `pulumi plugin rm <name>` then retry."],"exampleFix":"// before\npulumi do --package terraform-provider  // not installed\n// after\npulumi plugin install resource terraform-provider 5.0.0\npulumi do --package terraform-provider@5.0.0","handlingStrategy":"validation","validationCode":"pulumi plugin ls | grep -q \"$provider\" || pulumi plugin install resource \"$provider\" \"$version\"","typeGuard":null,"tryCatchPattern":"p, err := pluginFromSource(ctx, pctx, wd, pkgName)\nif err != nil {\n    contract.IgnoreClose(pctx)\n    contract.IgnoreClose(host)\n    return nil, fmt.Errorf(\"load provider: %w\", err)\n}","preventionTips":["Pre-install required provider plugins before running `pulumi do` in CI.","Pin plugin versions explicitly (name@version) instead of relying on latest.","Verify network access to the plugin registry in air-gapped environments."],"tags":["provider","plugin","grpc","network"],"backgroundTag":"provider-plugin-not-found","analyzedSha":"793f7b2e160db4321fb7fb6b0607461e01cb251e","analyzedAt":"2026-08-31T09:36:43.099Z","schemaVersion":2},"datasetVersion":"2026-09-01T08:17:40.651Z"}