Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught TypeError: item.save is not a function #33

Closed
mhintz opened this issue Apr 17, 2016 · 7 comments
Closed

Uncaught TypeError: item.save is not a function #33

mhintz opened this issue Apr 17, 2016 · 7 comments

Comments

@mhintz
Copy link

mhintz commented Apr 17, 2016

I'm gettin an undefined is not a function error all of a sudden

  1. Opened Atom after switching multirust to use the beta (instead of nightly) by default
  2. Attempted a cargo build using the Tokamak button
  3. The error shows up

Atom Version: 1.7.1
System: Mac OS X 10.10.5
Thrown From: tokamak package, v0.2.7

Stack Trace

Uncaught TypeError: item.save is not a function

At ~/.atom/packages/tokamak/lib/utils.coffee:96

TypeError: item.save is not a function
    at ~/.atom/packages/tokamak/lib/utils.coffee:96:68
    at Array.map (native)
    at Function.module.exports.Utils.savePaneItems (~/.atom/packages/tokamak/lib/utils.coffee:96:35)
    at atom-workspace.commandSubscription.atom.commands.add.tokamak:build (~/.atom/packages/tokamak/lib/cargo-view.coffee:29:15)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/src/command-registry.js:160:19)
    at module.exports._executeCallback (~/.atom/packages/tool-bar/lib/tool-bar-button-view.coffee:71:23)
    at space-pen-button.<anonymous> (~/.atom/packages/tool-bar/lib/tool-bar-button-view.coffee:30:7)
    at space-pen-button.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at space-pen-button.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

  2x -0:45 tokamak:multirust-select-toolchain (atom-text-editor.editor)
     -0:40.1.0 tokamak:build (atom-text-editor.editor)
     -0:32.4.0 pane:show-item-1 (atom-text-editor.editor.is-focused)
     -0:31.5.0 core:save (atom-text-editor.editor.is-focused)
     -0:31.1.0 pane:show-item-2 (atom-text-editor.editor.is-focused)
     -0:30.7.0 core:save (atom-text-editor.editor.is-focused)
     -0:29.7.0 find-and-replace:show (atom-text-editor.editor.is-focused)
     -0:29 editor:consolidate-selections (atom-text-editor.editor.mini.is-focused)
     -0:29 core:cancel (atom-text-editor.editor.mini.is-focused)
     -0:26.4.0 tokamak:build (atom-text-editor.editor)
     -0:14.8.0 tokamak:clean (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack)
     -0:12.9.0 tokamak:build (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack)
     -0:10 tokamak:run (atom-notification.fatal.icon.icon-bug.native-key-bindings.has-detail.has-close.has-stack)
     -0:00.7.0 tokamak:build (atom-text-editor.editor)
@Antiarchitect
Copy link

Antiarchitect commented Apr 20, 2016

Have the same issue with Atom 1.6.2, Tokamak 0.2.7 on Fedora 23 x64 Linux.

@hosyfy94
Copy link

same issue with atom 1.7.2, tokamak 0.2.7 on fedora 23 x64 and kde 5.5.
here following I attach you my log:
[Enter steps to reproduce below:]

  1. ...
  2. ...

Atom Version: 1.7.2
System: "Fedora release
Thrown From: tokamak package, v0.2.7

Stack Trace

Uncaught TypeError: item.save is not a function

At /home/marco/.atom/packages/tokamak/lib/utils.coffee:96

TypeError: item.save is not a function
    at /home/marco/.atom/packages/tokamak/lib/utils.coffee:96:68
    at Array.map (native)
    at Function.module.exports.Utils.savePaneItems (/home/marco/.atom/packages/tokamak/lib/utils.coffee:96:35)
    at atom-workspace.commandSubscription.atom.commands.add.tokamak:rebuild (/home/marco/.atom/packages/tokamak/lib/cargo-view.coffee:33:15)
    at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:260:29)
    at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:3:61)
    at CommandRegistry.module.exports.CommandRegistry.dispatch (/usr/share/atom/resources/app.asar/src/command-registry.js:160:19)
    at module.exports._executeCallback (/home/marco/.atom/packages/tool-bar/lib/tool-bar-button-view.coffee:71:23)
    at space-pen-button.<anonymous> (/home/marco/.atom/packages/tool-bar/lib/tool-bar-button-view.coffee:30:7)
    at space-pen-button.jQuery.event.dispatch (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at space-pen-button.elemData.handle (/usr/share/atom/resources/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -0:00.6.0 tokamak:rebuild (button.btn.btn-default.icon.icon-link)

Config

{
  "core": {
    "themes": [
      "atom-light-ui",
      "one-dark-syntax"
    ]
  },
  "tokamak": {
    "racerBinPath": "/home/marco/.cargo/bin/racer"
  }
}

Installed Packages

# User
language-rust, v0.4.6
linter, v1.11.4
linter-rust, v0.4.5
racer, v0.20.0
tokamak, v0.2.7
tokamak-terminal, v0.1.1
tool-bar, v0.4.0

# Dev
No dev packages

@K-Finlay
Copy link

It only seems to occur when the rust source code directory is not set correctly.
Once it is set, the error disappears and everything functions as normal... At least it did for me.

@jared-mackey
Copy link

I am unable to start a new project because of this error. How do I get around it? How do I fix my projects?

@vertexclique
Copy link
Owner

vertexclique commented May 2, 2016

About the rust source code updating probably #19 will overcome it. (@kevinpoitra can speak about that probably)
In any case I will pass a fix on that in next release.

@nshtg
Copy link

nshtg commented Jun 17, 2016

What fixed it for me was disabling the auto detection of the binaries on startup. After setting the correct paths manually and restarting atom everything started working again.

@vertexclique
Copy link
Owner

Fixed in 0.2.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants