openclaw - 💡(How to fix) Fix [Bug]: Webchat crashes when user sends localhost URL in message [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#59890Fetched 2026-04-08 02:39:10
View on GitHub
Comments
1
Participants
2
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
commented ×1

Error Message

When a user sends a localhost URL (e.g., http://localhost:8080/?state=...) in the webchat input, OpenClaw webchat attempts to parse/process the URL and throws a grammy module error, causing the message to fail. 3. Webchat throws an error: \ERR_MODULE_NOT_FOUND: Cannot find package 'grammy' imported from ...openclaw\dist\sticker-cache-BqQLBzvo.js\

  • Webchat should handle localhost URLs gracefully (either pass them as plain text or display an error without crashing the session)
  • The grammy error appeared after upgrading from 3.28 to 4.1
  • After \pnpm store prune, the grammy error is fixed but localhost URLs may still cause issues

Fix Action

Fix / Workaround

Workaround:

  • Run \pnpm store prune\ to fix grammy module
  • Use Feishu instead of webchat to share localhost URLs
RAW_BUFFERClick to expand / collapse

Bug Description: When a user sends a localhost URL (e.g., http://localhost:8080/?state=...) in the webchat input, OpenClaw webchat attempts to parse/process the URL and throws a grammy module error, causing the message to fail.

Steps to Reproduce:

  1. Have a running OpenClaw gateway with webchat enabled
  2. User types or pastes a localhost URL (e.g., http://localhost:8080/?state=xxx) in the webchat input
  3. Webchat throws an error: \ERR_MODULE_NOT_FOUND: Cannot find package 'grammy' imported from ...openclaw\dist\sticker-cache-BqQLBzvo.js\
  4. User is unable to send the URL via webchat; must use Feishu instead

Workaround:

  • Run \pnpm store prune\ to fix grammy module
  • Use Feishu instead of webchat to share localhost URLs

Expected Behavior:

  • Webchat should handle localhost URLs gracefully (either pass them as plain text or display an error without crashing the session)

Environment:

  • OpenClaw version: 2026.4.1
  • Channel: webchat (feishu works fine)
  • Node.js: v24.14.0
  • OS: Windows_NT

Additional Context:

  • The grammy error appeared after upgrading from 3.28 to 4.1
  • After \pnpm store prune, the grammy error is fixed but localhost URLs may still cause issues
  • Feishu channel handles localhost URLs without problems

extent analysis

TL;DR

Run pnpm store prune to resolve the grammy module error, and consider handling localhost URLs as plain text or displaying an error message without crashing the session.

Guidance

  • Verify that the grammy module error is resolved after running pnpm store prune, and check if localhost URLs can be sent via webchat without issues.
  • Investigate why the grammy error appeared after upgrading from version 3.28 to 4.1, and check for any compatibility issues or changes in the module.
  • Consider implementing a workaround to handle localhost URLs, such as passing them as plain text or displaying an error message, to prevent the webchat session from crashing.
  • Test the Feishu channel to see if it can be used as a temporary workaround for sharing localhost URLs.

Example

No code snippet is provided as it is not explicitly supported by the issue.

Notes

The issue seems to be related to the grammy module and the upgrade from version 3.28 to 4.1. The pnpm store prune command resolves the grammy error, but the issue with localhost URLs may still persist. Further investigation is needed to determine the root cause and implement a permanent fix.

Recommendation

Apply workaround: Run pnpm store prune to resolve the grammy module error, and use Feishu as a temporary workaround for sharing localhost URLs, as it is mentioned to work fine.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Webchat crashes when user sends localhost URL in message [1 comments, 2 participants]