nixpkgs icon indicating copy to clipboard operation
nixpkgs copied to clipboard

discord: fails to launch when `withOpenASAR = true;` on aarch64-darwin

Open ssalggnikool opened this issue 1 month ago • 0 comments

Nixpkgs version

  • Unstable (26.11)

Describe the bug

discord fails to launch on darwin if you're using withOpenASAR = true;

Steps to reproduce

  1. include this in your config
    environment.systemPackages = with pkgs; [
    	(discord.override { withOpenASAR = true; })
    ];
    
  2. open discord, observe how it closes after a second, an error will show if opened from terminal

Expected behaviour

discord to launch successfully

Screenshots

No response

Relevant log output

Error: Cannot find module 'discord_desktop_core'
Require stack:
- /Applications/Nix Apps/Discord.app/Contents/Resources/app.asar/bootstrap.js
- /Applications/Nix Apps/Discord.app/Contents/Resources/app.asar/index.js
-
    at node:internal/modules/cjs/loader:1524:15
    at Module._resolveFilename (node:electron/js2c/browser_init:2:144728)
    at wrapResolveFilename (node:internal/modules/cjs/loader:1078:27)
    at defaultResolveImplForCJSLoading (node:internal/modules/cjs/loader:1102:10)
    at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1129:12)
    at node:internal/modules/cjs/loader:1301:5
    at Module._load (node:electron/js2c/node_init:2:18159)
    at wrapModuleLoad (node:internal/modules/cjs/loader:262:19)
    at Module.require (node:internal/modules/cjs/loader:1624:12)
    at require (node:internal/modules/helpers:153:16) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Applications/Nix Apps/Discord.app/Contents/Resources/app.asar/bootstrap.js',
    '/Applications/Nix Apps/Discord.app/Contents/Resources/app.asar/index.js',
    undefined
  ]
} uncaughtException

Additional context

No response

System metadata

  • system: "aarch64-darwin"
  • host os: Darwin 24.6.0, macOS 15.7.9
  • multi-user?: yes
  • sandbox: no
  • version: nix-env (Nix) 2.34.9
  • nixpkgs: /nix/store/fjr02205wq70r3vghhfbfzv5g97nr4ya-source

Are you using nix-darwin?

Yes, I am using nix-darwin.

Notify maintainers

@Artturin @4evy @Infinidoge @jopejoe1 @Scrumplex


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a :+1: reaction to issues you find important.

ssalggnikool avatar Oct 20 '26 04:10 ssalggnikool