nextcloud / nextcloud/desktop

overrideServerUrl parameter not cleared from running client after account setup

Open
#10,640 2 comments 0 reactions 1 assignee Claimed by @mgallien View on GitHub
bug
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 21h
Merged PRs (30d)
127

Description

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

- [x] This is a **bug**, not a question or a configuration issue.
- [x] This issue is **not** already reported on Github (I have searched for it).
- [x] Nextcloud Server and Desktop Client are **up to date**. See [Server Maintenance and Release Schedule](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) and [Desktop Releases](https://nextcloud.com/install/#install-clients) for supported versions.
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/)

### Bug description

If the parameter "overrideServerUrl" is set inside "$HOME/.config/Nextcloud/nextcloud.cfg" at the first launch of Nextcloud desktop, it will use this parameter for the configuration.

When the first account is set and configured (authentication to this overrideServerUrl, etc...), if I try to add a new account "menu "+ Add an account", Nexctloud-desktop will still use the old "overrideServerUrl" value.

The issue is, the overrideServerUrl value was reset by nextcloud-desktop itself after the first account configuration. Now "overrideServerUrl" is empty.

If I fully restart the nextcloud client (reboot the computer, or using "kill" for example), and then try to add a new account with the menu, it will use the empty "overrideServerUrl=" value instead of the old one that was removed by the desktop-client.

So, in summary: After initial account configuration, nextcloud-desktop cleanup the overrideServerUrl but does not reload it's value, and you must fully restart the application (or reboot) to reload the real value.

[debug_client_overrideServerUrl.zip](https://github.com/user-attachments/files/31299345/debug_client_overrideServerUrl.zip)

### Steps to reproduce

1. Install nextcloud-desktop (I'm using a .deb)
2. Create $HOME/.config/Nextcloud/nextcloud.cfg with the following content:
```
[General]
overrideServerUrl=https://my_nextcloud_server.com
```
3. Start Nextcloud-desktop client.
4. Configure the account (authenticate to server, set the sync folder, etc...)
5. Click on the menu "+ Add an account".
6. See it is automatically using the overrideServerUrl without the possibility to enter another server name, even though the value was automatically cleared from nextcloud.cfg after step 4

### Expected behavior

At Step 5 (Click the "+ Add an account "), nextcloud-desktop should know it has changed the configuration and use the newer value of overrideServerUrl instead of the old one.

So Step 6 should be something like "enter the server address".

### Which files are affected by this bug

$HOME/.config/Nextcloud/nextcloud.cfg

### Operating system

Linux

### Which version of the operating system you are running.

Ubuntu 26.04

### Installation method

Distro package manager (please test with the AppImage package ?)

### Nextcloud Server version

33.0.7

### Nextcloud Desktop Client version

4.0.6

### Did this occur after an update or on a clean installation?

Clean desktop client installation

### Are you using the Nextcloud Server Encryption module?

No

### Are you using an external user-backend?

- [ ] Default internal user-backend
- [x] LDAP or Active Directory
- [ ] SSO - SAML
- [ ] Other

### Nextcloud Server logs

```shell

```

### Additional info

I've also tested using the latest Appimage file (version 34.0.2). Ubuntu default version is 4.0.6 and, after revieving changelogs from 4.0.6 to 4.0.10 I didn't found any related changes to this behaviour.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.