WhatsApp Trigger Stuck on 'Waiting for Trigger Event' – Need Help

Everything was working fine for six days, but today the WhatsApp trigger is not working correctly. It remains stuck on ‘waiting for trigger event’ regardless of how many messages I send, and I can’t stop it either. What can I do to fix this?
version: 1.75.2

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

I’ve got exactly the same problem.
WhatsApp Business Manager, tests from the Meta server side are OK, but on my side the trigger is not responding to the stop command. Incoming data is not registered. Executions are not available for debugging…

instance information

Debug info

core

  • n8nVersion: 1.75.2
  • platform: npm
  • nodeJsVersion: 20.17.0
  • database: sqlite
  • executionMode: regular
  • concurrency: -1
  • license: enterprise (production)

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: memory

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (macintosh; intel mac os x 10_15_7) applewebkit/537.36 (khtml, like gecko) chrome/132.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-01-31T20:08:30.333Z

@n8n Do you have enough info with my debug dump?
At the moment, I’m saving my project every time, go back to the main menu (overview) and go back into the project. That’s apparently the only way to kick it back to life.
Another detail: while the webhook keeps indicating it is waiting for an event, it isn’t doing so. After the first event coming in, it stops listening.
Once the project is active, it will listen without interruption, thank goodness…

P.S.: I’ve upgraded n8n to the latest version 1.76.1 and after that even to n8n@next 1.77.0, but it makes no difference…

Hi @Sven_De_Mey

What you are describing is the expected test behavior of the node. When you click Test Workflow (or Test Step in the node itself) the webhook listens for the next one event and then stops again.
This is to provide you with “fresh” data input for your workflow for testing. You can then pin the data in order to not having to test the node/workflow all the time as that would keep making new calls.

When you’re done building your workflow you can then save it and activate it. This will then “turn on” the trigger node and basically put the webhook in production mode.

Hope that makes sense :slight_smile:

Hello everyone! This solved my issue with the non-responsive “Stop” button when using self-hosted n8n in Docker. :blush:

Step-by-Step Guide to Fix the “Stop” Button Issue in n8n

Problem Description:

Some users may encounter an issue where the “Stop” button does not work when a workflow is in the “waiting for trigger event” state in self-hosted n8n. This guide will help you resolve this problem by addressing common causes such as WebSocket misconfiguration, process management, and container settings.


Step 1: Verify and Update Nginx Configuration

If you’re using Nginx as a reverse proxy, ensure WebSocket is properly configured.

  1. Open the Nginx configuration file:

    sudo nano /etc/nginx/sites-available/default
    
  2. Add or update the following settings inside the location / block:

    location / {
        proxy_pass http://127.0.0.1:5678/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    
        # Add these lines for WebSocket support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_buffering off;
        proxy_read_timeout 3600s;
    }
    
  3. Save and exit:

    • Press CTRL + O, then Enter to save.
    • Press CTRL + X to exit.
  4. Test and restart Nginx:

    sudo nginx -t
    sudo systemctl restart nginx
    sudo systemctl status nginx
    

Step 2: Clear Cache and Restart the n8n Container

Sometimes old processes or cached data can cause issues.

  1. Stop the n8n container:

    docker stop <n8n_container_name>
    
  2. Prune unused Docker resources:

    docker system prune -f
    
  3. Restart the n8n container:

    docker start <n8n_container_name>
    

Step 3: Check n8n Logs for Errors

Logs can provide valuable information about the root cause of the issue.

  1. View n8n logs:

    docker logs -f <n8n_container_name>
    
  2. Look for errors related to triggers or WebSocket connections.


Step 4: Forcefully Stop the Workflow via API

If the “Stop” button still doesn’t work, you can try stopping the workflow directly through the n8n REST API.

  1. Replace <workflow_id> with your workflow’s ID and <api_token> with your n8n API token:

    curl -X POST \
      http://<your_n8n_domain>/rest/workflows/<workflow_id>/stop \
      -H "Authorization: Bearer <api_token>"
    
  2. Find the workflow ID in the URL of the workflow page in the n8n UI.


Step 5: Verify Database Configuration

Ensure the database is correctly configured and accessible.

  1. Check if SQLite is being used (default for self-hosted installations). Ensure the data.db file has proper permissions:

    ls -l /path/to/n8n/data.db
    chmod -R 755 /path/to/n8n/data.db
    
  2. If using PostgreSQL or MySQL, verify the .env file settings:

    DB_TYPE=postgresdb
    DB_POSTGRESDB_HOST=localhost
    DB_POSTGRESDB_PORT=5432
    DB_POSTGRESDB_USER=n8n
    DB_POSTGRESDB_PASSWORD=<password>
    DB_POSTGRESDB_DATABASE=n8n
    

Step 6: Update n8n to the Latest Version

Ensure you’re running the latest version of n8n, as bugs may have been fixed in newer releases.

  1. Pull the latest n8n image:

    docker pull n8n/n8n
    
  2. Restart the container:

    docker-compose up -d
    

Step 7: Adjust Execution Mode

If the issue persists, try switching the execution mode to queue to avoid conflicts.

  1. Edit the .env file:

    EXECUTIONS_MODE=queue
    
  2. Restart the container:

    docker-compose up -d
    

Final Notes:

If none of the above steps resolve the issue, consider creating an issue on the n8n GitHub repository with detailed logs and configuration details.

Thanks to QWEN and GPT for help!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.