brackets-bower
brackets-bower copied to clipboard
Error loading domain "bower": timeout
When launching Brackets, provided my computer is performing many CPU tasks, Brackets can launch slowly.
It seems that when Brackets launches slowly, the Bower extension fails to load properly, and an error message appears (I will include it here for search engine purposes):
Bower Warning
Git wasn't found on your system
Brackets-bower extension searched for Git at the system PATH.
Bower requires Git installed, and configured in the system PATH variable,
to download and install some packages.
Brackets-bower extension may not work properly.
Git is properly configured on my machine, so unlike what the error message states, this is not the problem.
Whilst in this state (i.e. without acknowledging the [close]
button), I check out the Brackets developer tools, here is the console output:
Console Output
Download the React DevTools for a better development experience: http://fb.me/react-devtools
/utils/DeprecationWarning.js:90 PreferencesManager.convertPreferences() has been deprecated. Please upgrade to the current Preferences system (https://github.com/adobe/brackets/wiki/Preferences-System#conversion-from-the-pre-36-preferences-system).
at Object.convertPreferences (/preferences/PreferencesManager.js:325:28)
at Object.eval (/utils/Resizer.js:548:24)
/LiveDevelopment/MultiBrowserImpl/transports/NodeSocketTransport.js:87 NodeSocketTransport - start
/utils/DeprecationWarning.js:90 Use WorkspaceManager.createBottomPanel() instead of PanelManager.createBottomPanel().
at Object.exports.createBottomPanel (/view/PanelManager.js:53:28)
at file:///Users/jkaussieskater/Library/Application%20Support/Brackets/extensions/user/brackets-grunt/main.js:139:24
at _callHandler (/utils/AppInit.js:93:13)
at Object._dispatchReady (/utils/AppInit.js:113:13)
at Object.eval (/brackets.js:284:33)
at j (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:26911)
at Object.k.add [as done] (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:27220)
at Object.d.always (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:28096)
at Object.eval (/brackets.js:282:30)
/utils/DeprecationWarning.js:90 Deprecated: Do not use $().on/off() on Brackets modules and model objects. Call on()/off() directly on the object without a $() wrapper.
at new jQuery.fn.init (/brackets.js:474:36)
at n (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:405)
at file:///Users/jkaussieskater/Library/Application%20Support/Brackets/extensions/user/brackets-grunt/main.js:172:3
at _callHandler (/utils/AppInit.js:93:13)
at Object._dispatchReady (/utils/AppInit.js:113:13)
at Object.eval (/brackets.js:284:33)
at j (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:26911)
at Object.k.add [as done] (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:27220)
at Object.d.always (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:28096)
/utils/DeprecationWarning.js:90 Deprecated: Do not use $().on/off() on Brackets modules and model objects. Call on()/off() directly on the object without a $() wrapper.
at new jQuery.fn.init (/brackets.js:474:36)
at n (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:405)
at file:///Users/jkaussieskater/Library/Application%20Support/Brackets/extensions/user/brackets-grunt/main.js:177:3
at _callHandler (/utils/AppInit.js:93:13)
at Object._dispatchReady (/utils/AppInit.js:113:13)
at Object.eval (/brackets.js:284:33)
at j (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:26911)
at Object.k.add [as done] (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:27220)
at Object.d.always (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:28096)
/utils/DeprecationWarning.js:90 Deprecated: Do not use $().on/off() on Brackets modules and model objects. Call on()/off() directly on the object without a $() wrapper.
at new jQuery.fn.init (/brackets.js:474:36)
at n (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:405)
at file:///Users/jkaussieskater/Library/Application%20Support/Brackets/extensions/user/brackets-grunt/main.js:182:3
at _callHandler (/utils/AppInit.js:93:13)
at Object._dispatchReady (/utils/AppInit.js:113:13)
at Object.eval (/brackets.js:284:33)
at j (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:26911)
at Object.k.add [as done] (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:27220)
at Object.d.always (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:28096)
/utils/DeprecationWarning.js:90 Deprecated: Do not use $().on/off() on Brackets modules and model objects. Call on()/off() directly on the object without a $() wrapper.
at new jQuery.fn.init (/brackets.js:474:36)
at n (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:405)
at file:///Users/jkaussieskater/Library/Application%20Support/Brackets/extensions/user/brackets-grunt/main.js:186:3
at _callHandler (/utils/AppInit.js:93:13)
at Object._dispatchReady (/utils/AppInit.js:113:13)
at Object.eval (/brackets.js:284:33)
at j (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:26911)
at Object.k.add [as done] (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:27220)
at Object.d.always (file:///Applications/Brackets.app/Contents/www/thirdparty/thirdparty.min.js:556:28096)
/utils/NodeDomain.js:148 [NodeDomain] Error loading domain "bower": timeout/utils/NodeDomain.js:148 (anonymous function)thirdparty.min.js:556 jthirdparty.min.js:556 k.fireWiththirdparty.min.js:556 e.(anonymous function)/utils/NodeConnection.js:71 (anonymous function)
Console Output: The interesting part
[NodeDomain] Error loading domain "bower": timeout /utils/NodeDomain.js:148
(anonymous function) /utils/NodeDomain.js:148
j thirdparty.min.js:556
k.fireWith thirdparty.min.js:556
e.(anonymous function) thirdparty.min.js:556
(anonymous function) /utils/NodeConnection.js:71
It would appear that because my computer is slow (or the CPU is otherwise busy), it isn't able to load the Brackets-Bower extension within a certain timeframe.
Workaround
Reload Brackets with extensions from the menu bar (Debug » Reload With Extensions
).
This gives the CPU a second chance to load the Brackets-Bower extension within the allowed timeframe.
If this doesn't work, try reloading Brackets with extensions a 3rd or 4th time. Eventually it will work.
Potential solutions
- The extension could lengthen the timeout period, to be more lenient on slower computers.
- The extension should detect the timeout error, and display a more relevant error message.
- The extension could display an error dialogue explaining the timeout, and have a couple of buttons:
[Cancel] [Retry]
, giving the user the opportunity to reload the Brackets-Bower extension without having to reload ALL Brackets extensions.
- The extension could display an error dialogue explaining the timeout, and have a couple of buttons:
Or, brackets-bower could just check for git on install and assume it doesn't disappear.
I ended up commenting out the check in GitUtils
and replacing it with an immediate deferred.resolve()