Bubbles fails to run as a standalone packaged macOS or Windows application
colinbdclark opened this issue · 1 comments
I get the following log output when I try to run Bubbles as a standalone macOS application. It looks to me like it's an issue with an asymmetry in package structure when running from source vs. as a packaged application.
When run as an application, Electron moves the source code directory into an appropriate spot within the macOS app bundle—in this case, Bubbles.app/Contents/Resources/app
. While node is able to resolve modules relative to this, it seems that Infusion or Kettle is unable to handle this. Somehow I'll need to parameterize the paths appropriately; infusion-electron provides electron.getAppRootPath()
and electron.getAppRootURL()
for this purpose.
[colin@tofino MacOS (gh-23 *$%)]$ ./Bubbles
Infusion at path /Users/colin/code/bubbles/node_modules/infusion is at top level
17:31:59.808: Registering module video-bubbles from path /Users/colin/code/bubbles/
17:31:59.809: Registering module infusion from path /Users/colin/code/bubbles/node_modules/infusion/
17:31:59.809: Registering module infusion from path /Users/colin/code/bubbles/node_modules/infusion
Resolved infusion from path /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/Resources/app/node_modules/infusion/src/module to /Users/colin/code/bubbles/node_modules/infusion
Resolved infusion from path /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/Resources/app/node_modules/kettle/node_modules/infusion/src/module to /Users/colin/code/bubbles/node_modules/infusion
17:31:59.812: Registering module kettle from path /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/Resources/app/node_modules/kettle
17:32:00.064: ASSERTION FAILED: Could not find a config file at any of the paths /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/MacOS/src/configs/bubbles, /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/MacOS/src/configs/bubbles.json, /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/MacOS/src/configs/bubbles.json5
17:32:00.065: FATAL ERROR: Uncaught exception: Assertion failure - check console for more details: Could not find a config file at any of the paths /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/MacOS/src/configs/bubbles, /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/MacOS/src/configs/bubbles.json, /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/MacOS/src/configs/bubbles.json5
Error: Assertion failure - check console for more details: Could not find a config file at any of the paths /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/MacOS/src/configs/bubbles, /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/MacOS/src/configs/bubbles.json, /Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/MacOS/src/configs/bubbles.json5
at new fluid.FluidError (/Users/colin/code/bubbles/node_modules/infusion/src/framework/core/js/Fluid.js:181:26)
at Object.fluid.builtinFail (/Users/colin/code/bubbles/node_modules/infusion/src/framework/core/js/Fluid.js:205:15)
at kettle.failureHandler (/Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/Resources/app/node_modules/kettle/lib/KettleUtils.js:60:11)
at Object.fire (/Users/colin/code/bubbles/node_modules/infusion/src/framework/core/js/Fluid.js:1612:40)
at Object.fluid.fail (/Users/colin/code/bubbles/node_modules/infusion/src/framework/core/js/Fluid.js:222:32)
at Function.kettle.config.createDefaultsImpl (/Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/Resources/app/node_modules/kettle/lib/KettleConfigLoader.js:106:15)
at Function.kettle.config.createDefaults (/Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/Resources/app/node_modules/kettle/lib/KettleConfigLoader.js:155:26)
at Function.kettle.config.loadConfig (/Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/Resources/app/node_modules/kettle/lib/KettleConfigLoader.js:161:39)
at Object.<anonymous> (/Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/Resources/app/main.js:11:15)
at Object.<anonymous> (/Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/Resources/app/main.js:16:3)
at Module._compile (internal/modules/cjs/loader.js:693:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Object.<anonymous> (/Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/Resources/electron.asar/browser/init.js:188:8)
at Object.<anonymous> (/Users/colin/code/bubbles/Bubbles-darwin-x64/Bubbles.app/Contents/Resources/electron.asar/browser/init.js:190:3)
at Module._compile (internal/modules/cjs/loader.js:693:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:704:10)
at Module.load (internal/modules/cjs/loader.js:602:32)
at tryModuleLoad (internal/modules/cjs/loader.js:541:12)
at Function.Module._load (internal/modules/cjs/loader.js:533:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:746:12)
at startup (internal/bootstrap/node.js:282:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:759:3)
The same issue occurs on Windows; Electron moves the source code into a resources/app
directory that lives alongside the Bubbles exe file, and thus the config is unable to be loaded