[Enter steps to reproduce below:]
Atom Version: 1.7.0
System: Microsoft Windows 10 Home Insider Preview
Thrown From: platformio-ide package, v1.1.1
Failed to activate the platformio-ide package
At Cannot read property 'indexOf' of undefined
TypeError: Cannot read property 'indexOf' of undefined
at Object.updateOSEnviron (C:/Users/micae/.atom/packages/platformio-ide/lib/maintenance.js:31:25)
at Object.activate (C:/Users/micae/.atom/packages/platformio-ide/lib/main.js:52:17)
at Package.module.exports.Package.activateNow (C:\Users\micae\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:183:20)
at C:\Users\micae\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:156:32
at Package.module.exports.Package.measure (C:\Users\micae\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:92:15)
at C:\Users\micae\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:149:26
at Package.module.exports.Package.activate (C:\Users\micae\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:146:34)
at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\micae\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:538:21)
at C:\Users\micae\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:519:29
at Config.module.exports.Config.transactAsync (C:\Users\micae\AppData\Local\atom\app-1.7.0\resources\app.asar\src\config.js:337:18)
at PackageManager.module.exports.PackageManager.activatePackages (C:\Users\micae\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:514:19)
at PackageManager.module.exports.PackageManager.activate (C:\Users\micae\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:497:46)
at C:\Users\micae\AppData\Local\atom\app-1.7.0\resources\app.asar\src\atom-environment.js:754:28
{}
# User
autocomplete-clang, v0.8.9
build, v0.59.0
language-ini, v1.16.0
linter, v1.11.4
linter-gcc, v0.6.9
platformio-ide, v1.1.1
tool-bar, v0.4.0
# Dev
No dev packages
I'm also having this issue. Pretty much the same circumstances. Windows 10 Home. Atom 1.7.0. Stack looks to be about the same.
TypeError: Cannot read property 'indexOf' of undefined
at Object.updateOSEnviron (C:/Users/n6nq/.atom/packages/platformio-ide/lib/maintenance.js:31:25)
at Object.activate (C:/Users/n6nq/.atom/packages/platformio-ide/lib/main.js:52:17)
at Package.module.exports.Package.activateNow (C:Usersn6nqAppDataLocalatomapp-1.7.0resourcesapp.asarsrcpackage.js:183:20)
at C:Usersn6nqAppDataLocalatomapp-1.7.0resourcesapp.asarsrcpackage.js:156:32
at Package.module.exports.Package.measure (C:Usersn6nqAppDataLocalatomapp-1.7.0resourcesapp.asarsrcpackage.js:92:15)
at C:Usersn6nqAppDataLocalatomapp-1.7.0resourcesapp.asarsrcpackage.js:149:26
at Package.module.exports.Package.activate (C:Usersn6nqAppDataLocalatomapp-1.7.0resourcesapp.asarsrcpackage.js:146:34)
at PackageManager.module.exports.PackageManager.activatePackage (C:Usersn6nqAppDataLocalatomapp-1.7.0resourcesapp.asarsrcpackage-manager.js:538:21)
at C:Usersn6nqAppDataLocalatomapp-1.7.0resourcesapp.asarsrcpackage-manager.js:519:29
at Config.module.exports.Config.transactAsync (C:Usersn6nqAppDataLocalatomapp-1.7.0resourcesapp.asarsrcconfig.js:337:18)
at PackageManager.module.exports.PackageManager.activatePackages (C:Usersn6nqAppDataLocalatomapp-1.7.0resourcesapp.asarsrcpackage-manager.js:514:19)
at PackageManager.module.exports.PackageManager.activate (C:Usersn6nqAppDataLocalatomapp-1.7.0resourcesapp.asarsrcpackage-manager.js:497:46)
at C:Usersn6nqAppDataLocalatomapp-1.7.0resourcesapp.asarsrcatom-environment.js:754:28
Same issue here. I have been using it for over a week with no problem. Even, this morning it started just fine. I had to restart the machine, and ever since I can't get it to work :(
[Enter steps to reproduce below:]
Atom Version: 1.7.0
System: Microsoft Windows 10 Pro
Thrown From: platformio-ide package, v1.1.1
Failed to activate the platformio-ide package
At Cannot read property 'indexOf' of undefined
TypeError: Cannot read property 'indexOf' of undefined
at Object.updateOSEnviron (C:/Users/Viktor.eromu/.atom/packages/platformio-ide/lib/maintenance.js:31:25)
at Object.activate (C:/Users/Viktor.eromu/.atom/packages/platformio-ide/lib/main.js:52:17)
at Package.module.exports.Package.activateNow (C:\Users\Viktor.eromu\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:183:20)
at C:\Users\Viktor.eromu\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:156:32
at Package.module.exports.Package.measure (C:\Users\Viktor.eromu\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:92:15)
at C:\Users\Viktor.eromu\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:149:26
at Package.module.exports.Package.activate (C:\Users\Viktor.eromu\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:146:34)
at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\Viktor.eromu\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:538:21)
at C:\Users\Viktor.eromu\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:519:29
at Config.module.exports.Config.transactAsync (C:\Users\Viktor.eromu\AppData\Local\atom\app-1.7.0\resources\app.asar\src\config.js:337:18)
at PackageManager.module.exports.PackageManager.activatePackages (C:\Users\Viktor.eromu\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:514:19)
at PackageManager.module.exports.PackageManager.activate (C:\Users\Viktor.eromu\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:497:46)
at C:\Users\Viktor.eromu\AppData\Local\atom\app-1.7.0\resources\app.asar\src\atom-environment.js:754:28
{
"core": {},
"platformio-ide": {}
}
# User
autocomplete-clang, v0.8.9
build, v0.59.0
language-ini, v1.16.0
linter, v1.11.4
linter-gcc, v0.6.9
platformio-ide, v1.1.1
platformio-ide-terminal, v2.0.3
tool-bar, v0.4.0
# Dev
No dev packages
The problem is caused by new Atom 1.7.0 under Windows. Please use previous stable version 1.6.2 till we will fix issue.
How does this explain why it has been working fine until now? Was there a "silent" update that I was not aware of?
Also, when do you expect to have a fix fro this?
Thanks!
@viktak related issue https://github.com/atom/atom/issues/11302
Thanks Ivan, I'll keep an eye on the development.
@viktak Atom updates in the background using a library called Squirrel.
Simple workaround for me was to edit my environment variables and change the case of my "Path" variable to "PATH" - restart to ensure the env got cleaned and Atom 1.7.0 is working with PlatformIO. My guess is that this is primarily affecting Win10 users because the default casing of the PATH var has changed to Path in this version.
Likely commit atom/atom@8c53e25f802f7e5e6311a61087f78bbf4e246b20 was also required for this behavior to start manifesting.
@ayan4m1
My guess is that this is primarily affecting Win10 users because the default casing of the PATH var has changed to Path in this version
I have this problem under Windows 7 in VM. I'm working on the fix.
Likely commit atom/atom@8c53e25 was also required for this behavior to start manifesting.
I've just made hotfix to avoid this Atom's issue. However, we have problems with our PlatformIO Terminal too.
Heh, just noticed the terminal thing, was hoping it was just me... appreciate the quick response in any event. I can help with test/repro if you need it.
@ayan4m1 thanks! Could you test this patch https://github.com/platformio/platformio-atom-ide/commit/2ef99acd3d5711d84ffac761747556bf4d357731 ?
P.S: I'm working on the idea how to fix Terminal. It's a more complicated problem...
reverting back to 1.6.2 fixed it.
close atom. download and install old installer from (setup.exe)
https://github.com/atom/atom/releases/tag/v1.6.2
You should be up and running again. Did not have to uninstall 1.7.
Yes, I can confirm 1.6.2 works fine. I uninstalled 1.7 first, though, just in case....
@viktak, @zoulzubazz, @ayan4m1, @n6nq, @micaelc
Please re-test the patch described in https://github.com/platformio/platformio-atom-ide-terminal/issues/12#issuecomment-209907331
@ivankravets Changed my PATH back to Path, rebooted, ran Atom 1.7.0 in dev mode for this package - checked out the develop branch which contains the referenced commit and platformio initializes successfully.
@ayan4m1 Great! But how about terminal? Does it work? Do you have installed Visual Studio in a system?
Heh, just about to be work time where I am :) I have VS2015 with a working C++ toolchain but I won't have time to test for a few hours.
@ayan4m1 thanks! :+1: Let's wait for @viktak, @zoulzubazz, @n6nq, @micaelc
It should work without VS Studio and C++ toolchain too.
Hello, i wasn't sure if i was suppose to comment on the patch thread or not so ill just put this here... I replaced my lib/main.js with the one linked(https://raw.githubusercontent.com/platformio/platformio-atom-ide/develop/lib/main.js) and get the same "Failed to activate..." error with a different stack trace. I do not have Visual Studio installed.
Atom Version: 1.7.0
System: Microsoft Windows 10 Pro
Thrown From: platformio-ide package, v1.1.1
Failed to activate the platformio-ide package
At Unexpected token import
SyntaxError: Unexpected token import
at Module._compile (C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\native-compile-cache.js:77:42)
at Object.defineProperty.value [as .js] (C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\compile-cache.js:208:21)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\native-compile-cache.js:50:27)
at Package.module.exports.Package.requireMainModule (C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:715:27)
at Package.module.exports.Package.activateNow (C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:173:16)
at C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:156:32
at Package.module.exports.Package.measure (C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:92:15)
at C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:149:26
at Package.module.exports.Package.activate (C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package.js:146:34)
at PackageManager.module.exports.PackageManager.activatePackage (C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:538:21)
at C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:519:29
at Config.module.exports.Config.transactAsync (C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\config.js:337:18)
at PackageManager.module.exports.PackageManager.activatePackages (C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:514:19)
at PackageManager.module.exports.PackageManager.activate (C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\package-manager.js:497:46)
at C:\Users\*userName*\AppData\Local\atom\app-1.7.0\resources\app.asar\src\atom-environment.js:754:28
{
"core": {}
}
# User
autocomplete-clang, v0.8.9
build, v0.59.0
language-ini, v1.16.0
linter, v1.11.4
linter-gcc, v0.6.9
platformio-ide, v1.1.1
platformio-ide-terminal, v2.0.3
tool-bar, v0.4.0
# Dev
No dev packages
@webguy16
At Unexpected token import
Looks like you have broken file. Please update lib/main.js and check that you have copied all content.
Well don't i feel smart... I just right clicked and 'saved as' and replaced the file this time rather than 'select all - copy- select all - paste' and it looks to be working fine. Sorry bout that.
I'm afraid, this fix only allows PlatformIO to start without an error, but the terminal and anything that uses the terminal freezes. I tried terminal, serial port monitor, list serial ports and they all freeze.
Friends, we are working on it... The problem is not linked only with https://github.com/atom/atom/issues/11302
They also updated node.js that broke Pty.JS.
I can't imagine who allowed in Atom's maintainer group to release 1.7.0 with these issues.
I have gotten the terminal working again in a dev environment. If you apm rebuild with the msbuild toolchain, you can get pty.js working again. More info when I have time to write it up.
@ayan4m1 Could you share with us ~/.atom/packages/platformio-ide-terminal/node_modules/pty.js/build/Release/pty.node file? Please zip it.
pty.zip
Enjoy :)
Enjoy :)
It works for my Win7 in VM. Thanks.
Can you tell me how to test it? I looked up my ~/.atom/packages/platformio-ide-terminal/node_modules/pty.js/build/Release folder, and it's empty.
In the process of trying to find out more about this issue, I removed Atom from my PC, including the .atom directory. Then I went ahead and installed the Atom 1.6.2 and PlatformIO from scratch. Once all was finished I tried to launch a terminal (or anything else that uses the terminal window) and I get the following error message:
As you can see on the screenshot, the package is clearly installed.
Anybody has an idea what might be wrong? Since this morning things have been going from bad to worse...
@ivankravets I think this is because you are preparing the new version, 2.0.4.
I've just released PlatformIO Terminal 2.0.5 - please re-test it. If it works, I'll release IDE. Thanks.
Downloading now, keep fingers crossed...
@viktak looks like it also doesn't work.
I've tried a lot of solutions today and can't find single which will work on both Atoms: 1.6 & 1.7.
@ivankravets I'm afraid still the same issue. Tried it on Atom 1.7:
@ivankravets Just tried it also in Atom 1.6.2, same problem
@viktak do you see "red" :bug: in the status bar? Bottom.
@ivankravets Yes, now that you say it :)
This is what I can see in the details:
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
[email protected] β %1 is not a valid Win32 application.
\\?\C:\Users\Viktor.eromu\.atom\packages\platformio-ide-terminal\node_modules\pty.js\bin\win32\ia32.node
Rebuilt it, and now I am back to the stage whene the terminal pane freezes on launch :(
Yessssss! I've just won it! I forked https://github.com/platformio/pty.js and forced it to work for Atom 1.6/1.7.
Pelase re-test the latest PlatformIO IDE Terminal 2.0.9
@ivankravets Yessssss! you made it! I managed to get it to work with Atom 1.7 and terminal 2.0.9. I now how to go to bed, but tomorrow I'll double check it on my main machine too.
Well done and thanks for all your efforts, Ivan! If there is anything I can help you with (mainly testing), give me a shout!
@ivankravets ok, I can now confirm: 2.0.9 works with 1.7, but only if the patched lib/main.js is used.
Now, it's really time to sleep...
@viktak thanks for the testing. PlatformIO IDE 1.1.2 has not been released yet. I'm working on it.
If there is anything I can help you with (mainly testing), give me a shout!
Please give us a star :star2:
Thanks in advance!
Thanks so much for your fast actionΒ on this issue.
As a gray beard programmer,Β it's always impressive to see dedication and enthusiasm.
As a newbie to PlatformIO,Β it is heartening and encouraging your kick butt.
Thanks again,
Jon
N6NQ
On Thu, Apr 14, 2016 at 12:11 PM -0700, "Ivan Kravets" [email protected] wrote:
Yessssss! I've just won it! I forked https://github.com/platformio/pty.js and forced it to work for Atom 1.6/1.7.
Pelase re-test the latest PlatformIO IDE Terminal 2.0.8
β
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
@n6nq Thanks a lot for the warm words!
/all, I close this issue. PlatformIO IDE 1.1.2 is released.
If you have any problems please open new issue.
Please give us a star :star2:
Done and done.
I just upgraded both ide and terminal to the latest versions and all went smoothly.
Life is good again! :)
same here !!! sun is shining again !!!
I have raised this issue again at #493 because I'm having it. This comment is to link the issues.
Most helpful comment
@n6nq Thanks a lot for the warm words!
/all, I close this issue. PlatformIO IDE 1.1.2 is released.
If you have any problems please open new issue.