Git Product home page Git Product logo

Comments (20)

adil192 avatar adil192 commented on July 26, 2024

Are you using an app password instead of your regular password?
https://docs.nextcloud.com/server/25/user_manual/en/user_2fa.html#using-client-applications-with-two-factor-authentication

from saber.

darkcodemonkey avatar darkcodemonkey commented on July 26, 2024

I have tried both my normal password and an app password that I setup through nextcloud. Just to make sure I even setup an app password specific to Saber and that didn't work either, but I confirmed that the newly setup app password does work via WebDAV on a different application.

from saber.

adil192 avatar adil192 commented on July 26, 2024

Are you by chance using the web version?

from saber.

darkcodemonkey avatar darkcodemonkey commented on July 26, 2024

Nope. Loaded the apk from fdroid (v0.4.9) onto my Galaxy Fold 4 and Galaxy Tab s8+ and when that didn't work I uninstalled that and attempted to use 0.5.0 apk from github, which also did not work.

from saber.

njhdunn avatar njhdunn commented on July 26, 2024

Are you using a custom SSL certificate authority for your self-hosted nextcloud domain? I had what sound like similar issues connecting to my local nextcloud until I switched it over to using a proper certificate via Let's Encrypt + ACME, after which it worked as expected.

from saber.

darkcodemonkey avatar darkcodemonkey commented on July 26, 2024

I am using a Let's Encrypt certificate.

from saber.

dbrandonjohnson avatar dbrandonjohnson commented on July 26, 2024

I'm running into the same problem trying to login with my nextcloud instance. I have a letsencrypt cert and using an app password (two-factor is enabled). I don't get an error when trying to login (I do when I try to use my standard password not an app password) so it seems like it is authenticating but still shows on the settings page that I'm logged out.

from saber.

dbrandonjohnson avatar dbrandonjohnson commented on July 26, 2024

Looking at the logs from the app (Linux Flatpak in this case)

This is what I'm seeing, but I'm not seeing any error in the app unless I input the wrong password.

[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: NextcloudApiException(statusCode: 401, headers: {}, body: <?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>No public access to this resource., Username or password was incorrect, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, Username or password was incorrect</s:message>
</d:error>
)
#0      WebDavClient._send (package:nextcloud/src/webdav/client.dart:57)
<asynchronous suspension>
#1      NextcloudClientExtension.getConfig (package:saber/data/nextcloud/nextcloud_client_extension.dart:39)
<asynchronous suspension>
#2      NextcloudClientExtension.loadEncryptionKey (package:saber/data/nextcloud/nextcloud_client_extension.dart:59)
<asynchronous suspension>
#3      _NcLoginPageState._tryLogin (package:saber/pages/nextcloud/login.dart:50)
<asynchronous suspension>
#4      _LoginInputGroupState._login (package:saber/components/nextcloud/login_group.dart:87)
<asynchronous suspension>

The app password works with other applications.

Looking at the Nextcloud logs, it is authenticating (get a proper return code)

The logs of concern are here:

==> ssl_request_log <==
[30/Dec/2022:21:28:08 -0700] 172.16.10.34 TLSv1.3 TLS_AES_256_GCM_SHA384 "GET /nextcloud/ocs/v2.php/cloud/user HTTP/1.1" 513

==> ssl_access_log <==
172.16.10.34 - - [30/Dec/2022:21:28:08 -0700] "MKCOL /nextcloud/remote.php/dav/files/8b6f5a01-9ff311e8-9f68e724-d26cb0f9/Saber HTTP/1.1" 401 415

==> ssl_request_log <==
[30/Dec/2022:21:28:08 -0700] 172.16.10.34 TLSv1.3 TLS_AES_256_GCM_SHA384 "MKCOL /nextcloud/remote.php/dav/files/8b6f5a01-9ff311e8-9f68e724-d26cb0f9/Saber HTTP/1.1" 415

I haven't yet looked further to see if it is something I configured (I don't think anything has deviated from the Nextcloud core documentation on this install).

from saber.

adil192 avatar adil192 commented on July 26, 2024
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: NextcloudApiException(statusCode: 401, headers: {}, body: <?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
  <s:message>No public access to this resource., Username or password was incorrect, No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured, Username or password was incorrect</s:message>
</d:error>
)
#0      WebDavClient._send (package:nextcloud/src/webdav/client.dart:57)
<asynchronous suspension>
#1      NextcloudClientExtension.getConfig (package:saber/data/nextcloud/nextcloud_client_extension.dart:39)
<asynchronous suspension>
#2      NextcloudClientExtension.loadEncryptionKey (package:saber/data/nextcloud/nextcloud_client_extension.dart:59)
<asynchronous suspension>
#3      _NcLoginPageState._tryLogin (package:saber/pages/nextcloud/login.dart:50)
<asynchronous suspension>
#4      _LoginInputGroupState._login (package:saber/components/nextcloud/login_group.dart:87)
<asynchronous suspension>

The app password works with other applications.

Are you able to connect via WebDAV?

from saber.

dbrandonjohnson avatar dbrandonjohnson commented on July 26, 2024

Yes, I am able to connect using any webdav client. Or do you mean using the full webdav url in Saber's settings?

from saber.

adil192 avatar adil192 commented on July 26, 2024

Yes, I am able to connect using any webdav client. Or do you mean using the full webdav url in Saber's settings?

Nah I meant using a webdav client

from saber.

dbrandonjohnson avatar dbrandonjohnson commented on July 26, 2024

Yes I can use a regular webdav client.

Yes, I am able to connect using any webdav client. Or do you mean using the full webdav url in Saber's settings?

Nah I meant using a webdav client

from saber.

dbrandonjohnson avatar dbrandonjohnson commented on July 26, 2024

I figured out the problem. At least for my issue. My nextcloud instance uses ldap and I just noticed the user data directory is different than what it expects. I'm shocked anything is working on this instance.

So my problem has nothing to do with Saber. Not sure about the original issuer.

I'll open a separate issue for a feature request. It would be nice to use a different sync service like seafile or at least just use a generic webdav endpoint.

from saber.

darkcodemonkey avatar darkcodemonkey commented on July 26, 2024

So I thought I didn't have LDAP enabled, but I must have confused it with something else. I disabled LDAP on my instance and it still says login failed whether I use my normal login info for nextcloud or using the WebDAV URL and app login that I setup for Saber. I am still able to access both my normal nextcloud and WebDAV logins using other applications.

from saber.

adil192 avatar adil192 commented on July 26, 2024

it still says login failed whether I use my normal login info for nextcloud or using the WebDAV URL and app login that I setup for Saber.

You shouldn't be using the WebDAV URL, just the normal Nextcloud URL with the app password

from saber.

darkcodemonkey avatar darkcodemonkey commented on July 26, 2024

Same thing when using regular URL and the app password I have setup for saber, login failed.

from saber.

adil192 avatar adil192 commented on July 26, 2024

Same thing when using regular URL and the app password I have setup for saber, login failed.

Are you able to login to Nextcloud Neon (current latest apk at https://github.com/provokateurin/nextcloud-neon/actions/runs/3787903728) and perform actions like creating a folder?

from saber.

darkcodemonkey avatar darkcodemonkey commented on July 26, 2024

I am not able to login with this app either... I get the same desktop user login I get from the normal nextcloud app, put in my username and password and then TOTP it says access granted and then loops back to the login screen again.

from saber.

adil192 avatar adil192 commented on July 26, 2024

I am not able to login with this app either... I get the same desktop user login I get from the normal nextcloud app, put in my username and password and then TOTP it says access granted and then loops back to the login screen again.

Please can you make a new issue in that repo as it's the plugin I use for Nextcloud? Make sure to reference this issue

Also note that Kate is on holiday at the moment

from saber.

darkcodemonkey avatar darkcodemonkey commented on July 26, 2024

I was able to get everything syncing and working properly. IDK if it was a recent change on the app or what, but thank you for the assistance.

from saber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.