{"record":{"id":"b19e4a9c3c88151a","repo":"mastra-ai/mastra","slug":"slack-no-storage-available-slackprovider-requir","errorCode":null,"errorMessage":"[Slack] No storage available. SlackProvider requires persistent storage, configure a storage backend on your Mastra instance. See https://mastra.ai/docs/storage","messagePattern":"\\[Slack\\] No storage available\\. SlackProvider requires persistent storage, configure a storage backend on your Mastra instance\\. See https://mastra\\.ai/docs/storage","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"channels/slack/src/provider.ts","lineNumber":418,"sourceCode":"          // Ensure storage is initialized (creates tables if needed)\n          await store.init();\n\n          const channelsStorage = (await store.getStore('channels')) as ChannelsStorage | undefined;\n          if (channelsStorage) {\n            this.#storage = channelsStorage;\n            this.#storageResolved = true;\n            return this.#storage;\n          }\n        }\n      } catch (err) {\n        throw new Error(\n          '[Slack] Failed to resolve Mastra storage. Ensure your Mastra instance has storage configured (e.g. LibSQLStore or PostgresStore). See https://mastra.ai/docs/storage',\n          { cause: err },\n        );\n      }\n    }\n\n    throw new Error(\n      '[Slack] No storage available. SlackProvider requires persistent storage, configure a storage backend on your Mastra instance. See https://mastra.ai/docs/storage',\n    );\n  }\n\n  // ===========================================================================\n  // Storage Helpers - Parse/serialize between ChannelInstallation and typed Slack data\n  // ===========================================================================\n\n  /**\n   * Parse a ChannelInstallation record into a typed SlackInstallation.\n   */\n  #parseInstallation(record: ChannelInstallation): SlackInstallation {\n    const data = SlackInstallationDataSchema.parse(record.data);\n    return {\n      id: record.id,\n      agentId: record.agentId,\n      webhookId: record.webhookId ?? '',\n      configHash: record.configHash ?? '',","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/channels/slack/src/provider.ts#L400-L436","documentation":"This is the final guard of #resolveStorage: after attempting all resolution paths without an exception, no storage could be found on the Mastra instance. SlackProvider requires persistent storage to persist installations, pending OAuth state, and config tokens, so it refuses to operate without one.","triggerScenarios":"Calling initialize(), connect(), or any storage-dependent SlackProvider method when the attached Mastra instance has no storage configured and no channels storage is available — resolution completes with nothing found.","commonSituations":"Dev environments where storage was omitted for simplicity; instantiating SlackProvider and attaching it to a Mastra instance built without the storage option; forgetting that in-memory setups don't satisfy the requirement.","solutions":["Add a storage backend to your Mastra instance: new Mastra({ storage: new LibSQLStore({ url: 'file:./mastra.db' }) }) or PostgresStore.","Confirm __attach(mastra) was called with the actual Mastra instance that has storage, not a bare object.","Ensure the storage package (@mastra/libsql, @mastra/pg, etc.) is installed and imported."],"exampleFix":"// before\nexport const mastra = new Mastra({ agents: { slackAgent } });\n// after\nexport const mastra = new Mastra({\n  agents: { slackAgent },\n  storage: new LibSQLStore({ url: process.env.DATABASE_URL ?? 'file:./mastra.db' }),\n});","handlingStrategy":"validation","validationCode":"if (!mastra.getConfig?.().storage) {\n  throw new Error('SlackProvider requires storage: pass storage: new LibSQLStore(...) to new Mastra()');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await provider.initialize();\n} catch (err) {\n  if (err instanceof Error && err.message.includes('No storage available')) {\n    console.error('Add storage: new Mastra({ storage: new LibSQLStore({ url: \"file:./mastra.db\" }) })');\n    process.exit(1);\n  } else throw err;\n}","preventionTips":["Make storage part of your standard Mastra bootstrap template.","Fail fast at startup: probe storage availability before registering channels.","Remember in-memory setups do not satisfy SlackProvider's persistence requirement."],"tags":["storage","configuration","slack"],"backgroundTag":"missing-storage-backend","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}