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.
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.
@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.
@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.
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.
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.
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.
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?
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.
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
# 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
We would appreciate some screenshots or stacktrace's, but this is also not required.
Thank you for your time.
@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.
tested token login with fresh install, work on my side
@mmarif test account send by mail.
@copyrights can you log into the specific account via web first?
do you have to update your pwasswort?
@6543 yes, I logged in and create a token. Force password change was not enabled for this account.
@copyrights I haven't tested yet, won't lie. But can you test with usernamne/password?
@mmarif same behaviour. No traffic on server and from app
@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.
This error mostly showed up when the app cannot access internet on the phone or the server is not reachable via that network etc.
@mmarif I through so. I guess is something in my combination phone and app.
all with the same result, no traffic towards the server.
@mmarif same with codeberg.org
@mmarif found it! Something was wrong with the token.
Is it possible to have a better test/message for that?
Anyhow, thank you very much for your support.
So the token was wrong or missing some characters.
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.
Glad to hear it is sorted now.
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.
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.
Should I open a new issue for a misleading error message?
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?
Yes, it is reproducible with 'We cannot reach the server, please check your server status'
Ok, can you give some hints to reproduce it without QtQR or share the character which is added by QtQR to the token.
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.
If I manipulate the token on purpose, the error message is as expected. Even if I add a ascii character in front.
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?
Sure, here is my recording.
Used apps are Barcode Scanner 4.7.8 (F-Droid) and QtQR 2.0
Thanks, we will try to reproduce it.