Docker Desktop 4.2.0 fails to run when %USERPROFILE% path is invalid regex

Based on a limited debug, it appears something about the log file rotation has broken between 4.1.1 and 4.2.0. The error message above the dialog box looks similar to the message provided by docker, which makes me think it’s trying to do a regex match on a string that’s an invalid regex string.

A JavaScript error occurred in the main process
Uncaught Exception:
SyntaxError: Invalid regular expression:
C:UsersKashCummings(CrederaAppDataRoamingDocker... electron-2021-11-15-15.log/:
Unterminated group
at String.match(<anonymous»)
at Object. FileStreamRotator.getStream (C:Program
FilesDockerDockerfrontend resources app.asarnode_modulesfile-stream-rotator Fil.:26)
at new DailyRotateFile (C:Program
FilesDockerDockerfrontendresources app.asarnode_modules winston-daily-rotate-..:57)
at Object.<anonymous (C:Program
FilesDockerDockerfrontendresources app.asarsrc_transpiled logger.js:36:20)
at Module._compile (node internal/modules/cjs/loader:1110:14)
at Object.Module._extensions..js (node.internal/modules/cjs/loader:1140:10)
at Module.load (node:internal/modules/cs/loader:982:32)
at Module._load (node:internal/modules/cs/loader:823:12)
at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
at Module.require (node:internal/modules/cjs/loader:1006:19)

Read more here: Source link