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

Can't connect to Nextcloud instance #541

Closed
lgwapnitsky opened this Issue Mar 10, 2017 · 27 comments

Comments

Projects
None yet
4 participants
@lgwapnitsky

lgwapnitsky commented Mar 10, 2017

Expected behaviour

connection to NextCloud instance

Actual behaviour

image

image

Steps to reproduce

enter URL, username, password

Output from the debug settings

Relevant log output (you have to enable enable the log widget)

[Mar 10 10:05:32] [warning]: "Removed log file: " "C:/Users/larry.wapnitsky/AppData/Roaming/PBE/QOwnNotes/QOwnNotes.log"
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [warning]: libpng warning: iCCP: known incorrect sRGB profile
[Mar 10 10:05:49] [info]: Reply from ownCloud calendar page: "\n\n<title>403 Forbidden</title>\n\n

Forbidden

\n

You don't have permission to access /remote.php/dav/calendars/lgwapnitsky\non this server.
\n

\n

Additionally, a 403 Forbidden\nerror was encountered while trying to use an ErrorDocument to handle the request.

\n\n"

@lgwapnitsky

This comment has been minimized.

lgwapnitsky commented Mar 10, 2017

just enabled the calendars, but the URL for webdav is different. It appears that my username/password are not being passed to the login

@pirogoeth

This comment has been minimized.

pirogoeth commented Mar 10, 2017

@lgwapnitsky Do you have any sort of 2FA enabled?

@lgwapnitsky

This comment has been minimized.

lgwapnitsky commented Mar 10, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Mar 10, 2017

Did you enter the correct url to your owncloud instance?
Can you please post the output from the debug settings.
Do you use LDAP?

@lgwapnitsky

This comment has been minimized.

lgwapnitsky commented Mar 10, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Mar 10, 2017

You'll find the debug output in the debug settings.
Your server url doesn't seem to be ok, please try only enter the url to your server.

@lgwapnitsky

This comment has been minimized.

lgwapnitsky commented Mar 10, 2017

@lgwapnitsky

This comment has been minimized.

lgwapnitsky commented Mar 10, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Mar 10, 2017

https://nextcloud.wapnitsky.com seems to be ok, but I currently can't get a connection to it...
I've no idea what the problem is...

@lgwapnitsky

This comment has been minimized.

lgwapnitsky commented Mar 10, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Mar 10, 2017

I'm using NC 11.0.2.7 myself...

@gtim108

This comment has been minimized.

gtim108 commented Apr 10, 2017

I had the same problems. One solution is to turn off mod_security on a web hosting. Unfortunately, sometimes it's impossible (hard to do). For myself I fixed this by passing correct Agent from QOwnNotes.
r->setRawHeader( "User-Agent" , "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a3pre) Gecko/20070330");

in owncloudservice.cpp

@pbek

This comment has been minimized.

Owner

pbek commented Apr 10, 2017

@gtim108, that's an interesting find

@gtim108

This comment has been minimized.

gtim108 commented Apr 10, 2017

May be there should be settings in QO to set an agent string? My solution works, but it's not prefect.

@pbek

This comment has been minimized.

Owner

pbek commented Apr 10, 2017

@lgwapnitsky, in case you can build QOwnNotes yourself, can you confirm that that solution works for you?

@gtim108

This comment has been minimized.

gtim108 commented Apr 10, 2017

@lgwapnitsky I can send a diff, there are few places you need to set an agent

@pbek pbek added this to the 17.04.4 milestone Apr 12, 2017

@pbek

This comment has been minimized.

Owner

pbek commented Apr 12, 2017

@gtim108, did you do more than I did in 8ab29e7?

@gtim108

This comment has been minimized.

gtim108 commented Apr 12, 2017

@pbek There are few more. You can check the at my forked repo.
Tim's repo
Also we need to set headers for calendar to work with mod secure.
r.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
It's also in the same commit.

@pbek

This comment has been minimized.

Owner

pbek commented Apr 13, 2017

thank you, I will add that too...
I see you are using KDE libraries, every time I have to re-implement cool KDE features I start to shudder. the libraries would make my life a lot easier... :)

@gtim108

This comment has been minimized.

gtim108 commented Apr 13, 2017

I use kde, so it's not a problem for me :-) I wanted to have a global shortcut to show/hide QOwnNotes. tried Qt, but with kde it's much easier. Also waiting for kde to add Nextcloud, they have Owncloud, but still discuss Nextcloud.,

@pbek

This comment has been minimized.

Owner

pbek commented Apr 13, 2017

I'm a KDE user since the last millenium. :) The only reason I didn't integrate it in QOwnNotes is that I wanted to make it work on as many platforms as possible... Otherwise it would have been KOwnNotes! :D

@gtim108

This comment has been minimized.

gtim108 commented Apr 13, 2017

It will be cool to have Q(K)ownNotes in kde by default. :-) As replacement for Kjots.

@pbek

This comment has been minimized.

Owner

pbek commented Apr 13, 2017

I would like that. 😸

@pbek

This comment has been minimized.

Owner

pbek commented Apr 15, 2017

I now also added the application/x-www-form-urlencoded headers.

@pbek

This comment has been minimized.

Owner

pbek commented Apr 15, 2017

There now is a new release, could you please test it and report if it works for you?

@gtim108

This comment has been minimized.

gtim108 commented Apr 15, 2017

Yep. It works! Thanks!

@pbek

This comment has been minimized.

Owner

pbek commented Apr 15, 2017

Great, thank you for testing!

@pbek pbek closed this Apr 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment