sindrets / atom-title-bar-replacer

Adds an alternative, theme-aware title bar and application menu that is more inline with Atom's UI design.
Other
85 stars 5 forks source link

Failed to activate the title-bar-replacer package #8

Closed LukaHorvat closed 7 years ago

LukaHorvat commented 7 years ago

I just installed the package. The error also appear when I reload Atom.

Atom: 1.20.0-beta5 x64 Electron: 1.6.9 OS: Microsoft Windows 10 Education Thrown From: title-bar-replacer package 1.3.1

Stack Trace

Failed to activate the title-bar-replacer package

At Cannot read property 'match' of undefined

TypeError: Cannot read property 'match' of undefined
    at formatAltKey (/packages/title-bar-replacer/lib/title-bar-replacer-view.js:190:21)
    at spawnTempLabels (/packages/title-bar-replacer/lib/title-bar-replacer-view.js:147:27)
    at TitleBarReplacerView.spawnTemp (/packages/title-bar-replacer/lib/title-bar-replacer-view.js:59:9)
    at Object.activate (/packages/title-bar-replacer/lib/title-bar-replacer.js:30:35)
    at Package.module.exports.Package.activateNow (~/AppData/Local/atom/app-1.20.0-beta5/resources/app/src/package.js:253:25)
    at ~/AppData/Local/atom/app-1.20.0-beta5/resources/app/src/package.js:225:38
    at Package.module.exports.Package.measure (~/AppData/Local/atom/app-1.20.0-beta5/resources/app/src/package.js:99:21)
    at ~/AppData/Local/atom/app-1.20.0-beta5/resources/app/src/package.js:218:32
    at Package.module.exports.Package.activate (~/AppData/Local/atom/app-1.20.0-beta5/resources/app/src/package.js:215:40)
    at PackageManager.module.exports.PackageManager.activatePackage (~/AppData/Local/atom/app-1.20.0-beta5/resources/app/src/package-manager.js:645:40)
    at ~/AppData/Local/atom/app-1.20.0-beta5/resources/app/src/package-manager.js:626:35
    at Config.module.exports.Config.transactAsync (~/AppData/Local/atom/app-1.20.0-beta5/resources/app/src/config.js:346:24)
    at PackageManager.module.exports.PackageManager.activatePackages (~/AppData/Local/atom/app-1.20.0-beta5/resources/app/src/package-manager.js:621:25)
    at PackageManager.module.exports.PackageManager.activate (~/AppData/Local/atom/app-1.20.0-beta5/resources/app/src/package-manager.js:603:52)
    at ~/AppData/Local/atom/app-1.20.0-beta5/resources/app/src/atom-environment.js:843:36

Commands

     -0:48.3.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always.theme-nord-atom-syntax-accessibility-custom-comment-contrast)

Non-Core Packages

advanced-open-file 0.16.6 
animated-page-scroll 1.2.0 
atom-prettify 0.1.3 
atom-terminal 0.8.0 
atom-tsd 0.9.0 
autocomplete-clang 0.11.3 
autocomplete-glsl 0.2.3 
autocomplete-haskell 1.0.1 
autocomplete-paths 2.8.1 
busy-signal 1.4.3 
elm-format 2.2.0 
elmjutsu 5.6.3 
file-icons 2.1.11 
gist 1.0.0 
git-diff-details 1.4.0 
haskell-debug 0.3.3 
haskell-ghc-mod 2.0.10 
haskell-hoogle 0.1.3 
haskell-tools 0.9.0 
ide-haskell 2.0.5 
ide-haskell-cabal 2.0.2 
ide-haskell-hasktags 0.0.11 
ide-haskell-hoogle 0.1.0 
ide-purescript 0.18.2 
intentions 1.1.5 
jumpy 3.1.3 
language-arduino 0.4.3 
language-elm 1.5.0 
language-glsl 2.0.1 
language-haskell 1.13.2 
language-haskell-scoped 0.1.0 
language-latex 1.1.1 
language-powershell 4.0.0 
language-prolog 0.11.0 
language-purescript 0.8.2 
language-shakespeare 0.2.2 
latex-completions 0.3.3 
latexer 0.3.0 
linter 2.2.0 
linter-clang 4.1.2 
linter-elm-make 0.24.0 
linter-ui-default 1.6.8 
linter-write-good 0.9.0 
minimap-plus 4.29.2 
nord-atom-syntax 0.9.1 
nord-atom-ui 0.11.0 
project-plus 1.0.0 
remote-sync 4.1.5 
swap-selection 0.4.0 
sync-settings 0.8.3 
title-bar-replacer 1.3.1 
todo-show 2.0.0 
zentabs 0.8.8 
sindrets commented 7 years ago

Hello @LukaHorvat! I'm sorry you're facing this issue. However, I'm really struggling to recreate this error. I thought it might have been the Atom beta that was the root of the problem, but no. The package runs fine on the beta on my machine. I then tried to install ide-haskell as I know that package adds its own menu category, but no, the replacer ran fine.

I'm confused as to how the formatAltKey function would even receive an undefined object in the first place. Because it shouldn't. At this point I think the best thing would be if you cloned my replacer, ran it in dev mode, and did some debugging. I would really appreciate that.

LukaHorvat commented 7 years ago

Sure, I'm willing to help if you tell me how to do that. (the running it in dev mode part)

sindrets commented 7 years ago

@LukaHorvat the help is much appreciated! For running the package in dev mode: open a CMD instance wherever you want the clone to reside and run these two commands

git clone https://github.com/sindrets/atom-title-bar-replacer.git title-bar-replacer && cd title-bar-replacer

apm link --dev

This will create a symlink to the clone in Atom's dev folder and load the clone instead of the official release when Atom is ran in dev mode. This is accomplished by running atom --dev . in CMD (preferably from the clone folder as that will load it as the active project). Any changes to the clone beyond that point, will be immediately reflected upon reloading Atom in dev mode.

If you figure out what causes the error I will publish a hotfix as quickly as possible.

LukaHorvat commented 7 years ago

Well, I've put a condition in spawnTempLabels to skip the items that don't have a label. I've inspected the array and there indeed was an extra item that has no label or submenus. Don't know whats up with that.

This avoids the crash and I managed to remove the titlebar!

sindrets commented 7 years ago

@LukaHorvat Brilliant! I figured it had to be something like that, but I couldn't figure out the source of the unlabeled menu item. I guess we still don't know the source, but I'll add this fix for compatibility 👍

sindrets commented 7 years ago

@LukaHorvat I just published v1.3.2 with a fix. Can you confirm that it works?

LukaHorvat commented 7 years ago

So I no longer get the error popup and I'm able to remove the title bar. However, in the console there's still

Uncaught TypeError: Cannot read property 'match' of undefined
    at formatAltKey (title-bar-replacer-view.js:193)
    at deserializeLabels (title-bar-replacer-view.js:164)
    at TitleBarReplacerView.initMenuBar (title-bar-replacer-view.js:63)
    at title-bar-replacer.js:38

Also, I can't seem to open any of the menus. Clicking them produces this error (again, only in the console)

Error serializing package 'atom-tsd' TypeError: Cannot read property 'serialize' of undefined
    at AtomTsd.serialize (C:\Users\darwi\.atom\packages\atom-tsd\lib\atom-tsd.js:39:47)
    at Package.module.exports.Package.serialize (C:\Users\darwi\AppData\Local\atom\app-1.20.0-beta5\resources\app\src\package.js:785:103)
    at PackageManager.module.exports.PackageManager.serializePackage (C:\Users\darwi\AppData\Local\atom\app-1.20.0-beta5\resources\app\src\package-manager.js:712:69)
    at PackageManager.module.exports.PackageManager.serialize (C:\Users\darwi\AppData\Local\atom\app-1.20.0-beta5\resources\app\src\package-manager.js:705:20)
    at AtomEnvironment.module.exports.AtomEnvironment.serialize (C:\Users\darwi\AppData\Local\atom\app-1.20.0-beta5\resources\app\src\atom-environment.js:878:44)
    at C:\Users\darwi\AppData\Local\atom\app-1.20.0-beta5\resources\app\src\atom-environment.js:1209:33
    at AtomEnvironment.module.exports.AtomEnvironment.saveState (C:\Users\darwi\AppData\Local\atom\app-1.20.0-beta5\resources\app\src\atom-environment.js:1205:20)
    at C:\Users\darwi\AppData\Local\atom\app-1.20.0-beta5\resources\app\src\atom-environment.js:373:34

But I'm guessing this is a separate issue.

sindrets commented 7 years ago

@LukaHorvat sorry, I wasn't able to work on the package for a couple days. I had missed an exception. It should work now in v1.4.0. It would be great if you could get back to me on whether or not it works now, so that I can close this issue. I also implemented live menu updates, so that menu items and categories added during runtime (such as the Haskell menu) are also reflected in the replacer menu.

The second error you posted doesn't seem to occur in my package.

LukaHorvat commented 7 years ago

Well, I get some new exceptions now

Failed to activate the ide-haskell package

TypeError: Cannot read property 'childNodes' of undefined
    at MenuUpdater.updateLabel (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:201:17)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:156:22)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (file:///C:/Users/darwi/.atom/packages/title-bar-replacer/lib/menu-updater.js:178:14)

That being said, the menus open now (with some rendering errors [1]) and I think it doesn't make much sense to keep adding to this issue because you successfully fixed the main problem.

[1]

yyynnn commented 7 years ago

i have error too after update

Atom: 1.19.6 ia32 Electron: 1.6.9 OS: Windows 7 Thrown From: title-bar-replacer package 1.4.1

Stack Trace

Uncaught TypeError: Cannot read property 'parentNode' of undefined

At C:\Users\SNikolaev\.atom\packages\title-bar-replacer\lib\menu-updater.js:232

TypeError: Cannot read property 'parentNode' of undefined
    at MenuUpdater.cleanUp (/packages/title-bar-replacer/lib/menu-updater.js:232:10)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:172:22)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.traverseTemplate (/packages/title-bar-replacer/lib/menu-updater.js:178:14)
    at MenuUpdater.run (/packages/title-bar-replacer/lib/menu-updater.js:43:14)
    at TitleBarReplacerView.updateMenu (/packages/title-bar-replacer/lib/title-bar-replacer-view.js:393:20)
    at /packages/title-bar-replacer/lib/title-bar-replacer.js:49:48)
    at MenuManager.module.exports.MenuManager.add (~/AppData/Local/atom/app-1.19.6/resources/app/src/menu-manager.js:60:18)
    at stdout (/packages/atom-live-server/lib/atom-live-server.js:76:33)
    at Socket.<anonymous> (~/AppData/Local/atom/app-1.19.6/resources/app/src/buffered-process.js:212:17)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at Pipe.onread (net.js:551:20)

Commands

     -2:45.8.0 tree-view:show (atom-workspace.workspace.scrollbars-visible-always)
  2x -2:14.1.0 core:backspace (input.hidden-input)
     -2:03.1.0 intentions:highlight (input.hidden-input)
     -2:02.7.0 atom-live-server:start-4000 (input.hidden-input)

Non-Core Packages

atom-beautify 0.30.5 
atom-live-server 2.1.2 
atom-wrap-in-tag 0.6.0 
auto-detect-indentation 1.3.0 
autoclose 0.0.2 
autoclose-html 0.23.0 
autocomplete-paths 2.11.0 
autoprefixer 3.7.1 
busy-signal 1.4.3 
css-spy 0.6.0 
double-tag 0.9.0 
duotone-berries-syntax 0.1.1 
duotone-dark-sea-syntax 2.1.0 
duotone-dark-syntax 2.1.0 
duotone-darkpool-syntax 1.1.0 
emmet 2.4.3 
emmet-jsx-css-modules 1.0.0 
file-icons 2.1.11 
ftp-remote-edit 0.11.11 
git-plus 7.9.3 
gutter-shadow 1.1.0 
highlight-selected 0.13.1 
html-to-css 0.2.2 
intentions 1.1.5 
language-babel 2.74.1 
language-javascript-jsx 0.3.7 
language-postcss 1.3.1 
language-pug 0.0.21 
linter 2.2.0 
linter-pug 1.3.1 
linter-stylelint 4.0.2 
linter-ui-default 1.6.8 
minimap 4.29.6 
minimap-autohide 0.10.1 
minimap-cursorline 0.2.0 
new-era-syntax 1.1.0 
newton-dark-syntax 1.1.9 
newton-dark-ui 1.1.3 
paraiso-dark 2.0.2 
pigments 0.40.2 
prettier-atom 0.38.0 
pristine-ui 1.1.7 
pure-syntax 0.3.0 
quick-editor 0.4.3 
red-wavy-underline 0.3.3 
rest-client 1.3.1 
sass-autocompile 0.13.3 
split-diff 1.5.1 
tag 0.5.0 
title-bar-replacer 1.4.1 
tree-view-copy-relative-path 1.2.0 
uglify 1.3.1 
vaporwave-syntax 0.0.6 
vaporwave-ui 0.0.2 
webbox-color 0.5.9 
Wild-Cherry 0.10.0 
wingyplus-syntax 0.5.1 
wingyplus-ui 0.1.1 
yyynnn commented 7 years ago

With clean install of the new version of atom same errors emergin.

sindrets commented 7 years ago

@yyynnn I fixed a bunch of bugs with the menu updater, published in v1.4.2, that will probably fix your error.

@LukaHorvat Hmm. Like you said: the original bug is now fixed. But I have a feeling that the error you are currently facing is a result of the faulty menu items in your menu template. However at the moment I don't know what I'm working with while trying to fix your problem, as I cannot reproduce it (probably because it's some other package you have, injecting empty objects into the menu template). The next time you get that error, could you run the following in the console:

var fs = require("fs");
var p = (_this = atom.packages.activePackages["title-bar-replacer"]) ? _this : atom.packages.activatingPackages["title-bar-replacer"];
fs.writeFile(process.env.USERPROFILE + "\\Desktop\\TBR-Debug-Data.txt", "--------LAST TEMPLATE-------\n\n" + JSON.stringify(p.mainModule.titleBarReplacerView.getCurrentTemplate(), function(key, value) { if (key == "menuParent") return undefined; else return value; }, 2) + "\n\n\n\n\n\n\n\n---------CURRENT TEMPLATE---------\n\n" + JSON.stringify(atom.menu.template, undefined, 2));

This will stringify the last stored menu template in the TitleBarReplacerView class (used for comparison in the menu updater) and the menu template currently used by Atom. It will then write these, in JSON format, to a text file on your desktop. If you could attach this file to a comment in this thread it would really help me debug your current issue, as well as future handling of your case.

LukaHorvat commented 7 years ago

Ok, I did it. Here's the log https://gist.github.com/8effcda54c89807e808daac6c020764e

sindrets commented 7 years ago

@LukaHorvat thanks a lot. I think your latest issue should be fixed now in v1.4.3

sindrets commented 7 years ago

@LukaHorvat I'm closing this issue as - at least - the original issue is fixed.