Problems with packaging safe_browser


#1

I have been trying for a few days now to follow the guide How to develop for the SAFE Network (draft) but to no avail. I can successfully yarn start the browser, but when I come to yarn run package it will fail every single time. The step that fails is “Building DMG”, this is the output I get… I am currently on macOS High Sierra version 10.13.

Building DMG

Warning: Do not specify path for application: "dist/mac/Beaker Browser.app". Actual path to app will be used instead.

Error: Cannot find specified resource "dist/mac/Beaker Browser.app", nor relative to "/Users/david/Git/safe_browser/build", neither relative to project dir ("/Users/david/Git/safe_browser")
    at /Users/david/Git/safe_browser/node_modules/electron-builder/src/platformPackager.ts:552:17
From previous event:
    at MacPackager.getResource (/Users/david/Git/safe_browser/node_modules/electron-builder/out/platformPackager.js:580:11)
    at /Users/david/Git/safe_browser/node_modules/electron-builder/src/targets/dmg.ts:332:37
    at Generator.next (<anonymous>)
From previous event:
    at computeDmgEntries (/Users/david/Git/safe_browser/node_modules/electron-builder/out/targets/dmg.js:126:22)
    at /Users/david/Git/safe_browser/node_modules/electron-builder/src/targets/dmg.ts:312:31
From previous event:
    at customizeDmg (/Users/david/Git/safe_browser/node_modules/electron-builder/out/targets/dmg.js:96:22)
    at /Users/david/Git/safe_browser/node_modules/electron-builder/src/targets/dmg.ts:45:54
    at /Users/david/Git/safe_browser/node_modules/dmg-builder/src/dmgUtil.ts:34:31
From previous event:
    at attachAndExecute (/Users/david/Git/safe_browser/node_modules/dmg-builder/out/dmgUtil.js:40:21)
    at /Users/david/Git/safe_browser/node_modules/electron-builder/src/targets/dmg.ts:45:10
    at Generator.next (<anonymous>)
From previous event:
    at DmgTarget.build (/Users/david/Git/safe_browser/node_modules/electron-builder/out/targets/dmg.js:247:11)
    at taskManager.addTask.default.map.it (/Users/david/Git/safe_browser/node_modules/electron-builder/src/platformPackager.ts:120:85)
From previous event:
    at MacPackager.packageInDistributableFormat (/Users/david/Git/safe_browser/node_modules/electron-builder/src/platformPackager.ts:120:41)
    at /Users/david/Git/safe_browser/node_modules/electron-builder/src/macPackager.ts:89:26
From previous event:
    at /Users/david/Git/safe_browser/node_modules/electron-builder/src/macPackager.ts:89:10
    at Generator.next (<anonymous>)
From previous event:
    at MacPackager.pack (/Users/david/Git/safe_browser/node_modules/electron-builder/out/macPackager.js:183:11)
    at /Users/david/Git/safe_browser/node_modules/electron-builder/src/packager.ts:260:24
From previous event:
    at Packager.doBuild (/Users/david/Git/safe_browser/node_modules/electron-builder/out/packager.js:344:11)
    at /Users/david/Git/safe_browser/node_modules/electron-builder/src/packager.ts:186:52
    at Generator.next (<anonymous>)
From previous event:
    at Packager.build (/Users/david/Git/safe_browser/node_modules/electron-builder/out/packager.js:263:11)
    at /Users/david/Git/safe_browser/node_modules/electron-builder/src/builder.ts:283:40
    at Generator.next (<anonymous>)
From previous event:
    at build (/Users/david/Git/safe_browser/node_modules/electron-builder/out/builder.js:63:21)
    at then (/Users/david/Git/safe_browser/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at runCallback (timers.js:785:20)
    at tryOnImmediate (timers.js:747:5)
    at processImmediate [as _immediateCallback] (timers.js:718:5)
From previous event:
    at Object.args [as handler] (/Users/david/Git/safe_browser/node_modules/electron-builder/src/cli/cli.ts:49:4)
    at Object.runCommand (/Users/david/Git/safe_browser/node_modules/electron-builder/node_modules/yargs/lib/command.js:226:22)
    at Object.parseArgs [as _parseArgs] (/Users/david/Git/safe_browser/node_modules/electron-builder/node_modules/yargs/yargs.js:998:24)
    at Object.get [as argv] (/Users/david/Git/safe_browser/node_modules/electron-builder/node_modules/yargs/yargs.js:912:21)
    at Object.<anonymous> (/Users/david/Git/safe_browser/node_modules/electron-builder/src/cli/cli.ts:43:15)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

Release Safe Browser exited with code 255
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

It’s important to note also that I am trying to build the very latest commit, this is partly due to an issue with the version of electron-builder used in the alpha-2 tag. If anyone can give me any guidance on how to proceed or how to fix this issue it will be greatly appreciated :grinning:


#2

It almost seems to me that there is a reference to “Beaker Browser” hanging around somewhere that should be renamed to “SAFE Browser.” In the dist folder it is complaining about, there does exist a SAFE Browser.app. When I have the time I will look into this myself, unless someone else has a better explanation!


#3

This topic was automatically closed after 60 days. New replies are no longer allowed.