#1396·Pake

[Bug] window.print() fails on macOS: "webview.print not allowed" (missing core:webview:allow-print permission)

Author: nhanntgitCreated Sep 25, 2026Updated Sep 29, 2026
Labelsbug

Search before asking

  • I searched in the issues and found nothing similar.

Pake version

Search before asking

  • I searched in the issues and found nothing similar.

Pake version

<3.17.2>

Rust version

rustc 1.98.1 (48a229cea 2026-09-01)

Package Manager

npm

System version

macOS <14.4.1> (Apple Silicon)

Node.js version

<v24.21.0>

Build Command

pake --config app.json --debug

app.json:

json
{
  "url": "./dist",
  "name": "MyApp",
  "hideTitleBar": true
}

Minimal reproduce step

  1. Create a local page test/index.html:
xml
<!doctype html>
<html>
<body>
  <button onclick="window.print()">Print</button>
</body>
</html>
  1. Package it: pake ./test --name PakeTest --debug
  2. Open the app and click the Print button.

What did you expect to see?

The native macOS print dialog opens.

What did you see instead?

Nothing happens. The DevTools console shows:

Unhandled Promise Rejection: webview.print not allowed. Permissions associated with this command: core:webview:allow-print

Anything else?

Adding "core:webview:allow-print" to the permissions array in src-tauri/capabilities/default.json of the installed pake-cli and rebuilding fixes it: the print dialog opens and printing works.

Could this permission be included by default? Many web apps rely on window.print() (invoices, reports, tickets).

Possibly related: in the same build, window.alert(), window.confirm() and window.prompt() also do not show any dialog on macOS. I can open a separate issue for that if you prefer.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Rust version

rustc 1.98.1 (48a229cea 2026-09-01)

Package Manager

npm

System version

macOS <14.x> (Apple Silicon)

Node.js version

<v24.21.0>

Build Command

pake --config app.json --debug

app.json:

json
{
  "url": "./dist",
  "name": "MyApp",
  "hideTitleBar": true
}

Minimal reproduce step

  1. Create a local page test/index.html:
xml
<!doctype html>
<html>
<body>
  <button onclick="window.print()">Print</button>
</body>
</html>
  1. Package it: pake ./test --name PakeTest --debug
  2. Open the app and click the Print button.

What did you expect to see?

The native macOS print dialog opens.

What did you see instead?

Nothing happens. The DevTools console shows:

Unhandled Promise Rejection: webview.print not allowed. Permissions associated with this command: core:webview:allow-print

Anything else?

Adding "core:webview:allow-print" to the permissions array in src-tauri/capabilities/default.json of the installed pake-cli and rebuilding fixes it: the print dialog opens and printing works.

Could this permission be included by default? Many web apps rely on window.print() (invoices, reports, tickets).

Possibly related: in the same build, window.alert(), window.confirm() and window.prompt() also do not show any dialog on macOS. I can open a separate issue for that if you prefer.

Are you willing to submit a PR?

  • I'm willing to submit a PR!