I think you might want to set your root URL to your domain and make sure it resolves correctly. It could be a local private domain, or a public one, but it must resolve correctly.
Note: You must use the outside https address for the value at ROOT_URL in [[Section 3|Deploy-Rocket.Chat-without-docker#3-download-rocketchat]] above. This includes the https:// and leave off the port number. So instead of ROOT_URL=http://localhost:3000 use something like https://your_hostname.com
It seems I’m having the same issue and I’m not sure how to resolve it.
I’m using rocketchat 3.16.3 on a URL suffix: https://mydomain.com/chat I have set my ROOT_URL to https://mydomain.com/chat
Everything works fine except for /api/ecdh_proxy/initEncryptedSession
Here is a short excerpt from the console:
Navigated to https://mydomain.com/chat/_oauth/keycloak?state=eyJsb2dpblN0eWxlIjoicmVkaXJlY3QiLCJjcmVkZW50aWFsVG9rZW4iOiJXN3dkN3l1OFF6M01QS0I4a2dhOVhubmlFYmFlWWFuZGVRTDFFMXRuQU1RIiwiaXNDb3Jkb3ZhIjpmYWxzZSwicmVkaXJlY3RVcmwiOiJodHRwOi8vdGVzdHNlcnZlci9jaGF0L2hvbWUifQ%3D%3D&session_state=7e946e53-9804-44c8-8c49-6e382e7eb167&code=9871a27d-2fc1-4fed-b000-bb5a4a8dbd45.7e946e53-9804-44c8-8c49-6e382e7eb167.58d8e5fc-9929-11eb-9c54-eff7529901fc
Navigated to https://mydomain.com/chat/home
VM322:1 POST https://mydomain.com/api/ecdh_proxy/initEncryptedSession 404 (Not Found)
VM322:1 XHR finished loading: POST "https://mydomain.com/chat/api/v1/method.callAnon/login".
VM322:1 XHR finished loading: GET "https://mydomain.com/chat/sockjs/info?cb=x7n57s6sfe".
VM322:1 XHR finished loading: POST "https://mydomain.com/chat/api/v1/method.callAnon/license%3AisEnterprise".
VM322:1 Fetch failed loading: POST "https://mydomain.com/api/ecdh_proxy/initEncryptedSession".
VM322:1 XHR finished loading: POST "https://mydomain.com/chat/api/v1/method.callAnon/public-settings%3Aget".
VM322:1 XHR finished loading: GET "https://mydomain.com/chat/_timesync".
As you can see it loads all requests from the correct URL except for api/ecdh_proxy/initEncryptedSession. It looks for that one in the root.
This issue only started once I added a custom keycloak OAuth provider.
@stefan.badenhorst I ended up using RC without the suffix on localhost where the problem was occuring.
However for my dev environment, we’re using k8s and actually got RC to work with the suffix… let me share the redacted k8s values.yml files with you for your perusal. Hopefully they’ll help.
# Default values for temp.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicas: 1
projectName: rocketchat
namespace: dev
image:
repository: docker.io/library/rocket.chat
tag: 3.16.2
pullPolicy: IfNotPresent
secret:
name: rocketchat-secrets
data:
MONGO_SERVER_CONNECT_STR: mongodb://mongo-svc/chat
configmap:
name: rocketchat-config
data:
ROOT_URL: <our-api-domain>/rc
MONGO_URL: mongodb://mongo-svc/chat
MONGO_OPLOG_URL: mongodb://mongo-svc/local?replSet=rs0
MONGO_OPTIONS: '{ "serverSelectionTimeoutMS": 30000 }'
PORT: 3000
service:
name: rocketchat-svc
targetPort: 3000
port: 3000
imapPort: 993
imapTargetPort: 993
ingress:
name: rocketchat-ing
enabled: true
annotations:
kubernetes.io/ingress.class: nginx-dev
nginx.ingress.kubernetes.io/proxy-body-size: 50m
path: /rc/?(.*)
hosts:
- <our-api-domain-without-https://-prefix>