RocketChat / RocketChat/Rocket.Chat
Can't change avatar image via https REST call
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
When I try to change the avatar on Rocketchat using a REST call:
https://myrocket.it/api/v1/users.setAvatar
Content-Type application/json
with proper parameters and token and the https url of where the image resides, I see a 200 OK code in the logs:
API ➔ debug POST: /api/v1/users.setAvatar
API ➔ debug Success { statusCode: 200, body: { success: true } }
But the avatar won't change.
Steps to reproduce:
- Make a REST call to change the avatar with the URL of the image which resides on another server (still https)
Expected behavior:
The avatar is correctly changed
Actual behavior:
In the rocketchat's docker logs I see the REST was succesfull:
API ➔ debug POST: /api/v1/users.setAvatar
API ➔ debug Success { statusCode: 200, body: { success: true } }
But the avatar still doesn't change.
Server Setup Information:
- Version of Rocket.Chat Server: 3.6.1
- Operating System: CentOS Linux release 7.8.2003
- Deployment Method: official RocketChat docker image
- Number of Running Instances: 1
Client Setup Information
- Desktop App or Browser Version: Desktop 2.17.7
- Operating System:
Additional context
Rocketchat is deployed with docker on a VM and listens on http, port 3000.
The SSL endpoint is on an Apache Reverse Proxy (hosted on another VM) with proper virtualhost configuration and certificate. The DNS domain is registered and correctly functioning.
If I make a request call directly from the VM or inside the rocketchat container to the URL of the image is retrieved succesfully
I've managed to replicate this architecture on a test machine, which consist of a VM with both Apache Reverse Proxy and Rocketchat (same version 3.6.1), deployed with docker .
In this test scenario, everything works fine and the avatar changes. The only differences are that in this case it's HTTP only and there's no DNS (all custom resolutions are made in the hosts file of both host and container.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the users.setAvatar REST endpoint and reproduce the request against the reported Rocket.Chat 3.6.1 Docker setup. Compare the HTTPS reverse-proxy deployment with the working HTTP-only test, including image retrieval from the server or container. Done means the cause of the successful response with no avatar change is identified and the HTTPS case behaves as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- apache, docker
- Domain
- api, backend, infrastructure, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100