mattermost / mattermost-mobile

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

Unable to use the app on android 10 since the last release. #4527

Closed savmickael closed 1 year ago

savmickael commented 4 years ago

Summary

Unable to use the app on android 10 since the last release.

Environment Information

Steps to reproduce

Use mobile app and try to read something

Expected behavior

Read the content of the mattermost

Observed behavior

When I open the app, I get the following screenshot : IMG_20200630_142217

In one case I receive this message:

IMG_20200630_180103

I received notification so I am connected but I am not able to read them from the app. From web or from the linux client it is ok.

Possible fixes

Sorry, no idea.

enahum commented 4 years ago

Hey @savmickael thanks for reporting this.. we sure will look into it.. but while that happens can I ask you to attempt to delete the cache data (in android settings), try again and report back ?

savmickael commented 4 years ago

delete cache done but no effect, same behavior.

enahum commented 4 years ago

@savmickael when clearing the cache.. did you have to login again? the goal is to have you re-authenticate

savmickael commented 4 years ago

No the app connect directly without interaction

enahum commented 4 years ago

@savmickael the idea is that you delete all data related to the application, even try re-installing the app to see if that helps.

artfulrobot commented 4 years ago

I'm also having problems: chronologically:

enahum commented 4 years ago

@artfulrobot App still won’t login

Care to give more information? As in login method, do you get any errors? Any logs on the server when you attempt to login?

enahum commented 4 years ago

Also I believe @savmickael issue and @artfulrobot login problems are two different things

homotechsual commented 4 years ago

@artfulrobot App still won’t login

Care to give more information? As in login method, do you get any errors? Any logs on the server when you attempt to login?

The server in question for @artfulrobot is https://chat.civicrm.org if that helps?

artfulrobot commented 4 years ago

Screenshot_20200707-152651

I don't have access to the server.

(erm, sorry for the massive screenshot!)

enahum commented 4 years ago

@MikeyMJCO indeed helps, do you happen to have a redirect configure at the server in ngnix or something that is causing a redirect to the /login endpoint ? cause I can clearly see it when trying to connect to that server. That is also the reason why it works on a browser but not on the app.

I'd suggest to take a closer look at your server deployment configuration.

homotechsual commented 4 years ago

Have made our infra point-person aware of this issue - hopefully they can clarify any setup changes?

mlutfy commented 4 years ago

Yikes, yes, we did have a redirection in place. It's now removed. (I think it was to help with new user creation, to always use the correct team, but I think that new Mattermost versions have a setting to set the default team)

homotechsual commented 4 years ago

@MikeyMJCO indeed helps, do you happen to have a redirect configure at the server in ngnix or something that is causing a redirect to the /login endpoint ? cause I can clearly see it when trying to connect to that server. That is also the reason why it works on a browser but not on the app.

I'd suggest to take a closer look at your server deployment configuration.

Thanks for your help/input!

enahum commented 4 years ago

@artfulrobot @MikeyMJCO @mlutfy glad it got resolved.

enahum commented 4 years ago

@savmickael Are you using the same server?

artfulrobot commented 4 years ago

Amazeballs! Thanks @enahum @MikeyMJCO and @mlutfy, all working again now!

savmickael commented 4 years ago

No I didn't use the same server. After remove all data (but not uninstall the app), I succeed to reach the authentication page but when I put my credentials the app failed to connect to the server (blank page with wheel).

savmickael commented 4 years ago

I have test with a public server https://framateam.org and its works. I will try to see with the IT team which install the mattermost if they do something specific.

gbonnefille commented 4 years ago

Looking at the Mattermost instance referenced by @savmickael , it occurs that a request on the https://mattermost.corp/oauth/gitlab/mobile_login ends, as expected, with a /signup/gitlab/complete with a HTTP_CODE=200. What can blocks the client to continue?

enahum commented 4 years ago

@gbonnefille is it locked entirely as in an infinite loop for ages? Are there other users with the same problem in the org?

@josephbaylon can you help replicate this? Maybe we need more info about the GitLab deployment?

josephbaylon commented 4 years ago

@enahum @savmickael @gbonnefille I'm unable to reproduce the issue on v1.32.2. Steps, Pre-req: Register to GitLab (https://framagit.org/users/sign_in)

  1. Connect to server using framateam.org
  2. Select GitLab > Standard
  3. Fill in username and password and Hit Sign In

Observed and expected: User is able to login successfully.

Channel About
image-8722fbd9-8bbd-4fcc-9e24-d9d5492a3d23 image-51e8b1e8-59c0-4c07-9eb1-b6c61d83e058
gbonnefille commented 4 years ago

@enahum @savmickael @gbonnefille I'm unable to reproduce the issue on v1.32.2. Steps, Pre-req: Register to GitLab (https://framagit.org/users/sign_in)

1. Connect to server using `framateam.org`

2. Select GitLab > Standard

3. Fill in username and password and Hit Sign In

Yeah, sorry if my previous message was incorrect: it works on framateam, but not on our corporate instance.

gbonnefille commented 4 years ago

@gbonnefille is it locked entirely as in an infinite loop for ages?

I can't help as I don't have Android (UBports here). I don't know if there is an effective loop or only an empty page with an animation to let the user wait.

Are there other users with the same problem in the org?

Yes, the problem was reported by two users: it worked nicely until they upgraded the app. The server is still in 5.20.1.

gbonnefille commented 4 years ago

Hi, some news here.

With the new version of the mobile app, we have the following error:

Received invalid response from the server. URL: https://mm.example.com#/api/v4/users/me

Yes, the '#' is suspicious. Trying such URL with a curl conclude in a redirect to '/'.

Where does this '#' came from?

enahum commented 4 years ago

@gbonnefille what login method are you using? If it is an SSO make sure the character is not set in the URL by the SSO provider, is the only thing I can think of

gbonnefille commented 4 years ago

@gbonnefille what login method are you using? If it is an SSO make sure the character is not set in the URL by the SSO provider, is the only thing I can think of

OK, thanks, I will double check our SSO.

But this URL is not the callback one. So I fear the suspicious character is inserted by someone else.

enahum commented 4 years ago

We do set the URL based on the response from the SSO here https://github.com/mattermost/mattermost-mobile/blob/master/app/screens/sso/sso.js#L118

This is not the only report, I’ve seen this already being reported 3 times with GitLab as SSO provider, I wonder if they changed something...

I’m waiting on QA to find out and in any case we could hardcode the removal of the character to “fix” it

gbonnefille commented 4 years ago

We do set the URL based on the response from the SSO here https://github.com/mattermost/mattermost-mobile/blob/master/app/screens/sso/sso.js#L118

This is not the only report, I’ve seen this already being reported 3 times with GitLab as SSO provider, I wonder if they changed something...

I’m waiting on QA to find out and in any case we could hardcode the removal of the character to “fix” it

OK, thanks.

Do you have any quick-tips to share about running the mobile app in a Desktop environment, with logs and debugging? Due to SSL, it is not possible to sniff traffic in order to debug.

enahum commented 4 years ago

@gbonnefille you can follow the developer guide https://developers.mattermost.com/contribute/mobile/developer-setup/

gbonnefille commented 4 years ago

I've tested the 1.34.1. The error about # has gone. But I now encounter:

rolenames invalide ou manquant dans le corps de la requête URL: https://mm.example.com/api/v4/roles/names

Edit: I'm running the app on a Android 7.1 directly fetched from GitHub. A teamate tried with a Android 8 and passed this step.

gbonnefille commented 4 years ago

Currently, we still encounter problem around a missing device_id:

device_id invalide ou manquant dans le corps de la requête
URL: https://mm.example.com/api/v4/users/sessions/device

Sniffing traffic let identify that the POST request is empty.

Edit: in order to help processing errors, I created a dedicated Issue with only related informations. Cf. #4763

gbonnefille commented 4 years ago

Please, note that in the exactly same situation (same user, same server, same device), the version published on F-Droid (1.31.2) is working.

enahum commented 4 years ago

@gbonnefille fdroid is not published or maintained by us but by the community :)

gbonnefille commented 4 years ago

@gbonnefille fdroid is not published or maintained by us but by the community :)

OK. I hoped such information can help to locate the bugs: working in 1.31.2 and not in 1.34.1.

larkox commented 1 year ago

@gbonnefille Do you still see this issue on the V2 of the app?

larkox commented 1 year ago

Closing the issue due to the age and lack of activity. Feel free to create a new issue if needed.