mattermost / mattermost-mobile

Next generation iOS and Android apps for Mattermost in React Native
https://about.mattermost.com/
Apache License 2.0
2.23k stars 1.35k forks source link

Unable to login: password field must not be blank #4146

Closed stigok closed 4 years ago

stigok commented 4 years ago

Summary

I am unable to login with my username and password. It says I have a blank password field, which I don't.

Environment Information

Steps to reproduce

Expected behavior

Observed behavior

signal-attachment-2020-04-13-115547

Possible fixes

Downgrading mobile app to 1.19 worked perfectly.

amyblais commented 4 years ago

@stigok Do you see the same issue on v1.29?

stigok commented 4 years ago

I will have to wait and see until v1.29 is available on F-Droid.

licaon-kter commented 4 years ago

Yup, same here (reported elsewhere for 1.28.0), even on 1.30.0 build via F-Droid (locally).

@amyblais Can anyone get the F-Droid version and test?

stigok commented 4 years ago

Ping me if you want me to test a new version available on F-Droid.

licaon-kter commented 4 years ago

Same for 1.30.1 build via F-Droid locally.

licaon-kter commented 4 years ago

@stigok 1.30.0 is live: https://f-droid.org/en/packages/com.mattermost.rnbeta/

robinmetral commented 4 years ago

1.30.0 is live: https://f-droid.org/en/packages/com.mattermost.rnbeta/

Just tested on my end, still getting the error :confused:

licaon-kter commented 4 years ago

One "strange trick that mattermost hates" is to install 1.19 and login, then upgrade to 1.28 and then to 1.30.0

For some reason 1.19 to 1.30.0 asked me to login again, and of course failed.

licaon-kter commented 4 years ago

1.30.1 is on F-Droid, as said ^^^ upgraded ok if already logged in. Still fails to login otherwise.

licaon-kter commented 4 years ago

Hmm, looks like I can't send messages ...I get the red exclamation mark :(

Roy-Orbison commented 4 years ago

To add weight, I'm getting this on Android 10 (not LineageOS) with MM Beta app v1.30.1 and MM TE server v5.22.1.

Without looking into the code, it seems to be either a broken request, or an incompatibility with the server API. If I leave the password field blank and try logging in, the error is Please enter your password, but if I type anything at all and submit, the error becomes Password field must not be blank. It looks like the app's submitting something other than what the server expects.

a3nm commented 4 years ago

Same problem here, "Mattermost Beta" version 1.30.1 from F-droid, server Mattermost Enterprise Edition version 5.21.0.

reposocial commented 4 years ago

i have the same problem with this on Android. with Mattermost version 1.31.0 please Mattermost Team Fix this issue. or any suggestion to fix this

licaon-kter commented 4 years ago

Same on 1.31.1 FYI

robinmetral commented 4 years ago

@amyblais is this being addressed?

amyblais commented 4 years ago

F-Droid is community maintained and is not officially supported by Mattermost. Has F-Droid been contacted about this issue?

licaon-kter commented 4 years ago

F-Droid does not have the expertise, hence this issue and the request to please take a look.

Since you (Mattermost) are not interested (afaik https://github.com/mattermost/mattermost-mobile/pull/1686) in maintaining a fully FOSS flavor of the app, the patches that the F-Droid contributors made up are all that we have.

And those, I guess, are rather old and broken, albeit it miraculously builds. :)

I keep updating the F-Droid metadata for new builds but I can't fix whatever that is broken.

a3nm commented 4 years ago

I can confirm that the problem does not seem to be present on the APK of https://github.com/mattermost/mattermost-mobile/releases/tag/v1.31.1 so this bug may indeed be specific to F-droid.

However, if the F-droid folks are not managing to build the application in a way that works, so that the only way to get a working copy of the app is via the binary builds on Google Play, the App Store, and the binary releases on Github, then there's a question of whether this software indeed qualifies as free software...

Thanks in any case for your help.

Adrian-Hufnagl commented 4 years ago

Im getting the same error by starting the App from scratch Tested Version 1.19, 1.28, 1.30. Android Versions 6, 8, 10 It does not seem to be related just to the F-Droid Team

enahum commented 4 years ago

Are you building the app yourselves? Are you applying the patch for rn-fetch-blob? Without the patch being applied this is exactly what happens...

Adrian-Hufnagl commented 4 years ago

I have now ran it succesfully on android. I set the project up again with MacOS. I took the Repo from Mattermost-Mobile. My other failed attempts ran with rn-fetch-blob 0.12.0

enahum commented 4 years ago

Now I wonder if the other patches are also being left out...

licaon-kter commented 4 years ago

@enahum Where/when are the patches applied exactly? I've looked at https://developers.mattermost.com/contribute/mobile/build-your-own/ or https://github.com/mattermost/mattermost-mobile/blob/master/Makefile and I can't grasp what step should do that.

enahum commented 4 years ago

@licaon-kter https://github.com/mattermost/mattermost-mobile/blob/master/Makefile#L74 which is triggered by https://github.com/mattermost/mattermost-mobile/blob/master/package.json#L158 and applies all the patches here https://github.com/mattermost/mattermost-mobile/tree/master/patches

licaon-kter commented 4 years ago

The main buildserver log is rather spartan so I've run it locally, for 296 com.mattermost.rnbeta_296.log.gz

The interesting bits start at line 1687, I guess:

patch-package 6.2.1
Applying patches...
react-native@0.61.5 ✔
react-native-fast-image@8.1.5 ✔
react-native-haptic-feedback@1.9.0 ✔
react-native-image-picker@2.3.1 ✔
react-native-keyboard-tracking-view@5.6.1 ✔
react-native-local-auth@1.6.0 ✔
react-native-mmkv-storage@0.3.1 ✔
react-native-navigation@6.3.0 ✔
react-native-notifications@2.0.6 ✔
react-native-passcode-status@1.1.2 ✔
react-native-vector-icons@6.6.0 ✔
Error: Patch file found for package react-native-youtube which is not present at node_modules/react-native-youtube

But the files are there:

vagrant@basebox-stretch64:~/build/com.mattermost.rnbeta/patches$ ls -la
total 404
drwxr-xr-x  2 vagrant vagrant   4096 Jun  4 13:31 .
drwxr-xr-x 18 vagrant vagrant   4096 Jun  4 13:41 ..
-rw-r--r--  1 vagrant vagrant  14209 Jun  4 13:31 react-native+0.61.5.patch
-rw-r--r--  1 vagrant vagrant   2558 Jun  4 13:31 react-native-fast-image+8.1.5.patch
-rw-r--r--  1 vagrant vagrant    832 Jun  4 13:31 react-native-haptic-feedback+1.9.0.patch
-rw-r--r--  1 vagrant vagrant  14579 Jun  4 13:31 react-native-image-picker+2.3.1.patch
-rw-r--r--  1 vagrant vagrant  19884 Jun  4 13:31 react-native-keyboard-tracking-view+5.6.1.patch
-rw-r--r--  1 vagrant vagrant   7101 Jun  4 13:31 react-native-local-auth+1.6.0.patch
-rw-r--r--  1 vagrant vagrant   2521 Jun  4 13:31 react-native-mmkv-storage+0.3.1.patch
-rw-r--r--  1 vagrant vagrant   4306 Jun  4 13:31 react-native-navigation+6.3.0.patch
-rw-r--r--  1 vagrant vagrant  21395 Jun  4 13:31 react-native-notifications+2.0.6.patch
-rw-r--r--  1 vagrant vagrant   1399 Jun  4 13:31 react-native-passcode-status+1.1.2.patch
-rw-r--r--  1 vagrant vagrant   1549 Jun  4 13:31 react-native-vector-icons+6.6.0.patch
-rw-r--r--  1 vagrant vagrant   3911 Jun  4 13:31 react-native-youtube+2.0.0.patch
-rw-r--r--  1 vagrant vagrant    591 Jun  4 13:31 redux-persist+6.0.0.patch
-rw-r--r--  1 vagrant vagrant 278798 Jun  4 13:31 rn-fetch-blob+0.12.0.patch

...right so, the files are parsed in order and patch-package bails out on the first error, so we need to remove the now useless patch to allow it to apply all the other patches.

I was expecting the whole build to fail if the patching fails or (like the actual patch does) the patching to continue with the rest of the files, the current behaviour is inconsistent in your build system, imho.

Ref: Superseded by https://github.com/ds300/patch-package/pull/217 when merged maybe

/LE: fyi: https://gitlab.com/fdroid/fdroiddata/-/merge_requests/6908/diffs#730ae114c8a76273c5ef6d95d09ef3d41f7db7a6_528_542

dromer commented 4 years ago

Server: 5.23.1 With client 1.19.0 this worked fine.

After upgrading to 1.31.1 I was able to reuse the login token. It was not possible to see old channel messages or send messages, but I could see new messages coming in. After logging out I get the same password must not be blank message and am unable to use the app.

This seems to me like an issue in how the client communicates to the server and goes deeper than just the login screen.

Roy-Orbison commented 4 years ago

I can confirm I'm able to log in, view all previous messages, etc. with v1.31.2. 🎉 🍾

dromer commented 4 years ago

Yup, with latest version of the app in f-droid 1.31.2 things seem to work.

a3nm commented 4 years ago

Same here. Thanks for fixing this issue! I think the bug can be closed.

reposocial commented 4 years ago

Same here. Thanks for bugs fixing issue.

roya002ar commented 2 weeks ago

Agent_Liza_BDT

roya002ar commented 2 weeks ago

![Uploading Screenshot_2024-09-27-04-35-02-83_40deb401b9ffe8e1df2f1cc5ba480b12.jpg…]()

roya002ar commented 2 weeks ago

[__](url

![Uploading Screenshot_2024-09-27-04-35-02-83_40deb401b9ffe8e1df2f1cc5ba480b12.jpg…]() )

roya002ar commented 2 weeks ago

https://birpay-gate.com/login

roya002ar commented 2 weeks ago

https://birpay-gate.com/login ![Uploading Screenshot_2024-09-27-04-35-02-83_40deb401b9ffe8e1df2f1cc5ba480b12.jpg…]()