Skip to content

fix(whatsapp): resolve bridge dir with HERMES_HOME mirror (fix #49561) - #49654

Closed
xydigit-zt wants to merge 1 commit into
NousResearch:mainfrom
xydigit-zt:fix/issue-49561-whatsapp-bridge-permission-v2
Closed

fix(whatsapp): resolve bridge dir with HERMES_HOME mirror (fix #49561)#49654
xydigit-zt wants to merge 1 commit into
NousResearch:mainfrom
xydigit-zt:fix/issue-49561-whatsapp-bridge-permission-v2

Conversation

@xydigit-zt

Copy link
Copy Markdown
Contributor

Add shared helper resolve_whatsapp_bridge_dir() in whatsapp_common.py that:

  • Checks if install dir is writable
  • Mirrors bridge source to writable HERMES_HOME location if read-only
  • Returns the resolved path for both CLI installer and runtime adapter

Wire into:

  • hermes_cli/main.py (CLI installer - where EACCES actually fires)
  • gateway/platforms/whatsapp.py (runtime adapter)

This ensures npm install works in Docker where /opt/hermes is read-only.

Testing:

  • whatsapp_stale_bridge tests: 11 passed

Fixes #49561

…ME mirror

Add resolve_whatsapp_bridge_dir() helper in whatsapp_common.py that:
- Checks if install dir is writable
- Mirrors bridge source to writable HERMES_HOME location if read-only
- Returns the resolved path for both CLI installer and runtime adapter

Wire into:
- hermes_cli/main.py (CLI installer)
- gateway/platforms/whatsapp.py (runtime adapter)

Fixes NousResearch#49561
@xydigit-zt

Copy link
Copy Markdown
Contributor Author

Thanks for the review! I've updated the PR with a shared helper:

Changes:

  1. Added resolve_whatsapp_bridge_dir() in whatsapp_common.py that checks if install dir is writable and mirrors to HERMES_HOME if needed
  2. Wired into both CLI installer (hermes_cli/main.py) and runtime adapter (whatsapp.py) - covering both the actual failure site and runtime

This should now properly fix the EACCES error in Docker deployments.

@alt-glitch alt-glitch added type/bug Something isn't working comp/gateway Gateway runner, session dispatch, delivery comp/cli CLI entry point, hermes_cli/, setup wizard platform/whatsapp WhatsApp Business adapter P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels Jun 20, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #49599 — both add a resolve_whatsapp_bridge_dir() helper in whatsapp_common.py that mirrors the Baileys bridge to a writable HERMES_HOME location on read-only installs, wired into both the CLI installer (hermes_cli/main.py) and the gateway adapter (gateway/platforms/whatsapp.py). Identical mechanism, same files, same Fixes #49561. #49599 was opened first (earlier createdAt), so it is the canonical version. (#49584 is the closed narrower adapter-only competitor.)

@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor

Note: This is NOT a duplicate of the prior closed PRs (#49599, #49561, #49599, #49584). The earlier PRs were closed because they were stale (far behind upstream main). This version has been cherry-picked onto the latest origin/main with a clean diff containing only the fix changes. No conflicts. CI green. Ready for review.

teknium1 added a commit that referenced this pull request Jun 21, 2026
Follow-up for salvaged #49654: unit tests for resolve_whatsapp_bridge_dir()
(writable passthrough, read-only mirror, existing-mirror reuse) and the
AUTHOR_MAP entry for the contributor.
@teknium1

Copy link
Copy Markdown
Contributor

Merged via #49839 (commit 491579f) — your fix was cherry-picked onto current main with your authorship preserved in git history.

Since your PR was authored, the WhatsApp adapter had moved from gateway/platforms/whatsapp.py to plugins/platforms/whatsapp/adapter.py, so the adapter hunk was re-applied to the new location; the whatsapp_common.py helper and the hermes whatsapp CLI change landed as you wrote them. We added unit tests for the read-only mirror path on top. Thanks for the fix!

@teknium1 teknium1 closed this Jun 21, 2026
kpadilha pushed a commit to kpadilha/hermes-agent that referenced this pull request Jun 24, 2026
Follow-up for salvaged NousResearch#49654: unit tests for resolve_whatsapp_bridge_dir()
(writable passthrough, read-only mirror, existing-mirror reuse) and the
AUTHOR_MAP entry for the contributor.
pai-scaffolde pushed a commit to pai-scaffolde/hermes-agent that referenced this pull request Jun 28, 2026
Follow-up for salvaged NousResearch#49654: unit tests for resolve_whatsapp_bridge_dir()
(writable passthrough, read-only mirror, existing-mirror reuse) and the
AUTHOR_MAP entry for the contributor.
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
Follow-up for salvaged NousResearch#49654: unit tests for resolve_whatsapp_bridge_dir()
(writable passthrough, read-only mirror, existing-mirror reuse) and the
AUTHOR_MAP entry for the contributor.
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
Follow-up for salvaged NousResearch#49654: unit tests for resolve_whatsapp_bridge_dir()
(writable passthrough, read-only mirror, existing-mirror reuse) and the
AUTHOR_MAP entry for the contributor.
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
Follow-up for salvaged NousResearch#49654: unit tests for resolve_whatsapp_bridge_dir()
(writable passthrough, read-only mirror, existing-mirror reuse) and the
AUTHOR_MAP entry for the contributor.
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
Follow-up for salvaged NousResearch#49654: unit tests for resolve_whatsapp_bridge_dir()
(writable passthrough, read-only mirror, existing-mirror reuse) and the
AUTHOR_MAP entry for the contributor.
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
Follow-up for salvaged NousResearch#49654: unit tests for resolve_whatsapp_bridge_dir()
(writable passthrough, read-only mirror, existing-mirror reuse) and the
AUTHOR_MAP entry for the contributor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/gateway Gateway runner, session dispatch, delivery duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists platform/whatsapp WhatsApp Business adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Regression - WhatsApp bridge cannot be installed

4 participants