Describe the bug
See: #1424 (comment)
When starting teams-for-linux, I see an error Fetched custom background remote configuration but failed to save at '/home/myuser/.config/teams-for-linux/custom_bg_remote.json'. configJSON is not iterable in the logs. Everything works normal and I can select my custom backgrounds, it's just the error log that confuses me.
To Reproduce
Steps to reproduce the behavior:
- Have a working custom-background server
- Configure teams-for-linux to use the custom-background server
- Start teams-for-linux from a terminal (so you see logs)
- See error logged
Expected behavior
If the custom backgrounds are working, I would expect no error to be logged.
Desktop (please complete the following information):
- OS: Linux / Gentoo
- Installation package: ebuild based on the
deb package
- Version: 1.11.5 (but I noticed that the error was already logged with an older 1.11.0 version)
Debug
teams-for-linux --webDebug --logConfig='{}' --customBGServiceBaseUrl=http://localhost:8080
all good with appLogLevels you aren't using them
all good with onlineCheckMethod you aren't using them
Initialising logger with config: "{}"
19:45:45.164 › File logging at /home/myuser/.config/teams-for-linux/logs/main.log with level silly
19:45:45.166 › Console logging enabled with level silly
19:45:45.166 › Logger initialised
19:45:45.166 › configPath: /home/myuser/.config/teams-for-linux
19:45:45.166 › configFile: {
optInTeamsV2: true,
isCustomBackgroundEnabled: true,
customBGServiceBaseUrl: 'https://my-usual-custom-bg-url.example.com',
followSystemTheme: true
}
19:45:45.168 › Running under Wayland, switching to PipeWire...
19:45:45.332 › Fetching custom background configuration from 'http://localhost:8080/config.json'
19:45:45.370 › Custom background service url is 'http://localhost:8080'
19:45:45.370 › processArgs: [
'/opt/teams-for-linux/teams-for-linux',
'--webDebug',
'--logConfig={}',
'--customBGServiceBaseUrl=http://localhost:8080'
]
19:45:45.371 › testing RegExp processArgs false
19:45:45.371 › testing RegExp processArgs false
19:45:45.371 › testing RegExp processArgs false
19:45:45.371 › testing RegExp processArgs false
19:45:45.371 › Waiting for network...
19:45:45.371 › Testing network using net.request() for https://teams.microsoft.com
19:45:45.372 › Spellchecker is disabled!
19:45:45.476 › Fetched custom background remote configuration but failed to save at '/home/myuser/.config/teams-for-linux/custom_bg_remote.json'. configJSON is not iterable
[1428790:1117/194545.615229:ERROR:nss_util.cc(345)] After loading Root Certs, loaded==false: NSS error code: -8018
19:45:45.650 › Network test successful with method https
...
Additional context
You need a server running to use the custom background (see the docs and the example in the custom background section. Config area). My guess is you are probably not running a server or you haven't got the right config, but I will be able to tell more by looking at the config and your logs.
So as written in the comment on the other issue, it's mostly about the error log that appears. I don't know since when this error gets logged, I just noticed it yesterday (I usually don't look at the logs), but I also checked on another computer with an older version and at least on 1.11.0 it also already gets logged.
I have a working server running, I use it since a long time (even before v2, but I then changed the json to match the v2 format). And it's working, I see my custom backgrounds from my server. But I also see above error message in the logs.
My existing server which is configured in my config is nginx based. However when I clone the repo and start npx http-server -p 8080 --cors "*" -g in this folder: https://github.com/IsmaelMartinez/teams-for-linux/tree/main/app/customBackground/example, and start teams with --customBGServiceBaseUrl=http://localhost:8080 to override my own server, it also still logs the error, but it now shows me the 3 images from that folder instead of my own images. So it loads the config from the temporary localhost server (I can see it in the access log). If I start teams without that parameter again, it uses the URL from the config file again, and all my own custom backgrounds are back. So it loads the custom backgrounds, but still logs the error every time teams-for-linux gets started.
However, the error isn't about that custom backgrounds can't be loaded, but that it can't store the downloaded backgrounds config locally. But the file still exists and has the content from my usual custom background server (If I start with the localhost background server, it doesn't get changed to that new content). It was last changed on September 3rd (so that's probably since around when the error gets logged, but I just didn't notice it?). If I remove the file, it doesn't get recreated and the error is still logged. But custom-background also still work.
So, my questions are:
- Why is this file needed? Custom backgrounds seem to work perfectly even if it can't be written to that file.
- Why is the error logged? It must have worked at some point, but something is broken now (but it doesn't affect the actual usage of custom backgrounds, just storing the local file is broken)
Describe the bug
See: #1424 (comment)
When starting teams-for-linux, I see an error
Fetched custom background remote configuration but failed to save at '/home/myuser/.config/teams-for-linux/custom_bg_remote.json'. configJSON is not iterablein the logs. Everything works normal and I can select my custom backgrounds, it's just the error log that confuses me.To Reproduce
Steps to reproduce the behavior:
Expected behavior
If the custom backgrounds are working, I would expect no error to be logged.
Desktop (please complete the following information):
debpackageDebug
teams-for-linux --webDebug --logConfig='{}' --customBGServiceBaseUrl=http://localhost:8080Additional context
So as written in the comment on the other issue, it's mostly about the error log that appears. I don't know since when this error gets logged, I just noticed it yesterday (I usually don't look at the logs), but I also checked on another computer with an older version and at least on 1.11.0 it also already gets logged.
I have a working server running, I use it since a long time (even before v2, but I then changed the json to match the v2 format). And it's working, I see my custom backgrounds from my server. But I also see above error message in the logs.
My existing server which is configured in my config is nginx based. However when I clone the repo and start
npx http-server -p 8080 --cors "*" -gin this folder: https://github.com/IsmaelMartinez/teams-for-linux/tree/main/app/customBackground/example, and start teams with--customBGServiceBaseUrl=http://localhost:8080to override my own server, it also still logs the error, but it now shows me the 3 images from that folder instead of my own images. So it loads the config from the temporary localhost server (I can see it in the access log). If I start teams without that parameter again, it uses the URL from the config file again, and all my own custom backgrounds are back. So it loads the custom backgrounds, but still logs the error every time teams-for-linux gets started.However, the error isn't about that custom backgrounds can't be loaded, but that it can't store the downloaded backgrounds config locally. But the file still exists and has the content from my usual custom background server (If I start with the localhost background server, it doesn't get changed to that new content). It was last changed on September 3rd (so that's probably since around when the error gets logged, but I just didn't notice it?). If I remove the file, it doesn't get recreated and the error is still logged. But custom-background also still work.
So, my questions are: