The Wayback Machine - https://web.archive.org/web/20251014185926/https://github.com/docker/for-win/issues/12374
Skip to content

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

@KashMoneyMillionaire

Description

@KashMoneyMillionaire
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID:

Actual behavior

Docker Desktop fails to open and displays an error instead:
MicrosoftTeams-image

Expected behavior

Docker Desktop opens correctly and runs

Information

  • Windows Version: Win 10 Build 19043.1348
  • Docker Desktop Version: 4.2.0 (latest at the time. i don't have this problem in 4.1.1)
  • WSL2 or Hyper-V backend? WSL2 on Ubuntu 20.04
  • Are you running inside a virtualized Windows e.g. on a cloud server or a VM:

Steps to reproduce the behavior

For me, this breaks every time:

  1. Have a UserProfile path with an open parentheses but not a closing one. Mine is C:\Users\KashCummings(Credera. These are AD bound names, so cannot change
  2. Install Docker Desktop v4.2.0
  3. Run docker desktop
  4. The above error pops up

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.

Error:

A JavaScript error occurred in the main process
Uncaught Exception:
SyntaxError: Invalid regular expression:
C:\Users\KashCummings(Credera\AppData\Roaming\Docker... electron-2021-11-15-15.log/:
Unterminated group
at String.match(<anonymous»)
at Object. FileStreamRotator.getStream (C:\Program
Files\Docker\Docker\frontend resources app.asar\node_modules\file-stream-rotator Fil.:26)
at new DailyRotateFile (C:\Program
Files\Docker\Docker\frontend\resources app.asar\node_modules winston-daily-rotate-..:57)
at Object.<anonymous (C:\Program
Files\Docker\Docker\frontend\resources app.asar\src_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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions