Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(plugins): name what a manifest-less directory is instead of implying a fault

Yudhi Armyndharis782082771a7f
diff --git a/.env.example b/.env.example
index 6a9dde51f..6f234895a 100644
--- a/.env.example
+++ b/.env.example
@@ -25,6 +25,9 @@ LOG_LEVEL=info # error | warn | info | debug
# completed logout (200, credentials wiped) and an incomplete logout (502, `code: 'SESSION_LOGOUT_INCOMPLETE'`)
# clear `phone`, so neither is auto-started on boot — an incomplete-logout session must be started
# explicitly and the logout retried. A session that must stay down can simply be left as-is.
+# Docker Compose: this value only reaches the container from v0.12.0 onward — the bundled
+# docker-compose.yml did not forward it before then (#985), so setting it on an earlier version had
+# no effect and sessions stayed DISCONNECTED on boot regardless.
AUTO_START_SESSIONS=false
# 0 = unlimited. Set a positive integer to cap concurrently running/initializing sessions.
# A FAILED session is evicted by design (no live engine), so it does not hold a concurrency slot.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 94d83d980..1ad98b4cb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -101,6 +101,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
thing that verifies it. CI's shellcheck step now covers every script in `scripts/` instead of three
of them; the BOM is exactly what it reports as SC1082, so the narrow scope is what let it survive.
+- **A stray directory under `data/plugins` no longer reads as a plugin fault.** Anything in there
+ without a `manifest.json` is skipped and logged, once per directory on every boot. The wording was a
+ bare "Plugin `<name>` missing manifest.json", which describes an internal failure rather than a
+ directory the loader simply does not recognise — an operator reporting an unrelated session problem
+ pasted two of these lines as evidence for it. The message now names what was skipped and what to do
+ about it. The `manifest_missing` action key is unchanged, so existing log filters still match.
+
+- **`.env.example` records when `AUTO_START_SESSIONS` began taking effect under Docker Compose.** The
+ bundled `docker-compose.yml` did not forward the variable into the container before v0.12.0, and
+ nothing else could supply it — there is no `env_file:` entry, `.env` is not mounted, and the build
+ context excludes it. Setting the flag on an earlier version therefore did nothing at all, and
+ authenticated sessions stayed `disconnected` after every restart with no indication why. The
+ forwarding itself was fixed in v0.12.0; this only stops the sample config from implying the value was
+ always live.
+
### Removed
- `scripts/openwa.sh`, an orchestration helper superseded by the in-process Docker orchestration on
diff --git a/src/core/plugins/plugin-loader.service.ts b/src/core/plugins/plugin-loader.service.ts
index 19230fcab..0809f776b 100644
--- a/src/core/plugins/plugin-loader.service.ts
+++ b/src/core/plugins/plugin-loader.service.ts
@@ -340,10 +340,14 @@ export class PluginLoaderService implements OnModuleInit, OnApplicationBootstrap
const manifestPath = path.join(pluginPath, 'manifest.json');
if (!fs.existsSync(manifestPath)) {
- this.logger.warn(`Plugin ${entry.name} missing manifest.json`, {
- pluginPath,
- action: 'manifest_missing',
- });
+ // Operators do drop unrelated directories in here, and this fires on every boot for each one.
+ // The old bare "missing manifest.json" wording read like an internal fault — #981's reporter
+ // pasted it into an unrelated session bug as evidence. Say what was skipped and what to do.
+ this.logger.warn(
+ `Skipped ${entry.name}: not a plugin (no manifest.json). Delete the directory to silence this, ` +
+ `or add a manifest.json if it is meant to load.`,
+ { pluginPath, action: 'manifest_missing' },
+ );
if (LEGACY_REMOVED_PLUGIN_IDS.has(entry.name)) {
this.pluginStorage.deletePluginEntry(entry.name);
this.logger.log(`Pruned stale registry entry for removed built-in plugin: ${entry.name}`, {