Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authentication problem #125

Closed
Dark-Fenix opened this issue Aug 2, 2016 · 40 comments
Closed

Authentication problem #125

Dark-Fenix opened this issue Aug 2, 2016 · 40 comments
Labels

Comments

@Dark-Fenix
Copy link

Hi,

I just installed the app from F-Droid on my Andoid phone (Cyanogen 13.0, Android 6.0.1) and my tablet (Cyanogen 12.1, Android 5.1.1).

On both devices, I can't connect to my ownCloud instance (I get an error message about a "failed login"). I tried with other accounts on the same server, in both http and https, same issue. Unfortunately I can't test on an other ownCloud instance for now.

I installed the Notes app from the official Github repo (ownCloud 9.1.0, Notes 2.0.2).

Tell me if you need whatever information or log message.

Thanks :)

@dklueh79
Copy link

dklueh79 commented Aug 3, 2016

Me, too.
No login possible,prerequisites are fulfilled.

@gantispam
Copy link

gantispam commented Aug 4, 2016

Me, too.
You can't login if you use a self_signed certificat but work without ssl connexion.

edit : install cert not working too

@stefan-niedermann
Copy link
Member

I'll have a look. i assume only the latest version of the server app (2.0.2) is affected?

@dklueh79
Copy link

dklueh79 commented Aug 4, 2016

On my server it is the previous and the latest. Before I didn't use it.

@frederiiiic
Copy link

Same issue.

@stefan-niedermann
Copy link
Member

Please wait for 0.9.0 where more detailed error messages are generated. maybe we can find the source of the issue easier (i can not reproduce it :/ )

@cstackpole
Copy link

Greetings,
I have been having similar issues on the previous version with my LetsEncrypt SSL cert (with both owncloud 9 and nextcloud 10). Just wanted to say that I tried it again with the old version, still broken. Then I updated and tried again with the 0.9.0 release from F-droid and it worked!! I am very happy. Hopefully it works for the others in this thread.

Thank you!

@Dark-Fenix
Copy link
Author

Hi,

I just updated through F-Droid, I still have the same issue :(

I made some other tests (short/long passwords, with ou without special characters, self-signed or official certificate...), and I don't have anything in my server's log.

Can the Android app generate some useful log with this new version ?

@cstackpole
Copy link

Bummer. I was hoping it would fix your problem too. I agree, it would be nice to get more detail of what is going wrong.

@stefan-niedermann
Copy link
Member

@Dark-Fenix what das the Toast say?

@dklueh79 @gantispam @frederiiiic can you retest, too, please?

@Dark-Fenix
Copy link
Author

@stefan-niedermann Sorry, but what do you mean by the "Toast" ? :)

@stefan-niedermann
Copy link
Member

Toasts are the small message pop ups at the bottom in android ;-) https://developer.android.com/guide/topics/ui/notifiers/toasts.html

@Dark-Fenix
Copy link
Author

So here is the Toast :

"Invalid login : server connection is broken".

Sure fact : my other ownCloud apps (for files and news) run well, so it is not network-related.

@frederiiiic
Copy link

The error is right now for me in french : "Détails de connexion incorrects: Erreur d'E/S"
But in english its says : "Invalid login : server connection is broken".

I think it's not the same meaning... but i don't known what is an E/S error...

As @Dark-Fenix, some other app are working fine.

Thanks.

@korelstar
Copy link
Member

I think, we should provide the full java exception thrown somewhere in the app, so debugging will be easier.

However, could this be a certificate problem? Maybe you could try to manually import the certificates for your domain with the app CAdroid (e.g. https://f-droid.org/repository/browse/?fdid=at.bitfire.cadroid, also in Google Play).

@korelstar
Copy link
Member

@Dark-Fenix , @frederiiiic
Could you provide a temporary test account for your owncloud installation? Then I could investigate the problem. You can send me the login information to github .. at .. korelstar ... dot ... de

@Dark-Fenix
Copy link
Author

Dark-Fenix commented Oct 19, 2016

Ok, here is little feedback about some tests we have made :

  • I created a test account for @korelstar , it worked on his phone ;
  • I tried on my phone with the same account, it worked too ;
  • I tried again with my own account : connection issue ;
  • I tried to delete every notes in the Notes app on my ownCloud instance, then tried again : still failed ;
  • I created a new note (maybe the app is looking for at least one) : still failed.

The error message changed since morning (don't know why) : "Invalid login : URL/server has errors".

So :

  • It is definitively not network-related ;
  • This is not related to my ownCloud instance or the ownCloud Notes app ;
  • It seems I have a problem with my login/password or my account, but I can't go further (I have no idea which tests I can do, I already changed my password).

@korelstar
Copy link
Member

I think it would be useful (almost necessary) to integrate a good logging solution into the app. Maybe, there are frameworks for this. But I haven't tried any, just found https://github.com/ACRA/acra . Do you have any experiences, @stefan-niedermann ?

Meanwhile, I sent a version with more logging in form of toasts to @Dark-Fenix . I hope we find the error source on this way.

@Dark-Fenix
Copy link
Author

@korelstar : I can't install your apk, I have a message "Parse error : There was a problem parsing the package".

@korelstar korelstar mentioned this issue Oct 19, 2016
@korelstar
Copy link
Member

Strange. I've made a pull request with my changes, so @stefan-niedermann could provide an updated version in F-Droid. Then, the installation should work.

The pull requests only introduces a toast with more information. In the long-term, a better logging solution has to be used (see above).

@stefan-niedermann
Copy link
Member

The installation issue could be caused by f-droud signing. try delete the old app (no data should be lost) first please.

@stefan-niedermann
Copy link
Member

About logging, yeah, i agree. maybe there is some kind of standard solution for android, let's google it ;-)

@korelstar
Copy link
Member

Nevertheless, I suggest to merge #145 until a better solution is found. The next user with problems will come for sure 😉

@avalx
Copy link

avalx commented Mar 15, 2017

I have a similar problem as described in: #168

Connecting via http works but https does not! On the other hand the MyOwnNotes app works with https as expected.

@Vitriia
Copy link

Vitriia commented Mar 30, 2017

Same issue for me.
Maybe a problem with TOTP ?
(Let's encrypt, Nextcloud 11.0.2.7, no problem with other apps)

@badrow
Copy link

badrow commented Mar 31, 2017

Hi, I have the same problem... no solution.
I think it's a problem with the name of a file in the note folder bu i don't know which one.
Because when I clear the Notes folder, it works, and when I copy again my notes in the folder, it doesn't work anymore....
Please help :(

@korelstar
Copy link
Member

korelstar commented Mar 31, 2017

@adamsson6 Please help in finding the source for this bug: please don't copy all of your notes at once back to your folder after removing them, but do this stepwise and check at each step if the app still works. Then please give detailed information about the kind of note (e.g. filename, size, ...) which breaks the app.

See also: nextcloud/notes#75

@dimqua
Copy link

dimqua commented Jun 16, 2017

Most likely, I have the same problem.

@stefan-niedermann
Copy link
Member

@dimqua please try it with https:// in front of your domain -> https://cloud.disroot.org

@badrow
Copy link

badrow commented Jun 17, 2017

I'm copying a message i posted in another thread for my problem :

I ve made some more advanced tests, syncing at each modification.
It's not a question of number of notes.

And i found that it was in the content of some files, i don't know why, nor which characters create the problem, but it's it.

For example : file addressnumber2.txt contains " word1, word2, blabla..."
I removed step by step "word1" and syncing "word2" and syncing, etc, , and i found that some "random" parts of the text create the bug, and the web client and android client notes don't sync with the server anymore.
If I remove the file which make problem, the sync works again.
It does not depend on the lenght of the text because the error happened with one long text and one very short.
May be it's a problem of encoding, some of the text files are very old and i can't remember with which editor i created them.
I tried one thing : copy the content of the problematic text file to a new one, and save it. And the sync works !!
So i compared the 2 files in an hexa editor, and i found that the encoding was different, and some weird characters were present in problematic files, like (in hexa) 0D 0A 0D 0A ....
These are not UFT8 characters may be it cause the app bug when parsing notes...
I think the problem come from here ! so now i'm gonna clean my notes but I don't understand why Qownnotes is able to read these weird notes and not Nextcloud note app...

I hope these information could help !

@korelstar
Copy link
Member

korelstar commented Jun 17, 2017

@adamsson6
Sounds like this is related to nextcloud/notes#73. The corresponding bug fix (nextcloud/notes#80) will be included in the next release of the server app.

@badrow
Copy link

badrow commented Jun 17, 2017

Yes, i found a way to convert all my notes into utf8. But now i'm facing another problem... connexion in https doesn't work :) I tried with 3 accounts, one of them with empty notes folder. I doesn't want to connect.
Does the app accept self signed certificates ?

@korelstar
Copy link
Member

korelstar commented Jun 17, 2017 via email

@badrow
Copy link

badrow commented Jun 17, 2017

Oh okay so that's the problem thanks.

@badrow
Copy link

badrow commented Jun 17, 2017

Now it's working with http + notes clean.
For those interested, i found a script which convert all files in a folder in utf8 :
https://www.lexo.ch/blog/wp-content/uploads/2013/01/convert.sh_1.txt

It helped me a lot !

@dimqua
Copy link

dimqua commented Jun 17, 2017

@stefan-niedermann with https doesn't work too (nextcloud 12), but with nextcloud 11 works fine.

@leschek
Copy link

leschek commented Jun 20, 2017

It seems I had the same problem with authentication. After converting encoding from ANSI to UTF-8 it's working again.

@dimqua
Copy link

dimqua commented Jun 20, 2017

Sadly, I can't synchronize my notes with nextcloud 12 server, despite all of them use UTF-8.

@danalgen
Copy link

danalgen commented Sep 1, 2017

I believe I have the same error message as Dark-Fenix (on Oct 7, 2016). (It is auto-translated to Swedish, but it seems to be a direct translation).

In my case it seems to be related to using https:// (doesn't work, says Invalid login: Server connection is broken). If I use http://, it works. I have a Let's encrypt certificate, so no self-signed. Chrome, on the same phone, accepts the certificate as an official one.

I'd be happy to send you a test account if needed!

--- UPDATE!!! ---
It seems I have resolved the error regarding HTTPS. In my case the server was not configured to deliver the full SSL Certificate Chain. I found this by checking my server at https://www.ssllabs.com/ssltest/analyze.html. After adding the appropriate configuration in Apache, it now works!

@Vitriia, maybe you could check your server?

@stefan-niedermann
Copy link
Member

Okay folks. I would like to thank you all for contributing here. Hunting bugs is very important, especially if it causes one to be not able to use the app at all. Though this issue has gone completely wild, because many people responded who had similar (still different) problems.

v0.12.1 is currently rolling out and should be on F-Droid on a view days and reach all users of Play Store in a view days. There has been extensive work on supporting self-signed certificates (by @schaarsc, thanks ) which has often been a problem in the past while connecting to a server.

I would like everyone here who still hast connection issues, to wait for v0.12.1, retry, and open a new separate issue with detailled client- and server-versions and error messages, so we can reproduce the bugs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests