wailsapp / wailsapp/wails

Ampersand in wails.json breaks macOS packaging

Open
#4,865 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug MacOS P2 v3
Dominant language
Go
Stars
36.3k
Forks
1.9k
Avg merge
2d 11h
Merged PRs (30d)
33

Description

Description

Including an ampersand (&) in wails.json results in a broken macOS.dmg when you execute wails build

To Reproduce
  1. Start with any working Wails application
  2. Build it with wails build
  3. Confirm the macOS .app in build/bin shows with the expected application icon (defined in build/appicon.png)
  4. Edit wails.json and add an ampersand to any field (e.g. .info.copywright -> "Joe & Bill, Inc."
  5. Execute wails build -clean
  6. The macOS .app in build/bin now shows with a broken application icon
  7. Reverse the change in step .4
  8. Execute wails build -clean
  9. The macOS .app in build/bin now shows with the expected application icon
Expected behaviour

Since & is legal in both JSON and macOS Info.plist, the application packaging should not be broken

Screenshots

Correct packaging:

Image

Broken packaging:

Image
Attempted Fixes

No response

System Details
Wails Doctor



# Wails
Version | v2.10.2


# System
┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
| OS           | MacOS                                                                                                                       |
| Version      | 15.7.3                                                                                                                      |
| ID           | 24G419                                                                                                                      |
| Branding     |                                                                                                                             |
| Go Version   | go1.24.2                                                                                                                    |
| Platform     | darwin                                                                                                                      |
| Architecture | arm64                                                                                                                       |
| CPU 1        | Apple M1 Max                                                                                                                |
| CPU 2        | Apple M1 Max                                                                                                                |
| GPU          | Chipset Model: Apple M1 Max Type: GPU Bus: Built-In Total Number of Cores: 32 Vendor: Apple (0x106b) Metal Support: Metal 3 |
| Memory       | 32GB                                                                                                                        |
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

# Dependencies
┌────────────────────────────────────────────────────────────────┐
| Dependency                | Package Name | Status    | Version |
| Xcode command line tools  | N/A          | Installed | 2410    |
| Nodejs                    | N/A          | Installed | 22.15.0 |
| npm                       | N/A          | Installed | 10.9.2  |
| *Xcode                    | N/A          | Available |         |
| *upx                      | N/A          | Available |         |
| *nsis                     | N/A          | Available |         |
|                                                                |
└─────────────────── * - Optional Dependency ────────────────────┘

# Diagnosis
Optional package(s) installation details:
  - Xcode: Available at https://apps.apple.com/us/app/xcode/id497799835
  - upx : Available at https://upx.github.io/
  - nsis : More info at https://wails.io/docs/guides/windows-installer/

 SUCCESS  Your system is ready for Wails development!
Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with wails build using an ampersand in wails.json, then inspect the macOS packaging path that produces the .app in build/bin. Compare the generated package and build/appicon.png behavior with and without the character; done means the expected application icon remains present after wails build -clean.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, macos
Domain
build-system, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.