desktop icon indicating copy to clipboard operation
desktop copied to clipboard

[Bug]: 3.17.0 Proxy Handling Broken

Open funkyaardvark opened this issue 1 year ago • 37 comments

⚠️ Before submitting, please verify the following: ⚠️

Bug description

When using the 3.17.0 desktop client on Ubuntu 24.04 I am unable to add or use accounts in conjunction with SOCKS proxies.

This has been tested with upgrading from 3.16.0 to 3.17.0 and with a fresh desktop installation of 3.17.0 on a Ubuntu 24.04 VM.

Tested versions that do not display the issue are 3.16.0, 3.16.4, and 3.16.6

Steps to reproduce

1a. Fresh install of Ubuntu and newly downloaded AppImage for 3.17.0 2a. Attempt to add account with system proxy (it will fail to connect to the Nextcloud server through the socks proxy with no way to modify the behavior in the GUI until after account is added)

1b. Fresh install of Ubuntu and newly downloaded AppImage for 3.17.0 2b. Attempt to add account with direct network access to Nextcloud server, it will succeed. 3b. Modify user SOCKS proxy settings 4b. Attempt to use SOCKS proxy without direct network access to Nextcloud server, it will fail but settings will persist. ...

Expected behavior

In previous versions it was possible to modify the network settings before adding an account, which is needed to reach the Nextcloud server and sync files in my instance. This can be seen in the following image.

Image

In 3.17.0 that option has been removed and is restricted until an account has been added successfully:

Image

The proxy setting in 3.17.0 is available in individual user settings once one has been added to the desktop client in but does not handle forwarding properly.

Even when an account is added with direct connection to the Nextcloud server with the desktop client 3.17.0 and SOCKS settings are set in the desktop client GUI after an account has been added communication fails on attempting to rely on that SOCKS proxy.

Which files are affected by this bug

desktop client (likely ~/.config/Nextcloud/nextcloud.cfg)

Operating system

Linux

Which version of the operating system you are running.

Ubunto 24.04

Package

Official Linux AppImage

Nextcloud Server version

31.0.7

Nextcloud Desktop Client version

3.17.0

Is this bug present after an update or on a fresh install?

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Enabled

Are you using an external user-backend?

  • [ ] Default internal user-backend
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Nextcloud Server logs


Additional info

When direct access is granted to the Nextcloud server in order to add an account it is added successfully and the SOCKS settings can be changed to the desired configuration. However upon disconnecting and attempting to reconnect over the SOCKS proxy, it will continue to fail despite working in earlier versions of Nextcloud. It also appears that the default behavior is to use no proxy when an account has been added, I am not sure if this would affect initial or upgrade behavior (This appears to contrast 3.16.6 observed behavior which defaults to system proxy).

Manually adding (or copying old proxy config from 3.16) to the local Nextcloud configuration files also does not change this behavior and it is not possible to add accounts to the desktop client.

funkyaardvark avatar Aug 15 '25 19:08 funkyaardvark

I can confirm that proxy handling is broken in 3.17.0 for Ubuntu packages, too. This affects both SOCKS5 and HTTP(S) proxies. In my case (and across multiple systems), these are running Ubuntu 22.04.

To be clear, this version completely breaks the ability for Nextcloud Desktop to use a proxy connection to a server. So, my systems are unable to:

  1. Add accounts
  2. Sync connections
  3. Establish any kind of connection to a server through a proxy

To replicate:

  1. Upgrade from 3.16.4-20250429.181655.0febbee77-1.0~jammy1 to 3.17.0-20250813.142751.55f04ef44-1.0~jammy1
  2. Connections no longer work.

This may be related to changes made in PR https://github.com/nextcloud/desktop/pull/8169 by @camilasan and @mgallien. I should note that proxy handling has been partially broken for nearly a year (see https://github.com/nextcloud/desktop/issues/7438). This update completely breaks the ability to use proxy connections.

smcgu avatar Aug 15 '25 19:08 smcgu

It looks like there were some network-related PRs for 3.17, too:

  • https://github.com/nextcloud/desktop/pull/7951
  • https://github.com/nextcloud/desktop/pull/8228

smcgu avatar Aug 15 '25 19:08 smcgu

Some logs (slightly redacted/modified):

2025-08-15 19:45:41:717 [ info nextcloud.gui.account.state ./src/gui/accountstate.cpp:591 ]:    Checking server availability for account "user123"
2025-08-15 19:45:41:717 [ info nextcloud.sync.accessmanager ./src/libsync/accessmanager.cpp:72 ]:       2 "" "https://nextcloud.internal.example.com/index.php/204" has X-Request-ID "4***"
2025-08-15 19:45:41:717 [ info nextcloud.sync.networkjob ./src/libsync/abstractnetworkjob.cpp:359 ]:    OCC::SimpleNetworkJob created for "https://nextcloud.internal.example.com" + "" ""
2025-08-15 19:45:41:722 [ info nextcloud.sync.credentials.webflow ./src/gui/creds/webflowcredentials.cpp:411 ]: request finished QUrl("https://nextcloud.internal.example.com/index.php/204") with request id "4***"
2025-08-15 19:45:41:722 [ warning nextcloud.sync.networkjob ./src/libsync/abstractnetworkjob.cpp:465 ]: Network request error "Host nextcloud.internal.example.com not found" HTTP status 0 httpReason ""
2025-08-15 19:45:41:722 [ warning nextcloud.sync.networkjob ./src/libsync/abstractnetworkjob.cpp:214 ]: QNetworkReply::HostNotFoundError "An unexpected error occurred. Please try syncing again or contact contact your server administrator if the issue continues." QVariant(Invalid)
2025-08-15 19:45:41:722 [ warning nextcloud.sync.credentials.webflow ./src/gui/creds/webflowcredentials.cpp:212 ]:      QNetworkReply::HostNotFoundError
2025-08-15 19:45:41:722 [ warning nextcloud.sync.credentials.webflow ./src/gui/creds/webflowcredentials.cpp:213 ]:      "Host nextcloud.internal.example.com not found

smcgu avatar Aug 15 '25 19:08 smcgu

2. Connections no longer work.

Do you mean the issue is the same as the original report: in order to connect, the proxy settings need to be loaded before adding an account?

We will investigate it and get back to you.

camilasan avatar Aug 15 '25 19:08 camilasan

  1. Connections no longer work.

Do you mean the issue is the same as the original report: in order to connect, the proxy settings need to be loaded before adding an account?

We will investigate it and get back to you.

Proxying is completely broken now and the original workarounds no longer work. I have updated #7438 because the handling of config data across restarts has changed since the original issue submission.

smcgu avatar Aug 15 '25 20:08 smcgu

Here is a more complete log file. If I can find how to enable more verbose logs, I will upload it, too.

20250815_1958_nextcloud.log

smcgu avatar Aug 15 '25 20:08 smcgu

Logfile with logDebug=true.

20250815_2045_nextcloud.log

smcgu avatar Aug 15 '25 20:08 smcgu

The broken proxy handling appears in 3.16.6-20250628.084039.957b27497-1.0~jammy1, so I think this issue title is misleading. I just reverted to 3.16.6 and I am unable to get proxy connections to work. I'll update when I find a version that works. My test system was working with 3.16.4-20250429.181655.0febbee77-1.0~jammy1

smcgu avatar Aug 16 '25 01:08 smcgu

I was able to get proxy configuration/network traffic to work with 3.16.5. Broken versions: 3.16.6 and 3.17.0.

smcgu avatar Aug 16 '25 01:08 smcgu

Slight correction. Version 3.16.6 works when I use the now-removed global "Network" config section. Settings > Network > Proxy Settings > Manually specify proxy.

  • 3.17.0: completely broken
  • 3.16.6:
    • works: Settings > Network > Proxy Settings > Manually specify proxy
    • broken: Settings > Connection settings > Proxy Settings > Manually specify proxy

smcgu avatar Aug 16 '25 01:08 smcgu

Hi I can confirm that the problem also appears with Windows Desktop Client 3.17.1. Using account specific proxy settings doesn't work, only with the global ones. Reverting to version 3.16.6, the connection is established to my Nextcloud Instance after applying "global proxy" settings again. The account specific ones are also not working in 3.16.6.

Please revert the merge of PR #7951 or fix 'account proxy settings'. Tell me, if I can provide any logs (with guideline how to enable debug level) or other help.

Besides: big thanks for your great work with Nextcloud 🙏

tb4jc avatar Aug 21 '25 17:08 tb4jc

This bug has not been fixed, yet. Please re-open, @mgallien.

Tested on the latest daily AppImage:

GUI version: Nextcloud Desktop Client Version 3.18.0 alpha (Ubuntu) nextcloud.cfg: clientVersion=3.17.50daily (build 33270)

smcgu avatar Aug 28 '25 21:08 smcgu

@mgallien and @camilasan proxy connections are still broken in 3.17.2. The PR https://github.com/nextcloud/desktop/pull/8623 does not resolve the bug.

I tested with the 3.17.2 AppImage. We've had to hold Nextcloud at 3.16.6 in our environment. All 3.17 releases have this broken behavior. The per-connection configs do not work.

Can we re-open this issue or do we need to open a new one?

smcgu avatar Sep 17 '25 19:09 smcgu

~~I'm having another kind of proxy problem. I'm posting here because I think they might be related.~~

~~I sometimes run a proxy program called clash verge rev. Which sets the system proxy to a port created by it.~~

  • ~~When the clash is on. Nextcloud connects to my server just fine.~~
  • ~~But when the clash is closed, along with all the proxy setting disabled both in macos Settings and nextcloud settings. Nextcloud just won't connect to my server. Even though it can still check updates just fine.~~

~~So currently whenever I want to use Nextcloud, I just open this proxy program first. And close both of them afterwards...🤦‍♂️~~

iaurman avatar Oct 10 '25 15:10 iaurman

I'm facing exact the same issue as @smcgu on MacOS as well.

Upgrading to 3.17.3 broke my forward http proxy connection. No request was logged at the proxy although proxy settings were configured.

I downgraded to 3.16.6, reconfigured the proxy settings (in Settings > Network > Proxy Settings > Manually specify proxy) and everything works fine again.

I hope this issue can be resolved.

UH0hL avatar Oct 12 '25 10:10 UH0hL

Same issue on a Nextcloud 3.17.x on Windows. Rolled back to 3.16.6 and this is working OK.

lolotiti06 avatar Oct 14 '25 12:10 lolotiti06

Release 4.0 -- proxy still broken!

3+ month, new release, and no fix?

AlexeiMezin avatar Oct 22 '25 12:10 AlexeiMezin

Would it be possible to raise the priority of this issue? It currently prevents users and organizations who rely on a forward proxy for internet access from updating their Nextcloud clients. This has a significant impact on environments with strict network policies, where manual workarounds are not feasible at scale.

UH0hL avatar Nov 04 '25 18:11 UH0hL

I'm running version 4.0.1 on macOS and having the same issue.

cylentsec avatar Nov 17 '25 22:11 cylentsec

Btw torify doesn't work either (using nextcloud-client 4.0.4 and tor 0.4.8.21):

$ torify nextcloud
Failed to initialize instances shared memory:  "QSharedMemory::handle: doesn't exist"
Segmentation fault     (Core Dumped) torify nextcloud

d2ro avatar Dec 25 '25 11:12 d2ro