Skip to content

[bug] Menu bar is missing on Windows with absolute tauri.config.windows.url #4131

@DarrenDanielDay

Description

@DarrenDanielDay

Describe the bug

The menu bar is missing when tauri.config.windows.url is an absolute URL.

Reproduction

A complete example to reproduce can be found here 👈.

  1. Install dependencies and run yarn tauri dev with the example.
  2. The menu bar is missing.

Expected behavior

The menu bar appears at the top of app with config tauri.config.windows.url set to custom absolute URL (especially local server URL).

Platform and versions

Environment
  › OS: Windows 10.0.19044 X64
  › Webview2: 101.0.1210.39
  › MSVC:
      - Visual Studio Community 2022
  › Node.js: 16.13.1
  › npm: 8.9.0
  › pnpm: 7.0.1
  › yarn: 1.22.10
  › rustup: 1.24.3
  › rustc: 1.60.0
  › cargo: 1.60.0
  › Rust toolchain: stable-x86_64-pc-windows-msvc

Packages
  › @tauri-apps/cli [NPM]: 1.0.0-rc.10
  › @tauri-apps/api [NPM]: 1.0.0-rc.5
  › tauri [RUST]: 1.0.0-rc.10,
  › tauri-build [RUST]: 1.0.0-rc.8,
  › tao [RUST]: 0.8.4,
  › wry [RUST]: 0.16.2,

App
  › build-type: bundle
  › CSP: unset
  › distDir: ../dist
  › devPath: ../dist

App directory structure
  ├─ .git
  ├─ dist
  ├─ node_modules
  └─ src-tauri

Stack trace

No error stack trace.

Additional context

In my case, I have an existing Angular project and I want to build a tauri desktop app for a trial. But the project depends on a lot of backend APIs with http protocol (not https) to work, which resulted in "Mixed Content" errors in release mode (tauri's https://tauri.localhost by default, ref #3007). So I tried to use tauri-plugin-localhost to start a local http server on port 4200, serving the front end build. Then I changed tauri.config.windows.url in tauri.conf.json to http://localhost:4200. It worked, but I also got to this issue, that the menu bar disappeared unexpectedly. I'm also looking for other solutions for my case (instead of starting an local http server to avoid "Mixed Content" errors).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions