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

Failed to activate the tokamak package #68

Open
ciclonite opened this issue Mar 8, 2017 · 14 comments
Open

Failed to activate the tokamak package #68

ciclonite opened this issue Mar 8, 2017 · 14 comments

Comments

@ciclonite
Copy link

I have a problem with tokamak
[Enter steps to reproduce:]

Atom: 1.14.1 x64
Electron: 1.3.13
OS: Ubuntu 16.04.1
Thrown From: tokamak package 0.3.2

Stack Trace

Failed to activate the tokamak package

At Cannot read property 'path' of undefined

TypeError: Cannot read property 'path' of undefined
    at Function.module.exports.Utils.parseTokamakConfig (/packages/tokamak/lib/utils.coffee:125:62)
    at Object.tokamakProjectConfigLaunch (/packages/tokamak/lib/tokamak.coffee:112:28)
    at Object.activate (/packages/tokamak/lib/tokamak.coffee:96:10)
    at Package.module.exports.Package.activateNow (/app.asar/src/package.js:218:19)
    at /app.asar/src/package.js:190:32
    at Package.module.exports.Package.measure (/app.asar/src/package.js:96:15)
    at /app.asar/src/package.js:183:26
    at Package.module.exports.Package.activate (/app.asar/src/package.js:180:34)
    at PackageManager.module.exports.PackageManager.activatePackage (/app.asar/src/package-manager.js:550:34)
    at /app.asar/src/package-manager.js:352:19
    at /app.asar/src/config.js:635:20
    at Function.module.exports.Emitter.simpleDispatch (/app.asar/node_modules/event-kit/lib/emitter.js:25:14)
    at Emitter.module.exports.Emitter.emit (/app.asar/node_modules/event-kit/lib/emitter.js:129:28)
    at Config.module.exports.Config.emitChangeEvent (/app.asar/src/config.js:826:29)
    at Config.module.exports.Config.setRawValue (/app.asar/src/config.js:612:19)
    at Config.module.exports.Config.set (/app.asar/src/config.js:227:14)
    at Config.module.exports.Config.removeAtKeyPath (/app.asar/src/config.js:377:12)
    at Package.module.exports.Package.enable (/app.asar/src/package.js:81:26)
    at PackageManager.module.exports.PackageManager.enablePackage (/app.asar/src/package-manager.js:173:14)
    at /app.asar/node_modules/settings-view/lib/package-card.js:348:27)
    at HTMLButtonElement.dispatch (/app.asar/node_modules/jquery/dist/jquery.js:4435:9)
    at HTMLButtonElement.elemData.handle (/app.asar/node_modules/jquery/dist/jquery.js:4121:28)

Commands

     -8:59.9.0 core:paste (input.hidden-input)
 20x -8:54.1.0 core:backspace (input.hidden-input)
     -8:52.8.0 core:confirm (input.hidden-input)
     -8:44.3.0 core:backspace (input.hidden-input)
     -8:43.2.0 core:confirm (input.hidden-input)

Non-Core Packages

atom-beautify 0.29.17 
build 0.67.0 
build-cargo 2.0.0 
busy 0.7.0 
language-rust 0.4.9 
linter 1.11.23 
linter-rust 0.7.2 
racer 0.20.0 
rustfmt 0.1.3 
tokamak 0.3.2 
tokamak-terminal 10.0.1 
@Mnenmenth
Copy link

Same here. Has happened to me on both Linux Mint and Windows 10

[Enter steps to reproduce:]

  1. Install tokamak
  2. Run atom

Atom: 1.15.0 ia32
Electron: 1.3.13
OS: Microsoft Windows 10 Home
Thrown From: tokamak package 0.3.2

Stack Trace

Failed to activate the tokamak package

At Cannot read property 'path' of undefined

TypeError: Cannot read property 'path' of undefined
    at Function.module.exports.Utils.parseTokamakConfig (/packages/tokamak/lib/utils.coffee:125:62)
    at Object.tokamakProjectConfigLaunch (/packages/tokamak/lib/tokamak.coffee:112:28)
    at Object.activate (/packages/tokamak/lib/tokamak.coffee:96:10)
    at Package.module.exports.Package.activateNow (/app.asar/src/package.js:218:19)
    at /app.asar/src/package.js:190:32
    at Package.module.exports.Package.measure (/app.asar/src/package.js:96:15)
    at /app.asar/src/package.js:183:26
    at Package.module.exports.Package.activate (/app.asar/src/package.js:180:34)
    at PackageManager.module.exports.PackageManager.activatePackage (/app.asar/src/package-manager.js:550:34)
    at /app.asar/src/package-manager.js:531:29
    at Config.module.exports.Config.transactAsync (/app.asar/src/config.js:337:18)
    at PackageManager.module.exports.PackageManager.activatePackages (/app.asar/src/package-manager.js:526:19)
    at PackageManager.module.exports.PackageManager.activate (/app.asar/src/package-manager.js:508:46)
    at /app.asar/src/atom-environment.js:812:28

Commands

Non-Core Packages

tokamak 0.3.2 

@deimo
Copy link

deimo commented Apr 1, 2017

when I open the new folder that happened the same as @ciclonite

@ciclonite
Copy link
Author

Any News?
The problem appear also on Windows 10 pro. All path was setup correctly.

@Mnenmenth
Copy link

From what I can gather it seems that at line 125 in utils.coffee, it is trying to load a 'tokamak.toml' file that does not exist.

@ciclonite
Copy link
Author

ciclonite commented Apr 7, 2017

Thanks for reply, i've tried to hardcode the path of tokamak.toml config_file = "c:\\utenti\\xxxx\\tokamak.toml"
Now tokamak start successfully, but whe i try to compile or run something the command it's not valid because, tokamak call run before cargo.exe
Instead : cargo.exe run
tokamak call : run cargo.exe!

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. Tutti i diritti sono riservati.

PS C:\Users\ciclonite\Documents\Projects\exPipo> run
C:\Users\ciclonite.cargo\bin\cargo.exe
run : Termine 'run' non riconosciuto come nome di cmdlet, funzione, programma eseguibile o file script. >Controllare l'ortografia del nome o verificare che il percorso sia incluso e corretto, quindi riprovare.
In riga:1 car:2

@RobGThai
Copy link

RobGThai commented Apr 7, 2017

Reporting from OSX here as well.

@Mnenmenth
Copy link

@ciclonite So I figured out what appears to be the problem. I'm not sure what's causing the run cargo error you just reported, but tokamak seems to throw the "undefined path" error if you don't have an active project folder open. If you do File->Add Project Folder in atom, then restart atom, tokamak loads and runs completely fine as far as I can tell. So that means the undefined path problem has something to do with not finding a current rust project open in atom. Let me know if you don't understand and I'll try to explain a bit clearer

@ciclonite
Copy link
Author

@Mnenmenth Thanks a lot, problem no. 1 solved.
But, take a look here : Cargo Run problem

@Mnenmenth
Copy link

@ciclonite That's a very strange problem you have there. So from what I saw in the video, tokamak always add the extra newline after the paths on startup, and once you remove them it runs fine, right? Just try something for me. Uninstall tokamak, delete tokamak.toml from your home directory, and reinstall tokamak. When you were changing cargo_file to a hard coded directory maybe you added a newline somewhere it shouldn't be, which might be the cause of the issue.

@ciclonite
Copy link
Author

Ok, finally i've found the solution to this problem. I've tried to disinstall tokamak, delete tokamak.toml and reinstall it without success.
On the tokamak setting there is a flag called "Detect binaries on startup", i've removed it and deleted the space after the paths.
Now all work perfectly.
May be a problem with the function that detect binaries?
Thanks a lot!

@vertexclique
Copy link
Owner

I am open to any PR that adds apm tests and also bugfixes. I don't have that much time most of the times to fix all those guys.

@vertexclique
Copy link
Owner

Guys, can you please upgrade to 0.4.0 ?

@OvermindDL1
Copy link

Installing 0.4.0 gives this in a popup:

Uncaught Error: Failed to spawn command `$HOME/.cargo/bin/rustup`. Make sure `$HOME/.cargo/bin/rustup` is installed and on your PATH

And yet if I do:

╰─➤  $HOME/.cargo/bin/rustup 
rustup 1.6.0 (a11c01e8c 2017-08-30)
The Rust toolchain installer

USAGE:
    rustup [FLAGS] <SUBCOMMAND>
...

That works. I'm guessing that $HOME is not being expanded automatically. Might need to grab it from the environment instead as auto-expansion does not work in most javascript shell calls.

@OvermindDL1
Copy link

Further testing shows the error is fixed if I fill in the option "Cargo home directory (optional)" directly.

Also, stopping and restarting the plugin duplicates the toolbar, it does not seem to clean up after itself very well?

image

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

6 participants