breez / breezmobile

Lightning Network mobile client
https://breez.technology
GNU General Public License v3.0
567 stars 130 forks source link

Webdav backup failed to connect #1259

Closed ntosme closed 9 months ago

ntosme commented 9 months ago

I have a local webdav server (running on Nginx), and when I initially configured Breez to use this server, it was able to connect and push the backup DO_NOT_DELETE_Breez_Backup folder and data.

I opened the app again recently and now when I test the backup I just get "Failed to connect with the remote server, please check your settings."

I'm able to open a browser on the same phone and read a file from the webdav root after entering the user:pass. I can also push a file into the webdav root via "curl -T ..." from the command line, so I'm confident that the webdav server is functional.

I've tried the following url formats: http://172.x.x.x/ http://sub.mydomain.com/ (pointing to the above private IP)

Does the app normally try to connect through a socks proxy? I'm confused by the logs.

This is on a de-googled phone running LineageOS.

Logs

2023-12-13 00:45:35.012 [INF] BIND: remote_server_auth.dart: testAuthData 2023-12-13 00:45:35.012 [INF] BCKP: setting backup provider remoteserver 2023-12-13 00:45:35.012 [INF] BIND: manager provider is: remoteserver 2023-12-13 00:45:35.012 [INF] BIND: breez_bridge.dart: testBackupAuth 2023-12-13 00:45:35.017 [INF] BIND: backupBloc.testAuth caught error: PlatformException(ResultError, Propfind "http://172.30.168.208/": socks connect tcp 127.0.0.1:9050->172.x.x.x:80: unknown error general SOCKS server failure, Failed to invoke testBackupAuth, null) 2023-12-13 00:45:35.018 [INF] BIND: Invalid argument(s) (onError): The error handler of Future.catchError must return a value of the future's type

0 _FutureListener.handleError (dart:async/future_impl.dart:181)

1 Future._propagateToListeners.handleError (dart:async/future_impl.dart:779)

2 Future._propagateToListeners (dart:async/future_impl.dart:800)

3 Future._completeError (dart:async/future_impl.dart:575)

4 _rootRunBinary (dart:async/zone.dart:1422)

5 _CustomZone.runBinary (dart:async/zone.dart:1314)

6 _FutureListener.handleError (dart:async/future_impl.dart:162)

7 Future._propagateToListeners.handleError (dart:async/future_impl.dart:779)

8 Future._propagateToListeners (dart:async/future_impl.dart:800)

9 Future._completeError (dart:async/future_impl.dart:575)

10 _rootRunBinary (dart:async/zone.dart:1422)

11 _CustomZone.runBinary (dart:async/zone.dart:1314)

12 _FutureListener.handleError (dart:async/future_impl.dart:162)

13 Future._propagateToListeners.handleError (dart:async/future_impl.dart:779)

14 Future._propagateToListeners (dart:async/future_impl.dart:800)

15 Future._completeError (dart:async/future_impl.dart:575)

16 _rootRunBinary (dart:async/zone.dart:1422)

17 _CustomZone.runBinary (dart:async/zone.dart:1314)

18 _FutureListener.handleError (dart:async/future_impl.dart:162)

19 Future._propagateToListeners.handleError (dart:async/future_impl.dart:779)

20 Future._propagateToListeners (dart:async/future_impl.dart:800)

21 Future._completeError (dart:async/future_impl.dart:575)

22 _SuspendState._createAsyncStarCallback. (dart:async-patch/async_patch.dart:353)

23 _rootRunUnary (dart:async/zone.dart:1406)

24 _CustomZone.runUnary (dart:async/zone.dart:1307)

### Breez Version version 0.16.5-beta installed via Aurora store
ubbabeck commented 9 months ago

Hello, try turning off tor and try again. You may do so by:

  1. Open side menu
  2. Expand preferences
  3. Network
  4. Toggle tor to be off
ntosme commented 9 months ago

Ah, yes that worked. I forgot that I toggled on tor.

Are webdav backups not supported with tor enabled, or would I need to provide an onion address?

ubbabeck commented 9 months ago

It works as long as your webdav instance is publicly accessible or if it has a hidden service running.

ntosme commented 9 months ago

Ok, makes sense.