RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
39.89k stars 10.26k forks source link

Rocket.Chat (4.7.1) not working on Yandex browser #25600

Open sviat9440 opened 2 years ago

sviat9440 commented 2 years ago

Description:

When launch Rocket.Chat on Yandex browser, I see a black screen and a lot of errors in the console. In other browser (like Microsoft Edge, Chrome) all is ok.

Steps to reproduce:

  1. Open Rocket.Chat in Yandex browser

Expected behavior:

Everything works as before

Actual behavior:

Web client crashed

image

Server Setup Information:

Client Setup Information

Relevant logs:

9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092 TypeError: r is not a function
    at eval (/client/sidebar/hooks/useShortcutOpenMenu.js:1:219)
    at df (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:104532)
    at t.unstable_runWithPriority (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1110:3778)
    at _a (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:45381)
    at ff (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:103995)
    at 9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:103906
    at R (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1110:2838)
    at MessagePort.v.port1.onmessage (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1110:1561)
Fi @ 9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092

9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092 TypeError: k is not a function
    at eval (/client/sidebar/header/actions/Search.tsx:1:755)
    at df (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:104532)
    at t.unstable_runWithPriority (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1110:3778)
    at _a (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:45381)
    at ff (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:103995)
    at 9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:103906
    at R (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1110:2838)
    at MessagePort.v.port1.onmessage (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1110:1561)
Fi @ 9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092

9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1110 Uncaught TypeError: r is not a function
    at eval (/client/sidebar/hooks/useShortcutOpenMenu.js:1:219)
    at df (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:104532)
    at t.unstable_runWithPriority (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1110:3778)
    at _a (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:45381)
    at ff (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:103995)
    at 9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1092:103906
    at R (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1110:2838)
    at MessagePort.v.port1.onmessage (9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1110:1561)

9a19deca40b3b34350b0c5e4c4ec2d702791cdc7.js?meteor_js_resource=true:1386 Uncaught (in promise) undefined
IKrendelev commented 2 years ago

Confirm on 4.7.1. Same error on two different deployments.

sashakotljarov commented 2 years ago

Rocket.Chat (4.8.0-rc.0) not working on Yandex browser (22.5.0.1814 (64-bit))

sviat9440 commented 2 years ago

@dudanogueira any reaction?

sashakotljarov commented 2 years ago

any reaction?

I created a ticket for Yandex. Probably a browser issue, not a server issue.

sviat9440 commented 2 years ago

any reaction?

I created a ticket for Yandex. Probably a browser issue, not a server issue.

Ok. Tnx. Please keep us informed.

ankar84 commented 2 years ago

Confirm that on 4.8.1

Probably a browser issue, not a server issue.

Agree with you!

nvkzshadow commented 2 years ago

Having that issue too. I've created ticket to browser@support.yandex.ru and I'm calling you to do the same. https://yandex.ru/support/browser/support/support.html

sviat9440 commented 2 years ago

@nvkzshadow Can you explain what exactly doesn't work in yandex browser?

sashakotljarov commented 2 years ago

Can you explain what exactly doesn't work in yandex browser?

https://drive.google.com/file/d/16vmsCRGfQWVlSZo3ai-gVyzgsWFZloKS/view?usp=sharing

Maybe, Everyone has this problem in yandex bowser

sviat9440 commented 2 years ago

Can you explain what exactly doesn't work in yandex browser?

https://drive.google.com/file/d/16vmsCRGfQWVlSZo3ai-gVyzgsWFZloKS/view?usp=sharing

No, that's not what I meant. I've seen these errors. I meant: why do these errors appear? What should I create a ticket for?

q00Dree commented 2 years ago

Have the same issue. Any updates? Just black screen...

svartedauen commented 2 years ago

I report that we have the same behavior for the last version of Yandex browser. Rocket.Chat Server Version: 4.8.1. Is there a way to fix same gray screen?

mredrake commented 2 years ago

The problem is gone on Yandex Browser 22.5.4.904 after switching to Chrome UA. In other hand, the problem is reproducing on Chrome after switching to Yandex Browser UA (grey screen, errors on console)

There is UA of Yandex Browser for example: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.160 YaBrowser/22.5.4.904 Yowser/2.5 Safari/537.36

This is a server issue.

sashakotljarov commented 2 years ago

Yandex is working on a solution to the problem. Yandex offered a temporary solution... In the Yandex browser shortcut, the "object" section, add an entry of the form: --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"

The result should look like this (spaces are required): C:\Users\%username%\AppData\Local\Yandex\YandexBrowser\Application\browser.exe --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36"

Checked, it works

tanmatra commented 2 years ago

Or you can install "User-Agent Switcher" addon for Yandex browser.

sashakotljarov commented 2 years ago

As Yandex browser support reports, there is a problem with the rocket chat server. It is with the user-agent of the Yandex browser that the problem arises. Even if you specify it in google chrome, the chat will not work either

sviat9440 commented 2 years ago

any updates?

sviat9440 commented 2 years ago

up

sviat9440 commented 2 years ago

version: 5.0.1 still not working

sviat9440 commented 1 year ago

any updates?

mikesrus commented 1 year ago

still not working 4.8.3

kholoshnia commented 1 year ago

We are running into the same issue when trying to use Rocket.Chat 5.0.4 inside iOS WKWebView.

When the meteor is started from the apps/meteor directory with the yarn start command, we can see the unminified missing function name:

screenshot

The tinykeys library function was not found inside these files: \ https://github.com/RocketChat/Rocket.Chat/blob/5.0.4/apps/meteor/client/sidebar/hooks/useShortcutOpenMenu.ts#L7 \ https://github.com/RocketChat/Rocket.Chat/blob/5.0.4/apps/meteor/client/sidebar/header/actions/Search.tsx#L23

It looks like these errors occur when the browser sets some kind of unpopular or invalid User-Agent header.

kholoshnia commented 1 year ago

The workaround I found is to exclude web.browser.legacy archive.

The command to run Meteor without this archive:

meteor run --exclude-archs web.browser.legacy

The command to build Meteor for modern browsers only:

meteor build --platforms web.browser

My guess is that when web.browser.legacy is excluded, legacy browser support is disabled and Meteor considers all browsers to be modern, which is fully supported by Rocket.Chat.

When Meteor first requests a runtime configuration, it checks to see if the browser is out of date using the modern-browsers package. If the requested User-Agent is not listed, Meteor considers the browser to be outdated. So I assume that the solution would be to add full support for Meteor's legacy browser mode, and also fix the modern-browsers package: expand the list of modern browsers, change the browser detection algorithm, or treat unspecified user agents as modern.

mikesrus commented 1 year ago

for me workaround is replace user agent on nginx reverse proxy for users

IKrendelev commented 1 year ago

Ugly, bad and generally non-recommended, but 100%-guaranteed workaround about Yandex.Browser: image

azhinu commented 1 year ago

Using this with Caddy

reverse_proxy rocketchat-app:3000 {
        header_up User-Agent "Linux.*YaBrowser" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
        header_up User-Agent "Macintosh.*YaBrowser" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36"
        header_up User-Agent "Windows.*YaBrowser" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36"
    }
supermike commented 1 year ago

Ugly, bad and generally non-recommended, but 100%-guaranteed workaround about Yandex.Browser:<...>

The changed user-agent did not help. All hope is for your solution. I made this code edit, but nothing has changed, the browser is marked as not modern. Is it necessary to make any additional operations after changing the code, such as App Rebuid/Restart? cd programs/server && npm install - doesn't help. UP: The problem was resolved by user-agent

IKrendelev commented 1 year ago

Ugly, bad and generally non-recommended, but 100%-guaranteed workaround about Yandex.Browser:<...>

The changed user-agent did not help. All hope is for your solution. I made this code edit, but nothing has changed, the browser is marked as not modern. Is it necessary to make any additional operations after changing the code, such as App Rebuid/Restart?

As I remember, I've restarted docker containers by docker-compose down && docker-compose up -d and have cleared application cache on the client side (seems that it's done periodically in automatic mode, but I had to get sure quickly).

Andefraim commented 1 year ago

The app must not rely on UA anymore. Other ways to determine browser capabilities should be used instead. Btw there are polyfills to make older browsers work. The modern Yandex Browser must not have any issues due to its UA.

way2song commented 1 year ago

Hello team. 6.2.2 The bug is saved. Still doesn't work in Ya.Browser Please resolving this issue please image

IT-BAPBAP commented 1 year ago

Hello team. 6.2.5 The bug is saved. Still doesn't work in Ya.Browser Please resolving this issue please image

way2song commented 1 year ago

Hello team! Any news?

krenuser commented 1 year ago

Ugly, bad and generally non-recommended, but 100%-guaranteed workaround about Yandex.Browser: image

Still works using this patch)