RocketChat / Rocket.Chat.ReactNative

Rocket.Chat mobile clients
https://rocket.chat
MIT License
2k stars 1.17k forks source link

Rocket chat whitelabel - cannot login to workspace #2803

Closed C1ean closed 1 year ago

C1ean commented 3 years ago

Description:

Problem only for whitelabel build (from develop branch), app from appstore is work correct

The login to the workspace does not work - the button does not respond to any input data. https://user-images.githubusercontent.com/3279295/104205920-01d04a80-5440-11eb-9678-76f142f48c12.mp4

After building the last build of Rocket Chat repo for ios (4.13.1) and creating the archive and distribute ipa - the problem still exists, and after installing the application, I think this is an build problem, it does not depend on the device (tried it on 3 different ones)

But, on Debug Build - everything works correctly

The problem appeared after 4.10. + Version. (last work version 4.7.) I can't understand what's going on.

by the way, may be the problem appeared after the improvement to save the history of the entered urls.. p.s I also tried to change the applcation_id - so that the assembly was clean, it did not help.

As I understand it, in the case of the debug version, the code is collected when starting from the jsbundle, in the case of the release version - it has already been minified and built. Perhaps this could be the problem? Some time ago, I build bundle before release with react-native bundle --entry-file index.js --platform ios --dev false --bundle-output ios/main.jsbundle --assets-dest ios I don’t do this now, but with this approach the result is the same now :(

Environment Information:

Steps to reproduce:

  1. Open app
  2. Click Join a workspace
  3. Try to enter workspace URL and click Connect

Expected behavior:

See a login screen

Actual behavior:

Nothing happens

Additional context:

App from AppStore is work correct App wich build with Debug works perfect too..

playing771 commented 3 years ago

I had similar problem in IOS (4.13.1 single-server branch).

After entering any valid credentials and pressing login button i cant proceed further to the next screen.

After debugging a bit i noticed catched error "key does not present". In my case the problem was in UserPreferences storage and setStringAsync method.

removing line ".withEncryption()" solved my issue...

C1ean commented 3 years ago

Yes, it's very strange, but it helped me too... remove .withEncryption() from userPreference.js

@diegolmello what do you think about this?

diegolmello commented 3 years ago

Maybe updating react-native-mmkv-storage fixes it. Reference:

Can you guys test if it's the case? We don't want to disable encryption for user credentials and we'd appreciate PRs. Thanks!

C1ean commented 3 years ago

@diegolmello yes, it works for me!! thanks! PR https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/2846

diegolmello commented 3 years ago

@C1ean is this related to #2533

amoebav commented 3 years ago

I have this issue in iOS, but not in Android. Not sure if this matters or not, but I did remove the Apple Sign capability. v4.14.0.

RaviGaruda commented 3 years ago

i have same issue in android app, i also update react-native-mmkv-storage to latest version 0.4.3 but still i can't login

amoebav commented 3 years ago

I updated react-native-mmkv-storage and that fixed it for me as well for the iOS app.

newmanw commented 3 years ago

I am seeing the same thing on both iOS and Android, with the exception that neither debug nor release seems to work. I am currently running single-server branch after 4.15.0 release.

I have tried updating MMKV on the iOS side, still the issue persists. Although since I am seeing this on Android as well, something else must be going on.

DiamoandDog commented 3 years ago

Try uninstalling the app and then reinstall it, which is how I solved it

diegolmello commented 2 years ago

Is this still valid? We updated MMKV (as on https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/2846) on #3634