{"record":{"id":"a188733236b25db8","repo":"medusajs/medusa","slug":"unable-to-retrieve-the-fulfillment-provider-with-i","errorCode":null,"errorMessage":"Unable to retrieve the fulfillment provider with id: ${providerId} Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file.","messagePattern":"Unable to retrieve the fulfillment provider with id: (.+?) Please make sure that the provider is registered in the container and it is configured correctly in your project configuration file\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/modules/fulfillment/src/services/fulfillment-provider.ts","lineNumber":73,"sourceCode":"    }\n    return `${(providerClass as any).identifier}_${optionName}`\n  }\n\n  protected retrieveProviderRegistration(\n    providerId: string\n  ): FulfillmentTypes.IFulfillmentProvider {\n    try {\n      return this.__container__[`fp_${providerId}`]\n    } catch (err) {\n      if (err.name === \"AwilixResolutionError\") {\n        const errMessage = `\nUnable to retrieve the fulfillment provider with id: ${providerId}\nPlease make sure that the provider is registered in the container and it is configured correctly in your project configuration file.`\n\n        // Log full error for debugging\n        this.#logger.error(`AwilixResolutionError: ${err.message}`, err)\n\n        throw new Error(errMessage)\n      }\n\n      const errMessage = `Unable to retrieve the fulfillment provider with id: ${providerId}, the following error occurred: ${err.message}`\n      this.#logger.error(errMessage)\n\n      throw new Error(errMessage)\n    }\n  }\n\n  async listFulfillmentOptions(providerIds: string[]): Promise<any[]> {\n    return await promiseAll(\n      providerIds.map(async (p) => {\n        const provider = this.retrieveProviderRegistration(p)\n        return {\n          provider_id: p,\n          options: (await provider.getFulfillmentOptions()) as Record<\n            string,\n            unknown","sourceCodeStart":55,"sourceCodeEnd":91,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/modules/fulfillment/src/services/fulfillment-provider.ts#L55-L91","documentation":"Thrown when the FulfillmentProvider service cannot resolve the provider from the container and the underlying error is an AwilixResolutionError (registration missing). This almost always means the provider was never registered — typically because it is not declared in medusa-config.js fulfillment providers or the plugin failed to load.","triggerScenarios":"Configuring a fulfillment option whose provider_id points to a provider not listed in medusa-config.js `fulfillment.providers`, or a local provider file that errored during registration (e.g. missing identifier, see error 604).","commonSituations":"New custom provider added to src/ but not registered in config; typo in provider id; plugin load failure swallowed at startup.","solutions":["Add the provider to `fulfillment` -> `providers` in medusa-config.js (resolve path or npm package)","Confirm the provider's identifier matches the provider_id used on shipping options","Check startup logs for plugin registration errors (e.g. missing static identifier)","Restart the server after config changes"],"exampleFix":"// before\n// medusa-config.js has no fulfillment providers\n// after\nmodule.exports = defineConfig({\n  fulfillment: { providers: [{ resolve: './src/modules/my-fulfillment', options: {} }] },\n})","handlingStrategy":"try-catch","validationCode":"const registered = container.getRegistrationIdentifier /* or check config */\n// simpler: assert config declares the provider before use\nif (!config.fulfillment?.providers?.some((p) => p.resolve.includes(providerId))) throw new Error('Provider not configured')","typeGuard":null,"tryCatchPattern":"try { await service.createShippingOptions(...) } catch (e) { if (/Unable to retrieve the fulfillment provider/.test(e.message)) { /* surface config guidance to operator */ } throw e }","preventionTips":["Declare every custom provider in medusa-config.js before referencing it on shipping options","Run a startup smoke check that resolves each configured provider from the container"],"tags":["fulfillment","provider","container","config","awilix"],"backgroundTag":"provider-not-registered","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}