Troubleshooting
Production playbooks for the most common DNotifier SDK issues. Each section lists symptoms, likely causes, and step-by-step fixes.
Connection failures
Symptoms
connect()throws or rejectsonConnectednever firesSocket opens then immediately closes
isConnectedstaysfalse
Likely causes
Missing required constructor fields
Provide appId, secret, transport, userId
Node.js without WebSocketImpl
Pass WebSocketImpl: WebSocket from the ws package
Network / firewall blocks wss://
Allow outbound TLS to api.dnotifier.com
Corporate proxy
Configure proxy for WebSocket or run from unrestricted network
Called send() before connect() finished
await notifier.connect() first
Invalid custom url
Remove override or fix URL; use wss:// in production
Diagnostic steps
Log the exact error from
connect()catch blockVerify credentials in app.dnotifier.com
Run minimal connect script from Debugging
In browser: DevTools → Network → WS — check close code and reason
Confirm transport:
wsfor realtime,httpfor AI-only (no socket expected)
Node.js quick fix
→ Connection lifecycle · Node.js platform guide
Auth 400 — authentication failed
Symptoms
Error message contains
Authentication Failedor HTTP 400 from auth endpointconnect()fails before WebSocket opensauthTokenis null or undefined
Likely causes
Wrong secret
Copy fresh secret from dashboard; redeploy env vars
Wrong appId
Match app ID exactly (no extra spaces)
Dev credentials in production
Create separate production app
Secret rotated but deployment stale
Update all running instances
Empty env vars
echo $DNOTIFIER_SECRET — must not be blank
Diagnostic steps
Open app.dnotifier.com → your app → verify App ID and secret
Rotate secret if unsure; update deployment immediately
Test with hard-coded values only in local terminal (never commit)
For HTTP transport, auth uses the same endpoint — failure is not WebSocket-specific
→ Credentials & environment · Security best practices
AI not enabled
Symptoms
aiEnabledisfalseafterconnect()sendAI()fails or returns an errorgetPlanLimits()shows AI disabled
Likely causes
Plan does not include AI
Upgrade plan at app.dnotifier.com
Wrong app (free/staging tier)
Confirm app under correct account and plan
Using ws transport for sendAI
Switch to transport: "http" for AI calls
Monthly quota exhausted
Check dashboard usage; wait for reset or upgrade
Diagnostic steps
If
aiEnabled: false— plan issue, not codeIf
aiEnabled: truebutsendAIfails — check transport ishttpand error message for quotaGate UI features on
aiEnabledto avoid user-facing errors
→ AI overview · Pricing & plans
Message not received
Symptoms
send()resolves without errorSender sees success; receiver's
onMessagenever firesChat appears one-way
Likely causes
Receiver not connected
Receiver must await connect() with transport: "ws"
Wrong receiverId
IDs must match exactly — check spelling and prefix rules
Receiver using HTTP transport
HTTP does not push to onMessage — use ws on receiver
Same userId typo on both sides
Confirm sender's receiverId equals receiver's userId
Receiver callback not registered
Set onMessage before connect()
Message filtered in app code
Log raw onMessage before routing logic
Chunk reassembly still in progress
Wait for full payload on large messages
Diagnostic steps
Sender: log
{ senderId, receiverId, data.type }on every sendReceiver: log every
onMessageat the top of the handlerConnect two clients with distinct
userIdvalues in a test scriptSend minimal text:
{ type: "text", text: "ping" }Verify both use
transport: "ws"for realtime delivery
→ Send & receive text · Understanding messages
Workflow errors
Symptoms
runWorkflow()throwsWorkflowErrorwith validation messageWorkflow runs but
resultis undefinedNo
executionIdin dashboard
Likely causes
Agent not registered
Call .registerAgents({ ... }) before runWorkflow
Wrong agent name in ctx.runAgent()
Name must match defineAgent({ name })
transport: "ws"
Use transport: "http" for workflows
Not connected
await notifier.connect() before runWorkflow
Uncaught exception in agent run
Wrap agent logic in try/catch; error propagates as workflow failure
observability: true but no executionId
Confirm connect() succeeded and network access to the production API host
Permission denied on tool execute
Use permissionEnforcement: "disabled" for local demos, or set agent permissions
MCP connect fails
Verify the MCP HTTPS endpoint, transport: "http", and network access
Tool agents: Tools & MCP
Diagnostic steps
Validate workflow structure:
entryfunction, registered agentsRun minimal one-agent workflow in isolation
Enable
observability: trueand search dashboard by workflow nameInspect
WorkflowErrormessage for missing agent or invalid step
Minimal working workflow
→ Workflows overview · Define an agent
Other common issues
No WebSocket implementation provided
Add WebSocketImpl (Node) or run in browser
WebSocket not connected on send
Await connect(); handle disconnect/reconnect
Chat history empty
Call fetchChatHistory; response arrives via onMessage
Large image never displays
Wait for chunk reassembly; check messageSizeLimit
Duplicate messages in UI
Deduplicate by msg.metadata.id
When to contact support
Gather before contacting support:
SDK language and version (npm / pub.dev)
Transport (
wsorhttp)Redacted error message and stack trace
Whether auth succeeds (
authTokenpresent)getPlanLimits()outputTimestamp and app ID (never the secret)
→ Support & links
Related guides
Last updated