#792 No connect attempt

Open
opened 1 month ago by copyrights · 27 comments

# What do you want to address?

# Describe your matter briefly

I freshly installed GitNex and want to login into my Gitea instance. When trying so the message 'We cannot reach the server, please check your server status' appears instantly.

My settings are:
Token
Protocol: HTTPS
Instance URL: git.mydomain.tld
Token: ************

Further investigation shows no incoming traffic at the server. App info shows a total of 0B in traffic.


What did you expect?

I would expect to see at least some connection attempts.


Some additional details

  • The version of Gitea you are using: 1.14.0+dev-382-g729f0f5f7
  • The version of GitNex you are using: 3.3.0
  • Source of installation (Play Store, F-Droid, APK): F-Droid
  • Current android version and phone model/manufacturer: Android 10 (CalyxOS 1.0.0), Pixel 4a
  • The type of certificate your instance is using (self-signed, signed): signed
  • How you used to log in (via password or token): token

We would appreciate some screenshots or stacktrace's, but this is also not required.



Thank you for your time.

## # What do you want to address? <!-- This step is required; examples are shown below --> - [x] Bug - [ ] Feature - [ ] Suggestion ## # Describe your matter briefly <!-- This step is required. --> I freshly installed GitNex and want to login into my Gitea instance. When trying so the message 'We cannot reach the server, please check your server status' appears instantly. My settings are: Token Protocol: HTTPS Instance URL: git.mydomain.tld Token: ************ Further investigation shows no incoming traffic at the server. App info shows a total of 0B in traffic. <br><br> ##### What did you expect? <!-- Useful when addressing bugs --> --- <!-- This step is optional. --> I would expect to see at least some connection attempts. <br><br> ##### Some additional details <!-- Useful, when we are trying to reproduce a bug --> --- <!-- This step is optional; an example is shown below --> * The version of **Gitea** you are using: 1.14.0+dev-382-g729f0f5f7 * The version of **GitNex** you are using: 3.3.0 * Source of installation (Play Store, F-Droid, APK): F-Droid * Current android version and phone model/manufacturer: Android 10 (CalyxOS 1.0.0), Pixel 4a * The type of certificate your instance is using (self-signed, signed): signed * How you used to log in (via password or token): token <br> ##### We would appreciate some screenshots or stacktrace's, but this is also not required. --- <!-- Screenshots and stacktrace's can go here. --> <br><br> - [x] I carefully read the [contribution guidelines](https://codeberg.org/GitNex/GitNex/src/branch/master/CONTRIBUTING.md). <br> #### Thank you for your time.
6543 added the
Bug
label 1 month ago
mmarif commented 1 month ago
Poster
Owner

@copyrights Is your instance public, can you share the URL here?

If not can you send a test account to gitnex@swatian.com for debug purpose.

@copyrights Is your instance public, can you share the URL here? If not can you send a test account to gitnex@swatian.com for debug purpose.
6543 added the
Needs-feedback
label 1 month ago
6543 commented 1 month ago
Poster
Collaborator

tested token login with fresh install, work on my side

tested token login with fresh install, work on my side
Poster

@mmarif test account send by mail.

@mmarif test account send by mail.
6543 commented 1 month ago
Poster
Collaborator

@copyrights can you log into the specific account via web first?

do you have to update your pwasswort?

@copyrights can you log into the specific account via web first? do you have to update your pwasswort?
Poster

@6543 yes, I logged in and create a token. Force password change was not enabled for this account.

@6543 yes, I logged in and create a token. Force password change was not enabled for this account.
mmarif commented 1 month ago
Poster
Owner

@copyrights I haven't tested yet, won't lie. But can you test with usernamne/password?

@copyrights I haven't tested yet, won't lie. But can you test with usernamne/password?
Poster

@mmarif same behaviour. No traffic on server and from app

@mmarif same behaviour. No traffic on server and from app
mmarif removed the
Bug
label 1 month ago
mmarif removed the
Needs-feedback
label 1 month ago
mmarif added the
Investigate
label 1 month ago
mmarif commented 1 month ago
Poster
Owner

@copyrights this is strange as I am able to login to the app via the cred you provided via email and @6543 too can login.

Any other information you think would be useful you can check or provide.

  • Internet conn on the phone
  • Reinstall the app?
  • Clear app data?
  • Missing character in token or password while typing?

We cannot reach the server, please check your server status

This error mostly showed up when the app cannot access internet on the phone or the server is not reachable via that network etc.

@copyrights this is strange as I am able to login to the app via the cred you provided via email and @6543 too can login. Any other information you think would be useful you can check or provide. - Internet conn on the phone - Reinstall the app? - Clear app data? - Missing character in token or password while typing? > We cannot reach the server, please check your server status This error mostly showed up when the app cannot access internet on the phone or the server is not reachable via that network etc.
Poster

@mmarif I through so. I guess is something in my combination phone and app.

  • I have tested celluar 4G and WiFi
  • I have reinstalled the app (and even downgrade)
  • I have cleared app data and app cache
  • Missing characters are possible, but again, no traffic is seen

all with the same result, no traffic towards the server.

@mmarif I through so. I guess is something in my combination phone and app. * I have tested celluar 4G and WiFi * I have reinstalled the app (and even downgrade) * I have cleared app data and app cache * Missing characters are possible, but again, no traffic is seen all with the same result, no traffic towards the server.
Poster

@mmarif same with codeberg.org

@mmarif same with codeberg.org
Poster

@mmarif found it! Something was wrong with the token.
Is it possible to have a better test/message for that?

@mmarif found it! Something was wrong with the token. Is it possible to have a better test/message for that?
Poster

Anyhow, thank you very much for your support.

Anyhow, thank you very much for your support.
mmarif commented 1 month ago
Poster
Owner

found it! Something was wrong with the token.

So the token was wrong or missing some characters.

Is it possible to have a better test/message for that?

In many cases the error code returned has different use cases and while the API does not explicitly tell the error, we only can check for generic error in this case.

So if the token/username/password is wrong, the app show Instance has returned an error - Unauthorized. Check your credentials and try again.
Can you confirm if the token was wrong or missing characters etc?
You can test with wrong token and check if the returned error is correct.

> found it! Something was wrong with the token. So the token was wrong or missing some characters. > Is it possible to have a better test/message for that? In many cases the error code returned has different use cases and while the API does not explicitly tell the error, we only can check for generic error in this case. So if the token/username/password is wrong, the app show `Instance has returned an error - Unauthorized. Check your credentials and try again`. Can you confirm if the token was wrong or missing characters etc? You can test with wrong token and check if the returned error is correct.
mmarif commented 1 month ago
Poster
Owner

Anyhow, thank you very much for your support.

Glad to hear it is sorted now.

> Anyhow, thank you very much for your support. Glad to hear it is sorted now.
Poster

I copied the token with QtQR to my phone with Barcode Scanner. There seems to be a invisible character at the front. If I delete the first character and type it in manaully, it works.

It is reproducible.

I copied the token with QtQR to my phone with Barcode Scanner. There seems to be a invisible character at the front. If I delete the first character and type it in manaully, it works. It is reproducible.
mmarif removed the
Investigate
label 1 month ago
mmarif added the
Support
label 1 month ago
mmarif commented 1 month ago
Poster
Owner

I copied the token with QtQR to my phone with Barcode Scanner

So the problem is with QtQR and not GitNex.

I am going to close this issue, feel free to reopen if there is something missing or need to be fixed.

> I copied the token with QtQR to my phone with Barcode Scanner So the problem is with QtQR and not GitNex. I am going to close this issue, feel free to reopen if there is something missing or need to be fixed.
mmarif closed this issue 1 month ago
Poster

Should I open a new issue for a misleading error message?

Should I open a new issue for a misleading error message?
mmarif commented 1 month ago
Poster
Owner

Have you tried with wrong token and get the misleading error. I have just tested with missing character in token and get correct error of wrong creds as mentioned above.

Do you still get server not reachable error?

Can you give it another try?

Have you tried with wrong token and get the misleading error. I have just tested with missing character in token and get correct error of wrong creds as mentioned above. Do you still get server not reachable error? Can you give it another try?
Poster

Yes, it is reproducible with 'We cannot reach the server, please check your server status'

Yes, it is reproducible with 'We cannot reach the server, please check your server status'
mmarif commented 1 month ago
Poster
Owner

Ok, can you give some hints to reproduce it without QtQR or share the character which is added by QtQR to the token.

Ok, can you give some hints to reproduce it without QtQR or share the character which is added by QtQR to the token.
mmarif commented 1 month ago
Poster
Owner

Beside that, if you remove that character from the token, it works.

Now can you add/remove character to the correct token and see what error is returned.

Beside that, if you remove that character from the token, it works. Now can you add/remove character to the correct token and see what error is returned.
Poster
$ echo -n "1234"|hexdump
0000000 bbef 31bf 3332 0034
0000007
$
``` $ echo -n "1234"|hexdump 0000000 bbef 31bf 3332 0034 0000007 $ ```
Poster

If I manipulate the token on purpose, the error message is as expected. Even if I add a ascii character in front.

If I manipulate the token on purpose, the error message is as expected. Even if I add a ascii character in front.
mmarif commented 1 month ago
Poster
Owner

Ok, maybe this is a bit more of asking. Would you screen capture(test account) the ui while doing this process(gif/webm etc) and send it to the email?

Ok, maybe this is a bit more of asking. Would you screen capture(test account) the ui while doing this process(gif/webm etc) and send it to the email?
Poster

Sure, here is my recording.

Sure, here is my recording.
Poster

Used apps are Barcode Scanner 4.7.8 (F-Droid) and QtQR 2.0

Used apps are [Barcode Scanner](https://f-droid.org/en/packages/com.google.zxing.client.android/) 4.7.8 (F-Droid) and [QtQR](https://launchpad.net/qr-tools) 2.0
mmarif commented 1 month ago
Poster
Owner

Thanks, we will try to reproduce it.

Thanks, we will try to reproduce it.
mmarif reopened this issue 1 month ago
mmarif removed the
Support
label 1 month ago
mmarif added the
Investigate
label 1 month ago
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.