RocketChat / RocketChat/Rocket.Chat

Jenkins bot can't post via incoming Webhook: ""

Open
#31,177 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

I try to connect our Jenkins instance to our RocketChat instance.
I installed the app from the marketplace.
When I try to curl via Webhook in a specific channel, it's not working

Description:
debug: 2023-12-07T11:00:40.747Z Appelant: anonymous OR constructor
[
  "webhook's post is being executed...",
  {
    "method": "post",
    "headers": {
      "connection": "upgrade",
      "host": "rocket.XX.XX",
      "x-real-ip": "XX.XXX.XX.XX",
      "x-forwarded-for": "XX.XX.XX.XX",
      "x-forward-proto": "http",
      "x-nginx-proxy": "true",
      "content-length": "338",
      "authorization": "Basic retracted",
      "user-agent": "curl/8.4.0",
      "accept": "*/*",
      "content-type": "application/json"
    },
    "query": {},
    "params": {},
    "content": {
      "emoji": ":smirk:",
      "text": "Example message",
      "channel": "JENKINS_INFO",
      "attachments": [
        {
          "title": "Rocket.Chat",
          "title_link": "https://rocket.chat",
          "text": "Rocket.Chat, the best open source chat",
          "color": "#764FA5"
        }
      ]
    },
    "privateHash": "x"
  }
]```

```error: 2023-12-07T11:00:40.750Z Appelant: apply -> apply
[
  "No `pid` received in the request query"
]```

```debug: 2023-12-07T11:00:40.750Z Appelant: anonymous OR constructor
[
  "webhook's post was successfully executed."
]```


### Server Setup Information:

- Version of Rocket.Chat Server: 6.5.0
- Operating System: Ubuntu 22.04
- Deployment Method: local install
- Number of Running Instances: 1
- NodeJS Version: v14.21.3
- MongoDB Version: 5.0.23 / wiredTiger (oplog Activated)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Jenkins-to-Rocket.Chat incoming Webhook request with curl and compare the request details with the logged error about the missing pid query parameter. Use the reported Rocket.Chat 6.5.0, NodeJS v14.21.3, Ubuntu 22.04, and MongoDB 5.0.23 setup; done means the webhook posts the supplied message to the specified channel.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, nodejs, ubuntu
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.