Metabase fails to upgrade when installed in a Windows path containing spaces

We identified an issue when trying to upgrade and run Metabase on Windows. The application is installed under “Program Files“, and the process does not correctly execute Java when the installation path contains a space. We would appreciate it if path handling could be reviewed and corrected in the next version.

Program Files also has special permissions, so that has to be taken into account as well.

please send us the reproduction steps, we don’t test in Windows at all so it would be nice if we could see the entire step by step scenario here

what command line are you using to launch Metabase?

the
java -jar %path to metabase%\metabase.jar bit

As a service?

Chances are you’re not quoting something correctly.

Other possibility is that the account it’s using doesn’t have rights to create subfolders in program files.

I run Metabase on multiple Windows servers, but oddly always running the jar from a folder off root so not hit any problems.

1 Like

Hi there, I work alongside @cmonge . Here’s some additional information that may help.

{ "metabase-info": {    "databases": [      "sqlserver"    ],    "run-mode": "prod",    "plan-alias": "",    "version": {      "date": "2026-03-04",      "tag": "v0.58.8.4",      "hash": "cf6856f"    },    "settings": {      "report-timezone": "America/Chicago"    },    "hosting-env": "unknown",    "application-database": "mysql",    "application-database-details": {      "database": {        "name": "MySQL",        "version": "8.0.30"      },      "jdbc-driver": {        "name": "MariaDB Connector/J",        "version": "2.7.10"      }    }  },  "system-info": {    "file.encoding": "UTF-8",    "java.runtime.name": "OpenJDK Runtime Environment",    "java.runtime.version": "21.0.7+6-LTS",    "java.vendor": "Eclipse Adoptium",    "java.vendor.url": "https://adoptium.net/",    "java.version": "21.0.7",    "java.vm.name": "OpenJDK 64-Bit Server VM",    "java.vm.version": "21.0.7+6-LTS",    "os.name": "Windows Server 2022",    "os.version": "10.0",    "user.language": "en",    "user.timezone": "America/Chicago"  }

We were upgrading to the latest Metabase version. This same installation has previously been upgraded successfully across multiple earlier versions, so the migration process has worked before. We also ran the new JAR first (with the proper credentials) so it could create any required folders before replacing the existing version.

We run Metabase as a Windows service using WinSW. The service launches the following batch file:

@echo off"C:\Program Files\Eclipse Adoptium\jdk-21.0.7.6-hotspot\bin\java.exe" -DMB_DB_TYPE=mysql -DMB_DB_DBNAME=metabase -DMB_JETTY_PORT=3000 -DMB_DB_USER=user -DMB_DB_PASS=password -DMB_DB_HOST=localhost -jar "C:\Program Files\Metabase\metabase.jar"

Reproduction steps

  1. Install Metabase under C:\Program Files\Metabase\.

  2. Configure it to use MySQL as the application database.

  3. Launch it successfully using the command above.

  4. Replace the JAR with the newer version and start Metabase.

  5. The migration fails with the following error:

    Let us know if there’s any additional information or logs that would help.

It would help to have the entire exception traceback. It looks like the jar file path needs to be URL-encoded.