matomo-org / matomo-mobile-2

Matomo Mobile 2 App - The official Git repository! Liberating Web Analytics on the go!
https://matomo.org/mobile
Other
104 stars 31 forks source link

Problem logging in via iPhone #5444

Closed adpablos closed 1 year ago

adpablos commented 1 year ago

Having the very last Matomo version installed

CleanShot 2023-01-25 at 21 51 37@2x

The System summary is

CleanShot 2023-01-25 at 21 51 18@2x

I am not able to log in via my iPhone.

CleanShot 2023-01-25 at 21 52 23@2x

Having the following message

CleanShot 2023-01-25 at 21 52 44@2x

When logging in via website with same url, user and password

CleanShot 2023-01-25 at 21 53 24@2x

I am perfectly able to access

CleanShot 2023-01-25 at 21 53 42@2x

I was able to see my information via my iPhone till few weeks ago when sudently I started having that error.

rneil68 commented 1 year ago

Same issue here. No errors showing in server logs.

adpablos commented 1 year ago

Is there any news about this? Anybody working on it?

tsteur commented 1 year ago

@adpablos @rneil68 sorry I can't reproduce this one yet.

By any chance do you have any kind of special characters in your password? If so, do you mind sharing which ones?

It sounds like there is a server error happening meaning the error may be in Matomo rather than the mobile app.

rneil68 commented 1 year ago

Mine has a !Sent from my iPhoneOn 5 Mar 2023, at 20:05, Thomas Steur @.***> wrote: @adpablos @rneil68 sorry I can't reproduce this one yet. By any chance do you have any kind of special characters in your password? If so, do you mind sharing which ones? It sounds like there is a server error happening meaning the error may be in Matomo rather than the mobile app.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

adpablos commented 1 year ago

I have 2 different users. One is admin and other is user. None of them is working.

For the regular user I just have a '.' as an special character. For the admin one I have '*' and '!' characters.

rneil68 commented 1 year ago

Just tried with a revised password without special characters -  error persists.Sent from my iPhoneOn 5 Mar 2023, at 23:31, Alex de Pablos @.**> wrote: I have 2 different users. One is admin and other is user. None of them is working. For the regular user I just have a '.' as an special character. For the admin one I have '' and '!' characters.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

tsteur commented 1 year ago

Thanks @adpablos @rneil68 .

Is there any chance of you could send me an invite for thomas@matomo.org ? You could create a new site and give me "view" access to this new site so I wouldn't be able to see any actual data. This would allow me to troubleshoot the issue and see if it's an issue with the mobile app or Matomo itself.

adpablos commented 1 year ago

Done!

On Wed, Mar 8, 2023 at 20:10 Thomas Steur @.***> wrote:

Thanks @adpablos https://github.com/adpablos @rneil68 https://github.com/rneil68 .

Is there any chance of you could send me an invite for @.*** ? You could create a new site and give me "view" access to this new site so I wouldn't be able to see any actual data. This would allow me to troubleshoot the issue and see if it's an issue with the mobile app or Matomo itself.

— Reply to this email directly, view it on GitHub https://github.com/matomo-org/matomo-mobile-2/issues/5444#issuecomment-1461111351, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFQTAQ2Y64CGGXW4FEFOTLW3EUYBANCNFSM6AAAAAAUHFY65Q . You are receiving this because you were mentioned.Message ID: @.***>

tsteur commented 1 year ago

Thanks for this @adpablos Very appreciated.

I've just checked. On Android it doesn't work either and I'm getting this error: unexpected end of stream on com.android.ok http.address@17e9f0a0. Below is what I'm finding on this.

The error message suggests that the response stream was ended abruptly, which could indicate a problem with the server or network.

There could be several reasons why this error might occur. Some of the common causes include:

To troubleshoot this issue, you can try the following steps:

In https://learn.microsoft.com/en-us/answers/questions/582274/why-do-i-keeo-getting-com-android-okhttp-address@5 it suggests there may be an issue with a server side "keep-alive" setting. I don't know how technical you are and if you have any control over these kind of things to look into anything there?

It's a very weird thing as it works nicely in the browser. There seems to be some sort of connection issue.

There may be a way to workaround this error in the app but I believe we may not have access to this level of control over how the HTTP request is sent. This is something we could check. --> Looking into this on https://titaniumsdk.com/api/titanium/network/httpclient.html#properties_waitsforconnectivity it doesn't look like we can do anything about it.

adpablos commented 1 year ago

Hey there!

I have been dealing with my hosting support service letting them know about this.

This was their last response

Hello Alejandro,

I am able to replicate the issue on the Matomo app from the App Store. However, I monitored the Apache and Nginx logs simultaneously and there are no requests that reach our server.

I am afraid that there is not much that can be done on our end. The application is accessible from any other web client. I would recommend contacting the developers of the Matomo app and report the issue to them. This appears to be a common issue as I notice that other users are also reporting the same on your github thread, and there are some other threads with the same issue as shown here for example:

https://forum.matomo.org/t/network-error-iphone-matomo-app/40399/3

Best Regards,

So, being like that.. I guess the ball is again under your roof…

Let me know if you can figure it out.

I am pretty sure should have been something related with some update, since I was able to work with the app before.

Regards.

On Thu, Mar 9, 2023 at 00:05 Thomas Steur @.***> wrote:

Thanks for this @adpablos https://github.com/adpablos Very appreciated.

I've just checked. On Android it doesn't work either and I'm getting this error: unexpected end of stream on com.android.ok @.*** Below is what I'm finding on this.

The error message suggests that the response stream was ended abruptly, which could indicate a problem with the server or network.

There could be several reasons why this error might occur. Some of the common causes include:

  • Server-side issues: The server might have encountered an error while processing the request and ended the response stream abruptly.
  • Network issues: There could be issues with the network connection that caused the response to be interrupted or lost.
  • Connection issues: The connection to the server might have been lost or interrupted during the request.

To troubleshoot this issue, you can try the following steps:

  • Check the server logs: If you have access to the server, check the server logs to see if there were any errors or issues that might have caused the response to be interrupted.

In @.*** it suggests there may be an issue with a server side "keep-alive" setting. I don't know how technical you are and if you have any control over these kind of things to look into anything there?

It's a very weird thing as it works nicely in the browser. There seems to be some sort of connection issue.

There may be a way to workaround this error in the app but I believe we may not have access to this level of control over how the HTTP request is sent. This is something we could check. --> Looking into this on https://titaniumsdk.com/api/titanium/network/httpclient.html#properties_waitsforconnectivity it doesn't look like we can do anything about it.

— Reply to this email directly, view it on GitHub https://github.com/matomo-org/matomo-mobile-2/issues/5444#issuecomment-1461284840, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFQTAU4AJCFRJQ2LT6ASA3W3FQJVANCNFSM6AAAAAAUHFY65Q . You are receiving this because you were mentioned.Message ID: @.***>

tsteur commented 1 year ago

FYI been doing lots of troubleshooting. It looks like when I update our user agent that it then works. The user agent that may be causing problems is Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.89 Safari/537.1. I still need to investigate further.

tsteur commented 1 year ago

FYI I generally have found the fix which is to udpate the user agent. Don't know if you can already configure something to allow our old user agent. I have a fix prepared in https://github.com/matomo-org/matomo-mobile-2/pull/5447

The only problem I have currently is that the app crashes as soon as a request fails for any reason (like wrong password entered). I'm not sure if this is only in the simular or also behaviour on an actual phone. I haven't had such an issue before and don't have an iOS device myself.

This will require further investigation.

adpablos commented 1 year ago

I can not tell you either what happens right now in the app if you enter a wrong pass… since the error I got is always the same specified in this thread.

I saw your changes in the fix you opened were already merged with master branch, right? That means it will be already solved with the next release?

On Wed, Mar 15, 2023 at 04:03 Thomas Steur @.***> wrote:

Reopened #5444 https://github.com/matomo-org/matomo-mobile-2/issues/5444 .

— Reply to this email directly, view it on GitHub https://github.com/matomo-org/matomo-mobile-2/issues/5444#event-8752235082, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFQTASEKAIF2N7OVJURYP3W4FZUJANCNFSM6AAAAAAUHFY65Q . You are receiving this because you were mentioned.Message ID: @.***>

tsteur commented 1 year ago

@adpablos this issue has been fixed and we've submitted the update for review. Once the update has been approved, the update will be rolled out over 7 days meaning it can take up to 10 days for you to receive the update. Although it could also be a lot sooner. Thanks for bringing the issue to our attention!

adpablos commented 1 year ago

Thank you for your work fixing this!

I will wait anxiously to have that updated.

On Wed, Mar 15, 2023 at 8:58 PM Thomas Steur @.***> wrote:

@adpablos https://github.com/adpablos this issue has been fixed and we've submitted the update for review. Once the update has been approved, the update will be rolled out over 7 days meaning it can take up to 10 days for you to receive the update. Although it could also be a lot sooner. Thanks for bringing the issue to our attention!

— Reply to this email directly, view it on GitHub https://github.com/matomo-org/matomo-mobile-2/issues/5444#issuecomment-1471110313, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFQTARQTVG7ABR7ERJAL23W4JQRXANCNFSM6AAAAAAUHFY65Q . You are receiving this because you were mentioned.Message ID: @.***>