RocketChat / Rocket.Chat.Livechat

New Livechat client written in Preact
https://rocket.chat/omnichannel/live-chat
MIT License
247 stars 228 forks source link

Livechat does not work anymore on path different than / ( incomplete fix in #504) #535

Open asarubbo opened 4 years ago

asarubbo commented 4 years ago

Hello,

504 did not fix the reported issue. I do not have permission to reopen the ticket so I'm reporting it in new one.

I updated to rocket.chat-3.8.0 and the issue is still here.

In the nginx log I still can see:

[14/Nov/2020:17:30:55 +0100] "GET /livechat/0.chunk.85c58.js HTTP/2.0" 403
[14/Nov/2020:17:30:55 +0100] "GET /livechat/polyfills.38c0c.js HTTP/2.0" 403
[14/Nov/2020:17:30:55 +0100] "GET /livechat/vendors~bundle.chunk.b4ad3.js HTTP/2.0" 403
[14/Nov/2020:17:30:55 +0100] "GET /livechat/bundle.55ca9.js HTTP/2.0" 403
renatobecker commented 4 years ago

It seems like you have a reverse proxy, right?

asarubbo commented 4 years ago

Hello @renatobecker , yes I have nginx in front of rocket.chat Rocket is reachable at https://rocket.mycompany.com:PORT/rocket

renatobecker commented 4 years ago

Okay, it looks like the error you get comes from your reverse proxy when the widget attempts to access the files. Have you tried it bypassing the reverse proxy?

asarubbo commented 4 years ago

I can't do too much tests because it is a production instance.

I didn't try to bypass the reverse proxy but unless I'm mistaken the context path of the webapp is not respected in some circumstances.

alijundi commented 3 years ago

I have the same issue after my update today. Everything is working well except for livechat. Livechat keeps loading the company URL without /rocketchat/ Path! Example: https://rocketchat.company.com/livechat/0.chunk.85c58.js instead of https://rocketchat.company.com/rocketchat/livechat/0.chunk.85c58.js

I did not change anything in my settings for reverse proxy. I have apache reverse proxy.

Any help would be nice

alijundi commented 3 years ago

Dear @renatobecker I saw your reply above. Do you have a quick fix for this case. I really cannot leave the website without livechat. I guess I should not have updated my previous version.

I would really appreciate your feedback!

alijundi commented 3 years ago

Further more please see below page source of livechat

<!doctype html><html><head><meta charset="utf-8"><title>Rocket.Chat.Livechat</title><meta name="viewport" content="width=device-width,initial-scale=1"></head><body><script> SERVER_URL = 'https://rocketchat.server.com/rocketchat'; </script><script src="/livechat/0.chunk.85c58.js"></script><script src="/livechat/polyfills.38c0c.js"></script><script src="/livechat/vendors~bundle.chunk.b4ad3.js"></script><script src="/livechat/bundle.55ca9.js"></script></body></html>

You can see that the script source is not inline with the SERVER_URL