[GH-ISSUE #1168] Windows 10, server configuration file cannot be opened if its path contains multi-byte characters #937

Open
opened 2026-05-05 07:18:36 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @thebodzio on GitHub (May 22, 2021).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1168

Bug description
Barrier fails to open configuration file if its path contains multi-byte characters (Polish, German or any other). Any multi-byte character either in one of the folder names or configuration file name causes the issue.

To Reproduce
Steps to reproduce the behavior:

  1. Place configuration file in a place where resulting path (either folder or file name) contains multi-byte characters.
  2. Set logging level to “Debug”.
  3. Try to start the server.
  4. See the “cannot open configuration” message being logged.

Expected behavior
Configuration should be read in successfully.

Log excerpt
What follows is a log excerpt for the case when config file was put in “D:/Ogońki/” folder.

[2021-05-22T14:38:54] INFO: starting server
[2021-05-22T14:38:54] DEBUG: command: "C:/Program Files/Barrier/barriers.exe" -f --no-tray --debug DEBUG2 --name bogart --ipc --stop-on-desk-switch --enable-drag-drop --enable-crypto --profile-dir "C:\Users\bodzio\AppData\Local\Barrier" -c "D:/Ogońki/Config.sgc" --address :24800
[2021-05-22T14:38:54] INFO: config file: D:/Ogońki/Config.sgc
[2021-05-22T14:38:54] INFO: log level: DEBUG2
[2021-05-22T14:38:54] DEBUG: start ipc handle data
[2021-05-22T14:38:54] DEBUG: ipc read: ICMD
[2021-05-22T14:38:54] DEBUG2: readf(%s%1i)
[2021-05-22T14:38:54] DEBUG2: readf: read 242 byte string
[2021-05-22T14:38:54] DEBUG2: readf: read 1 byte integer: 0 (0x0)
[2021-05-22T14:38:54] DEBUG: finished ipc handle data
[2021-05-22T14:38:54] DEBUG: new command, elevate=0 command="C:/Program Files/Barrier/barriers.exe" -f --no-tray --debug DEBUG2 --name bogart --ipc --stop-on-desk-switch --enable-drag-drop --enable-crypto --profile-dir "C:\Users\bodzio\AppData\Local\Barrier" -c "D:/Ogońki/Config.sgc" --address :24800
[2021-05-22T14:38:54] INFO: service command updated
[2021-05-22T14:38:55] DEBUG: found desktop name: 
[2021-05-22T14:38:55] DEBUG: getting elevated token, at login screen
[2021-05-22T14:38:55] DEBUG: processes in session 3: csrss.exe, winlogon.exe, fontdrvhost.exe, dwm.exe, nvxdsync.exe, wireguard.exe, ETDCtrl.exe, sihost.exe, svchost.exe, svchost.exe, taskhostw.exe, igfxEM.exe, igfxHK.exe, igfxTray.exe, Pen_TabletUser.exe, WacomHost.exe, explorer.exe, Wacom_TabletUser.exe, ETDCtrlHelper.exe, WacomHost.exe, Pen_TouchUser.exe, ctfmon.exe, svchost.exe, Pen_Tablet.exe, SettingSyncHost.exe, Wacom_Tablet.exe, Wacom_TouchUser.exe, WindowsInternal.ComposableShell.Experiences.TextInput.InputApp.exe, StartMenuExperienceHost.exe, RuntimeBroker.exe, DisplayCAL-apply-profiles.exe, RuntimeBroker.exe, YourPhone.exe, LockApp.exe, RuntimeBroker.exe, SecurityHealthSystray.exe, CAudioFilterAgent64.exe, RuntimeBroker.exe, svchost.exe, wincompose.exe, OneDrive.exe, SearchUI.exe, AutoHotkey.exe, VM331STI.EXE, Joplin.exe, acrotray.exe, Joplin.exe, Joplin.exe, Joplin.exe, Dropbox.exe, Dropbox.exe, Dropbox.exe, kageant.exe, firefox.exe, firefox.exe, firefox.exe, firefox.exe, firefox.exe, firefox.exe, firefox.exe, firefox.exe, CompPkgSrv.exe, RuntimeBroker.exe, firefox.exe, QtWebEngineProcess.exe, QtWebEngineProcess.exe, MailClient.exe, QtWebEngineProcess.exe, MailClient.exe, ApplicationFrameHost.exe, Video.UI.exe, RuntimeBroker.exe, Microsoft.Photos.exe, RuntimeBroker.exe, firefox.exe, ShellExperienceHost.exe, RuntimeBroker.exe, SystemSettingsBroker.exe, firefox.exe, firefox.exe, dllhost.exe, barrier.exe, 
[2021-05-22T14:38:55] DEBUG: found winlogon.exe in session 3
[2021-05-22T14:38:55] DEBUG: got token 1324, duplicating
[2021-05-22T14:38:55] DEBUG: duplicated, new token: 1328
[2021-05-22T14:38:55] INFO: starting new process as privileged user
[2021-05-22T14:38:55] INFO: drag and drop enabled
[2021-05-22T14:38:55] DEBUG: opening configuration "D:/Ogońki/Config.sgc"
[2021-05-22T14:38:55] DEBUG: cannot open configuration "D:/Ogońki/Config.sgc"
barriers.exe: no configuration available
[2021-05-22T14:38:56] ERROR: failed to launch, error: process immediately stopped
[2021-05-22T14:38:56] INFO: backing off, wait=2s, failures=1

Desktop (please complete the following information):

  • OS: Windows 10
  • Barrier version: 2.3.3

Additional information
The same problem occurs also when config file is attempted to read in from temporary file in user's profile folder if user name contains multi-byte characters (like in Polish names, e.g. “Michał”).

Originally created by @thebodzio on GitHub (May 22, 2021). Original GitHub issue: https://github.com/debauchee/barrier/issues/1168 **Bug description** Barrier fails to open configuration file if its path contains multi-byte characters (Polish, German or any other). Any multi-byte character either in one of the folder names or configuration file name causes the issue. **To Reproduce** Steps to reproduce the behavior: 1. Place configuration file in a place where resulting path (either folder or file name) contains multi-byte characters. 2. Set logging level to “Debug”. 3. Try to start the server. 4. See the “cannot open configuration” message being logged. **Expected behavior** Configuration should be read in successfully. **Log excerpt** What follows is a log excerpt for the case when config file was put in “D:/Ogońki/” folder. ``` [2021-05-22T14:38:54] INFO: starting server [2021-05-22T14:38:54] DEBUG: command: "C:/Program Files/Barrier/barriers.exe" -f --no-tray --debug DEBUG2 --name bogart --ipc --stop-on-desk-switch --enable-drag-drop --enable-crypto --profile-dir "C:\Users\bodzio\AppData\Local\Barrier" -c "D:/Ogońki/Config.sgc" --address :24800 [2021-05-22T14:38:54] INFO: config file: D:/Ogońki/Config.sgc [2021-05-22T14:38:54] INFO: log level: DEBUG2 [2021-05-22T14:38:54] DEBUG: start ipc handle data [2021-05-22T14:38:54] DEBUG: ipc read: ICMD [2021-05-22T14:38:54] DEBUG2: readf(%s%1i) [2021-05-22T14:38:54] DEBUG2: readf: read 242 byte string [2021-05-22T14:38:54] DEBUG2: readf: read 1 byte integer: 0 (0x0) [2021-05-22T14:38:54] DEBUG: finished ipc handle data [2021-05-22T14:38:54] DEBUG: new command, elevate=0 command="C:/Program Files/Barrier/barriers.exe" -f --no-tray --debug DEBUG2 --name bogart --ipc --stop-on-desk-switch --enable-drag-drop --enable-crypto --profile-dir "C:\Users\bodzio\AppData\Local\Barrier" -c "D:/Ogońki/Config.sgc" --address :24800 [2021-05-22T14:38:54] INFO: service command updated [2021-05-22T14:38:55] DEBUG: found desktop name: [2021-05-22T14:38:55] DEBUG: getting elevated token, at login screen [2021-05-22T14:38:55] DEBUG: processes in session 3: csrss.exe, winlogon.exe, fontdrvhost.exe, dwm.exe, nvxdsync.exe, wireguard.exe, ETDCtrl.exe, sihost.exe, svchost.exe, svchost.exe, taskhostw.exe, igfxEM.exe, igfxHK.exe, igfxTray.exe, Pen_TabletUser.exe, WacomHost.exe, explorer.exe, Wacom_TabletUser.exe, ETDCtrlHelper.exe, WacomHost.exe, Pen_TouchUser.exe, ctfmon.exe, svchost.exe, Pen_Tablet.exe, SettingSyncHost.exe, Wacom_Tablet.exe, Wacom_TouchUser.exe, WindowsInternal.ComposableShell.Experiences.TextInput.InputApp.exe, StartMenuExperienceHost.exe, RuntimeBroker.exe, DisplayCAL-apply-profiles.exe, RuntimeBroker.exe, YourPhone.exe, LockApp.exe, RuntimeBroker.exe, SecurityHealthSystray.exe, CAudioFilterAgent64.exe, RuntimeBroker.exe, svchost.exe, wincompose.exe, OneDrive.exe, SearchUI.exe, AutoHotkey.exe, VM331STI.EXE, Joplin.exe, acrotray.exe, Joplin.exe, Joplin.exe, Joplin.exe, Dropbox.exe, Dropbox.exe, Dropbox.exe, kageant.exe, firefox.exe, firefox.exe, firefox.exe, firefox.exe, firefox.exe, firefox.exe, firefox.exe, firefox.exe, CompPkgSrv.exe, RuntimeBroker.exe, firefox.exe, QtWebEngineProcess.exe, QtWebEngineProcess.exe, MailClient.exe, QtWebEngineProcess.exe, MailClient.exe, ApplicationFrameHost.exe, Video.UI.exe, RuntimeBroker.exe, Microsoft.Photos.exe, RuntimeBroker.exe, firefox.exe, ShellExperienceHost.exe, RuntimeBroker.exe, SystemSettingsBroker.exe, firefox.exe, firefox.exe, dllhost.exe, barrier.exe, [2021-05-22T14:38:55] DEBUG: found winlogon.exe in session 3 [2021-05-22T14:38:55] DEBUG: got token 1324, duplicating [2021-05-22T14:38:55] DEBUG: duplicated, new token: 1328 [2021-05-22T14:38:55] INFO: starting new process as privileged user [2021-05-22T14:38:55] INFO: drag and drop enabled [2021-05-22T14:38:55] DEBUG: opening configuration "D:/Ogońki/Config.sgc" [2021-05-22T14:38:55] DEBUG: cannot open configuration "D:/Ogońki/Config.sgc" barriers.exe: no configuration available [2021-05-22T14:38:56] ERROR: failed to launch, error: process immediately stopped [2021-05-22T14:38:56] INFO: backing off, wait=2s, failures=1 ``` **Desktop (please complete the following information):** - OS: Windows 10 - Barrier version: 2.3.3 **Additional information** The same problem occurs also when config file is attempted to read in from temporary file in user's profile folder if user name contains multi-byte characters (like in Polish names, e.g. “Michał”).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#937
No description provided.