Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Uncaught Error: The workspace can only contain one instance of item [object Object] #234

Closed

Description

@sahina

One set of steps to reproduce from #234 (comment):

  1. Start Atom with some project atom .
  2. Right click Project above the tree view
  3. Choose one of the Split options, e.g. Split Down

At this point you get the error and the project in the tree view disappears - you need to clear saved state to use the project again.


  1. Updated packages and opened my latest project file .jsx.

Atom Version: 1.1.0
System: Mac OS X 10.11.1
Thrown From: tabs package, v0.84.0

Stack Trace

Uncaught Error: The workspace can only contain one instance of item [object Object]

At /Applications/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11

Error: The workspace can only contain one instance of item [object Object]
  at ItemRegistry.module.exports.ItemRegistry.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11:15)
  at PaneContainer.module.exports.PaneContainer.addedPaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:374:25)
  at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:359:28
  at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:86:11)
  at Pane.module.exports.Pane.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:339:20)
  at Pane.module.exports.Pane.activateItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:310:14)
  at tabs-tab.<anonymous> (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:210:24)
  at space-pen-ul.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
  at space-pen-ul.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -0:09.7.0 core:close (atom-text-editor.editor.is-focused)

Config

{
  "core": {
    "destroyEmptyPanes": false,
    "excludeVcsIgnoredPaths": false
  },
  "tabs": {
    "usePreviewTabs": true
  }
}

Installed Packages

# User
.bin, vundefined
Stylus, v1.2.1
angularjs, v0.3.3
atom-typescript, v7.8.0
coffee-compile, v0.19.2
color-picker, v2.0.13
emmet, v2.3.14
language-babel, v2.4.1
language-ejs, v0.2.0
language-jade, v0.6.2
language-rust, v0.4.5
less-autocompile, v1.0.0
linter, v1.10.0
linter-eslint, v4.0.0
linter-less, v2.2.0
linter-rust, v0.2.10
linter-stylint, v2.0.1
react, v0.12.10

# Dev
No dev packages

Activity

  1. breiter commented on Nov 24, 2015

    @breiter

    I have preview tabs on and had a buffer open that I told Atom not to save before it restarted to apply a version upgrade.

    Atom Version: 1.2.4
    System: Mac OS X 10.11.1
    Thrown From: tabs package, v0.88.0

    Stack Trace

    Uncaught Error: The workspace can only contain one instance of item [object Object]

    At /Applications/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11
    
    Error: The workspace can only contain one instance of item [object Object]
        at ItemRegistry.module.exports.ItemRegistry.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11:15)
        at PaneContainer.module.exports.PaneContainer.addedPaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:374:25)
        at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:359:28
        at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:86:11)
        at Pane.module.exports.Pane.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:340:20)
        at Pane.module.exports.Pane.activateItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:311:14)
        at atom-tabs.TabBarView.onMouseDown (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:670:19)
    

    Commands

    Config

    {
      "core": {
        "disabledPackages": [
          "metrics",
          "wrap-guide",
          "sync-settings"
        ],
        "themes": [
          "one-dark-ui",
          "zenburn"
        ]
      },
      "tabs": {
        "usePreviewTabs": true
      }
    }

    Installed Packages

    # User
    Sublime-Style-Column-Selection, v1.3.0
    atom-alignment, v0.12.1
    atom-yeoman, v0.3.15
    go-plus, v3.5.2
    json-schema, v0.1.15
    language-apache, v1.3.0
    language-cshtml, v0.1.1
    language-diff, v0.4.0
    language-powershell, v2.1.0
    linter, v1.11.2
    omnisharp-atom, v0.25.10
    zenburn, v3.0.0
    
    # Dev
    No dev packages
  2. adamreisnz commented on Dec 31, 2015

    @adamreisnz

    Got this error when I re-opened a project window (through project-manager) that had crashed.

  3. dgm commented on Jan 12, 2016

    @dgm

    I get this error repeatedly, usually after doing a search in files and the closing the results with cmd-w. I also noticed once that the tab order was wonky - alt-2 and alt-3 went to the wrong tabs, like they had gotten reversed.

  4. magic890 commented on Feb 4, 2016

    @magic890

    Atom Version: 1.4.3
    System: Mac OS X 10.11.3
    Thrown From: tabs package, v0.88.0

    Stack Trace

    Uncaught Error: The workspace can only contain one instance of item [object Object]

    At /Applications/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11
    
    Error: The workspace can only contain one instance of item [object Object]
        at ItemRegistry.module.exports.ItemRegistry.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/item-registry.js:11:15)
        at PaneContainer.module.exports.PaneContainer.addedPaneItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:374:25)
        at /Applications/Atom.app/Contents/Resources/app.asar/src/pane-container.js:359:28
        at Function.module.exports.Emitter.simpleDispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
        at Emitter.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/event-kit/lib/emitter.js:125:28)
        at Pane.module.exports.Pane.addItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:344:20)
        at Pane.module.exports.Pane.activateItem (/Applications/Atom.app/Contents/Resources/app.asar/src/pane.js:315:14)
        at atom-tabs.TabBarView.onMouseDown (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/tabs/lib/tab-bar-view.js:670:19)
    

    Config

    {
      "core": {
        "disabledPackages": [
          "git-log",
          "console-log",
          "language-log"
        ]
      },
      "tabs": {
        "enableVcsColoring": true,
        "usePreviewTabs": true
      }
    }

    Installed Packages

    # User
    atom-typescript, v8.2.0
    autoclose-html, v0.20.0
    file-icons, v1.6.14
    language-hocon, v1.1.0
    language-latex, v0.6.1
    language-scala, v1.1.6
    linter, v1.11.3
    minimap, v4.19.0
    pigments, v0.23.0
    
    # Dev
    No dev packages
  5. Arcanemagus commented on May 3, 2017

    @Arcanemagus

    [Enter steps to reproduce:]

    1. Open Atom in safe mode
    2. Open the About tab
    3. Right click the tab -> Split right

    Atom: 1.17.0-beta4 x64
    Electron: 1.3.15
    OS: Microsoft Windows 10 Enterprise
    Thrown From: tabs package 0.105.4

    Stack Trace

    Uncaught Error: The workspace can only contain one instance of item [object Object]

    At C:\Users\Landon Abney\AppData\Local\atom\app-1.17.0-beta4\resources\app\src\item-registry.js:11
    
    Error: The workspace can only contain one instance of item [object Object]
        at ItemRegistry.module.exports.ItemRegistry.addItem (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/item-registry.js:11:1)
        at PaneContainer.didAddPaneItem (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/pane-container.js:265:1)
        at PaneContainer.didAddPane (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/pane-container.js:238:1)
        at Pane.module.exports.Pane.setContainer (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/pane.js:149:1)
        at PaneAxis.module.exports.PaneAxis.addChild (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/pane-axis.js:154:1)
        at PaneAxis.module.exports.PaneAxis.insertChildAfter (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/pane-axis.js:225:1)
        at Pane.module.exports.Pane.split (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/pane.js:968:1)
        at Pane.module.exports.Pane.splitRight (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/pane.js:928:1)
        at TabBarView.module.exports.TabBarView.splitTab (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/node_modules/tabs/lib/tab-bar-view.js:378:1)
        at Object.TabBarView.addElementCommands.tabs:split-right (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/node_modules/tabs/lib/tab-bar-view.js:136:1)
        at HTMLUListElement.commandsWithPropagationStopped.(anonymous function) (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/node_modules/tabs/lib/tab-bar-view.js:82:1)
        at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/command-registry.js:265:1)
        at CommandRegistry.handleCommandEvent (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/command-registry.js:3:1)
        at CommandRegistry.module.exports.CommandRegistry.dispatch (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/command-registry.js:166:1)
        at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/atom-environment.js:1292:1)
        at EventEmitter.outerCallback (~/AppData/Local/atom/app-1.17.0-beta4/resources/app/src/application-delegate.js:347:1)
        at emitThree (events.js:116:13)
        at EventEmitter.emit (events.js:194:7)
    

    Commands

      2x -0:47.6.0 tabs:split-right (div.title)
    

    Non-Core Packages

    
    

    Note: Also tested with Atom v1.16.0 x64 with the same result.

  6. rsese commented on May 5, 2017

    @rsese

    I can reproduce with @Arcanemagus' steps 👍

  7. winstliu commented on May 6, 2017

    @winstliu
    Contributor

    @Arcanemagus that bug already has an issue at atom/about#30.

  8. Arcanemagus commented on May 7, 2017

    @Arcanemagus

    Reported it here since that's where Atom said it was thrown from, from the previous reports in this thread it seems like there are many different ways this can be triggered I just reported one way to reliably reproduce it 😉.

  9. alice-em commented on May 23, 2017

    @alice-em
    Error: The workspace can only contain one instance of item [object Object]
        at ItemRegistry.module.exports.ItemRegistry.addItem (/Applications/Atom.app/Contents/Resources/app/src/item-registry.js:11:1)
        at PaneContainer.didAddPaneItem (/Applications/Atom.app/Contents/Resources/app/src/pane-container.js:265:1)
        at PaneContainer.didAddPane (/Applications/Atom.app/Contents/Resources/app/src/pane-container.js:238:1)
        at Pane.module.exports.Pane.setContainer (/Applications/Atom.app/Contents/Resources/app/src/pane.js:149:1)
        at PaneAxis.module.exports.PaneAxis.addChild (/Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:154:1)
        at PaneAxis.module.exports.PaneAxis.insertChildAfter (/Applications/Atom.app/Contents/Resources/app/src/pane-axis.js:225:1)
        at Pane.module.exports.Pane.split (/Applications/Atom.app/Contents/Resources/app/src/pane.js:968:1)
        at Pane.module.exports.Pane.splitRight (/Applications/Atom.app/Contents/Resources/app/src/pane.js:928:1)
        at TabBarView.module.exports.TabBarView.splitTab (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:378:1)
        at Object.TabBarView.addElementCommands.tabs:split-right (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:136:1)
        at HTMLUListElement.commandsWithPropagationStopped.(anonymous function) (/Applications/Atom.app/Contents/Resources/app/node_modules/tabs/lib/tab-bar-view.js:82:1)
        at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:265:1)
        at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:1)
        at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:166:1)
        at AtomEnvironment.module.exports.AtomEnvironment.dispatchContextMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1292:1)
        at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:347:1)
        at emitThree (events.js:116:13)
        at EventEmitter.emit (events.js:194:7)
    

    I got this today on El Capitan OSX, by accidentally double clicking on my project's tab in the left side bar.

  10. luismqueral commented on May 26, 2017

    @luismqueral

    +1 I got this today, thanks for the succinct reproduction steps @Arcanemagus 😎

  11. tizmagik commented on May 30, 2017

    @tizmagik

    I just got this today as well. Is there a known workaround?

  12. ava-cassiopeia commented on Jun 5, 2017

    @ava-cassiopeia

    Also got this. Seems to persist between uninstalling Atom and reinstalling Atom.

  13. ava-cassiopeia commented on Jun 5, 2017

    @ava-cassiopeia

    Actually, running the following will fix the issue (but will obviously clear anything Atom was storing about your project):

    atom --clear-window-state
  14. Neonit commented on Jun 6, 2017

    @Neonit

    Actually this is very easy to reproduce. Just split the Project tab (tested with down, may work with other directions as well).

  15. albertbuchard commented on Jun 24, 2017

    @albertbuchard

    persists whatever I do: restart, reinstall, clear window state...
    mac osx sierra 10.12.5
    atom 1.18

    EDIT:
    After reinstall, I had to do three times in a row:
    atom --clear-window-state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions