platformio / platformio-atom-ide-terminal

A terminal package for Atom, complete with themes, API and more for PlatformIO IDE
https://atom.io/packages/platformio-ide-terminal
MIT License
613 stars 162 forks source link

Blinking cursor/no output: Terminal is not responding #668

Closed 12xman closed 3 years ago

12xman commented 5 years ago

image

image

Steps to reproduce

  1. Open up atom ide and click on file -> settings
  2. Click on "install", search and install "platformio-atom-ide-terminal"
  3. Click on the added "+" icon on the bottom left corner of the ui, and observe.

Expected behavior: Expecting it display the cmd/powershell console window content, with the current directory as default.

Actual behavior: Only displays a console cursor, with nothing else.

Reproduces how often: Always

Versions

> atom --version

image

> apm --version

image

OS name and version: Windows 10

Platformio-ide-terminal version: image

Additional Information

the-j0k3r commented 5 years ago

Thank you for opening this report.

These types issues cant be duplicated, Ive tried over and over and cannot, it works flawlessly here, its quite difficult to find out whats the cause is with reports such as yours, never mind fix it. From some experience the culprit usually is something in the Install is conflicting with Atom/Platformio terminal. What though is again a fishing expedition.

The easiest way to have it fixed, is to have a virgin OS install, where Atom has never been installed before, and no other software actually exists and install Atom + platformio terminal. Thats is safest bet to get it to work because Atom may leave folders behind even after uninstall in various paths..

I would recommend 64-bit Windows 10 pro 1803 and nothing else but Atom + platformio-ide-terminal.

That said, since platformio-atom-ide-terminal 2.9.0 f64888d is using node-pty-prebuilt instead of the unmaintained and outdated pty.js. This is good news for stability and compatibility and fixed many many issues.

If you cant get it to work, your best bet is to switch to vscode, or help implement #426

the-j0k3r commented 5 years ago

Merging duplicate issue #669 opened by @qeithva below is issue details transplanted.


clean atom install + platformio-ide-terminal press + sign to open terminal terminal never comes back to prompt but remains blinking cmd and powershell are working normally on its own

Steps to reproduce

  1. install AtomSetup-x64.exe
  2. install plaformio-ide-terminal 3.press + sign

Expected behavior: prompt should occur either powershell or cmd

Actual behavior: prompt never comes only blinking cursor

Reproduces how often:

10X 100% each time not working

Versions

C:\Users\Owner>apm --version apm 2.1.3 npm 6.2.0 node 8.9.3 x64 atom 1.34.0 python 3.5.2 git 2.16.2.windows.1 visual studio

C:\Users\Owner>atom --version

Atom : 1.34.0 Electron: 2.0.16 Chrome : 61.0.3163.100 Node : 8.9.3

apm --version

OS name and version:

windows 10 home (1803)

Platformio-ide-terminal version: 2.9.1

Additional Information

tried to delete .atom many times no luck

the-j0k3r commented 5 years ago

Merging duplicate issue #669 opened by @ayushgupta321 below is issue details transplanted.


Steps to reproduce

  1. Install platform-atom-ide-terminal
  2. Click on + icon at the bottom

Expected behavior: I expected the Windows PowerShell to open. I even changed the override to cmd.exe(with the correct path) ,yet nothing seems to change

Actual behavior: Blinking Cursor appears ,cannot type anything.

Reproduces how often: 100%

Versions

> atom --version
Atom    : 1.34.0
Electron: 2.0.16
Chrome  : 61.0.3163.100
Node    : 8.9.3
> apm --version
apm  2.1.3
npm  6.2.0
node 8.9.3 x64
atom 1.34.0
python 3.6.6
git
visual studio

OS name and version: Platformio-ide-terminal version: 2.9.1

Additional Information

ss

PrathyushTuraga commented 5 years ago

Right click on console window -> clear close and re-open terminal session. It works.

the-j0k3r commented 5 years ago

Merging duplicate issue #671 opened by @vishaldeep24 below is issue details transplanted.


Steps to reproduce

  1. open Atom
  2. Install platformio-ide-terminal package
  3. Try opening the terminal

Expected behavior: Powershell terminal should start.

Actual behavior: Nothing happens but a white cursor keeps blinking.

Reproduces how often: Everytime same thing happens.

Versions

> atom --version
atom 1.34.0 x64
> apm --version
apm 2.1.3

OS name and version: Windows 10 Home 64-bits Platformio-ide-terminal version: 2.9.1

Additional Information

Screenshot of issue attached capture



Merging duplicate issue #669 opened by @ManuelZ below is issue details transplanted.


When I open a terminal I get no terminal, nor errors, just a "loading" terminal.

Steps to reproduce

  1. Open Atom
  2. Click in the bottom left "+" terminal button

Expected behavior:

Actual behavior: No terminal appears: image

Reproduces how often:

Versions

> atom --version

Atom    : 1.34.0
Electron: 2.0.16
Chrome  : 61.0.3163.100
Node    : 8.9.3

> apm --version

apm  2.1.3
npm  6.2.0
node 8.9.3 x64
atom 1.34.0
python 3.6.6
git 2.15.1.windows.2
visual studio 2015

OS name and version: Windows 10 Home 1809 Platformio-ide-terminal version: 2.9.0

Additional Information


Me too reports

Anyone else facing this exact issue and posting "me too" reports here, please copy and paste this into the reply field and provide the requested information.

Thank you.

the-j0k3r commented 5 years ago

@16273849 @PrathyushTuraga @vishaldeep24 @ayushgupta321 @qeithva @12xman please test the following.

PrathyushTuraga commented a day ago

Right click on console window -> press clear -> close and re-open terminal session. It works.

qeithva commented 5 years ago

This does not help.

vishaldeep24 commented 5 years ago

No it didn't work

the-j0k3r commented 5 years ago

A few things I suggest trying.

Disable GPU rendering in Atom.

1) see https://flight-manual.atom.io/hacking-atom/sections/debugging/#check-if-your-gpu-is-causing-the-problem

2) Try with python 2.7 instead of 3.6.6? (node-pty-prebuilt install scripts doesnt suport python 3.x.x

3) Also if you have a virtual machine to test with Windows 10 pro (just a trial install of the OS will do for testing purposes.)

On another note, the most failures are coming from reports of WIndows 10 home, please test as above with windows 10 pro 64-bit.

Please report back with full results.

L1Q commented 5 years ago

When I open electron (chromium) dev tools (Ctrl+Shift+I) and go to console I was able to see errors related to platformio-atom-ide-terminal. I made the dev tools pop out in a separate window, selected console tab and pressed the "New terminal" button in atom. This immediately produced the following view. "Cannot find module", deprecation warning, and missing handler error I am on linux, Atom v1.34.0

the-j0k3r commented 5 years ago

@L1Q Thank you for reaching out with this report.

If you read the top errors, they are for pty.js which platformio-ide-terminal >2.9.0 no longer uses, so Im unsure what exactly you are reporting but its unrelated to current platformio-ide-terminal 2.9.1.

Platformio-ide-terminal now uses node-pty-prebuilt, so I think you need to investigate your side whats going on. Then please follow https://flight-manual.atom.io/hacking-atom/sections/debugging/#reset-to-factory-defaults

Then reinstall platformio-ide-terminal 2.9.1 via apm in a terminal.

L1Q commented 5 years ago

Thank you! Updating to 2.9.1 fixed it for me.

the-j0k3r commented 5 years ago

Glad to ear it.

AdamZHANG123 commented 5 years ago

Same problem here. Updated/Reinstall doesn't help.

I'm using atom 1.35.1, and terminal 2.9.1 on Windows 10 Education version, x64. Here are the screenshots: image image image

I also tried L1Q's develop mode, no errors found, just this: image Not sure if this helps.

I also tried reset atom to factory defaults as well, no luck.

the-j0k3r commented 5 years ago

@AdamZHANG123 see https://github.com/platformio/platformio-atom-ide-terminal/issues/668#issuecomment-470893810

L1Q issue was unrelated to this anyway.

ychuckt8 commented 5 years ago

me too

the-j0k3r commented 5 years ago

@ychuckt8 me too reports must also fill in the issue template

Copy and paste the template located at https://raw.githubusercontent.com/platformio/platformio-atom-ide-terminal/master/.github/ISSUE_TEMPLATE.md and fill in all fields. Logs / Errors / other information should be added at the bottom in the Notes portion of the issue template.

Thank you for understanding.

the-j0k3r commented 5 years ago

Just in case someone missed it, heres a list of things to try.

https://github.com/platformio/platformio-atom-ide-terminal/issues/668#issuecomment-470893810

Ive installed Atom + this package in 5 different OS's including macOS, Windows 10 pro, Ubuntu, Fedora, Arch Linux they all work fine, no errors and no failures to start.

xavalex commented 5 years ago

I have exactly the same, in Windows 10 64 bits. I am trying to do a clean uninstall, deleting the users/xxx/.atom folders as well. It's still happening. Interestingly, previously I got C++ errors when launchign the terminal. Now it just stalls.

I am getting tired and am likely to set up a whole new ATOM environment on Linux.

the-j0k3r commented 5 years ago

I forced upgraded an old VM of Windows pro 1803 to 1809 and which had Atom 1.28 + platformio-ide-terminal 2.8.3 everything was working fine with that Atom 1.28.

Upon upgrading atom to 1.36 andplatformio-ide-terminal to 2.9.1 I am now getting nothing on terminal (not even cursor) until I actually press enter. SO if you get this press enter... SO it seem after loading the lot chokes until some key is pressed.

I am using https://atom.io/packages/block-cursor so Ill try removing that and seeing though Im happy to press a key to get terminal unstuck.

Another issue that will get solved by implementing #426

My other VM with Atom 1.36 and Platformio-ide-terminal 2.9.1 and Windows 1803 is still working flawlessly though and Im in no rush to upgrade it, despite loving the new all dark look of Windows 1809.

Edit: Yes Ive done https://github.com/platformio/platformio-atom-ide-terminal/issues/668#issuecomment-470893810

palnatimahesh commented 5 years ago

1.open cmd 2.apm uninstall platformio-ide-terminal 3.apm install platformio-ide-terminal 4.open atom everything should work fine.. Cheers!

the-j0k3r commented 5 years ago

Platformio-ide-terminal will not work properly in Windows 10 1809 (pro/enterprise), You need to press enter to get a prompt as it fails to properly FULLY load. Fully reinstalled Windows from default.

So @palnatimahesh that basic troubleshooting step wont work either nor will anything else in https://github.com/platformio/platformio-atom-ide-terminal/issues/668#issuecomment-470893810

the-j0k3r commented 5 years ago

I found out that enabling a shell override incompatible shell will duplicate this bug report.

Can everyone with the blinking cursor paste their config.cson platformio-ide-terminal portion only? And their actual VERSION for the OS. just Windows 10 is not enough.

Broken AKA. Blinking cursor

"platformio-ide-terminal":
    core:
      shell: "C:\\Program Files\\Git\\git-bash.exe"

or

      shell: "C :\\WINDOWS\\system32\\cmd.exe"

Needs pressing Enter to show prompt. (you can press any key though its not as clean)

"platformio-ide-terminal":
    core:
      shell: "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe"

or

      shell: "C:\\Program Files\\Git\\git-cmd.exe"

Workaround for pressing enter (Windows Powershell only)

Create a Powershell profile with contents

Clear-Host

Place that at very top of the profile before any other lines if you already have a profile.

Mine is for current user and current host only i.e. C:\Users\<username>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

Hopefully if everyone replies with this information we can get somewhere for a workaround.

NOTE: Also In Windows 10 1809 Even Visual Studio Code built in terminal is equally broken and requires pressing enter when using powershell to actually show any prompt.

the-j0k3r commented 5 years ago

OK some more information and tips

The best working shell so far to use in Windows 10 - 1809 with platformio-ide-terminal is BAsh, which is shipped with Git located in C:\Program Files\Git\bin\bash.exe.

You wont experience the blinking cursor issue or the powershell loading hungup described in post above.

To Setup do the following:

1) Edit your Atom .config.cson 2) Find the line shell: "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe" Or whatever you have set it to prefix an # in front of it (commenting it out. 3) Create a new shell line below as shell: "C:\\Program Files\\Git\\bin\\bash.exe" (ensure it looks like screenshot) Capture 4) Save the config.cson and reopen any terminal with platformio-ide-terminal.

Now rejoice.

generic

Its still not perfect it will error out when running apm -v but its better than totally broken.

That Prompt is a modified version of the C:\Program Files\Git\etc\profile.d\git-prompt.sh Code located at https://gist.github.com/the-j0k3r/e1b9a250e26f3bc206e42111e571a8ae

Just make a backup of original by renaming it and copy that over as the original file or whatevr method youre more comfortable with.

ychuckt8 commented 5 years ago

changed to use "C:\Program Files\Git\bin\bash.exe" and it works now. Thanks.

the-j0k3r commented 5 years ago

To correct errors, paths when using git-bash or bash see https://github.com/atom/apm/issues/725#issuecomment-482937789

Everton747 commented 5 years ago

I have this problem. However, I realized that what causes it is my anti-virus (Mcafee). I deactivated the scan in real time, and it worked. Even, it's annoying, because every time I start the atom, I need to disable the anti-virus.

the-j0k3r commented 5 years ago

have this problem. However, I realized that what causes it is my anti-virus (Mcafee)

YMMV, You have what Windows version? 1809?

qeithva commented 5 years ago

@the-j0k3r

My compliments. This is the first time I see a relevant remark related to this problem. Yes it seems related to McAfee in my case. I disabled all and restarted atom and now the terminal shows up. However not aways consistent but for sure McAfee is blocking something in Atom in my case.

I have Windows Home 10 1803

the-j0k3r commented 5 years ago

My compliments. This is the first time I see a relevant remark related to this problem.

Experience has taught me many software's interfere where they shouldn't causing issues. This is why Ive also made the comment several times that many issues (like this issue) are likely linked to 3rd party software, Ive even asked people to test a virgin OS install. that means vanilla not loaded with mcafee or other things,

Yet, only now you seem to find this relevant. Interesting.

Everton747 commented 5 years ago

have this problem. However, I realized that what causes it is my anti-virus (Mcafee)

YMMV, You have what Windows version? 1809?

No, 1803. Windows 10 Education

N1ghtJs commented 5 years ago

I have this problem. However, I realized that what causes it is my anti-virus (Mcafee). I deactivated the scan in real time, and it worked. Even, it's annoying, because every time I start the atom, I need to disable the anti-virus.

it works for me !!! thanks !! i tried many methods and i never thought it would be mcafee...

by the way, my windows version is 1809 @the-j0k3r

ManuelZ commented 5 years ago

I can confirm that I can also use Bash after turning my McAfee's Real-Time scanning off (and after setting Bash as the desired shell). To keep it on, gotta whitelist the protected file, that would be:

C:\Users\.atom\packages\platformio-ide-terminal\node_modules\node-pty-prebuilt\build\Release\winpty-agent.exe

the-j0k3r commented 5 years ago

This is all I have to say about mcaffee https://www.ghacks.net/2019/04/19/add-mcafee-products-to-the-list-of-security-products-that-dont-play-well-with-latest-windows-patches/

My two cents, uninstall it. Windows has a pretty robust antivirus solution, no need for a second solution. Though in WIndows 1809, Not having any 3rd party except atom and this project still results in issues already documented above.

If you choose to keep it, please consider making some better bug reports with Mcafee or Microsoft...

I have now marked this as external, meaning all indicates this issue is caused by 3rd party software like Mcaffee or Windows 1809, we cant fix either, only find ways around them.

Thank you to those who confirmed the issues.

Edit:

To keep it on, gotta whitelist the protected file, that would be:

C:\Users.atom\packages\platformio-ide-terminal\node_modules\node-pty-prebuilt\build\Release\winpty-agent.exe

I would exclude C:\Users<YOUR_USER_NAME>.atom\packages\ or the actual complete Atom directory, other packages may have similar dependencies depending on what user has installed not to speak of Atom and its dependencies, anyone thats looked into them knows what web of confusion they are.

the-j0k3r commented 5 years ago

Another Windows 10 1809 workaround for Powershell no cursor or cursor blinking.

Add -Nologo to platformio-ide-terminal Shell Arguments field.

Capture generic

For good measure also added a folder exclusion to Microsoft Windows Defender. Capture

And a fully responsive and working terminal within Atom via platformio-ide-terminal

Everton747 commented 5 years ago

I can confirm that I can also use Bash after turning my McAfee's Real-Time scanning off (and after setting Bash as the desired shell). To keep it on, gotta whitelist the protected file, that would be:

C:\Users.atom\packages\platformio-ide-terminal\node_modules\node-pty-prebuilt\build\Release\winpty-agent.exe

Works for me!! Thanks!

parthparashar commented 5 years ago

I have this problem. However, I realized that what causes it is my anti-virus (Mcafee). I deactivated the scan in real time, and it worked. Even, it's annoying, because every time I start the atom, I need to disable the anti-virus.

thank u.

xavalex commented 5 years ago

This is all I have to say about mcaffee https://www.ghacks.net/2019/04/19/add-mcafee-products-to-the-list-of-security-products-that-dont-play-well-with-latest-windows-patches/

My two cents, uninstall it. Windows has a pretty robust antivirus solution, no need for a second solution. Though in WIndows 1809, Not having any 3rd party except atom and this project still results in issues already documented above.

If you choose to keep it, please consider making some better bug reports with Mcafee or Microsoft...

I have now marked this as external, meaning all indicates this issue is caused by 3rd party software like Mcaffee or Windows 1809, we cant fix either, only find ways around them.

Thank you to those who confirmed the issues.

Edit:

To keep it on, gotta whitelist the protected file, that would be: C:\Users.atom\packages\platformio-ide-terminal\node_modules\node-pty-prebuilt\build\Release\winpty-agent.exe

I would exclude C:\Users<YOUR_USER_NAME>.atom\packages\ or the actual complete Atom directory, other packages may have similar dependencies depending on what user has installed not to speak of Atom and its dependencies, anyone thats looked into them knows what web of confusion they are.

This worked just fine. Thanks!

mslinn commented 5 years ago

I got the spinner but no WSL bash prompt. I do not use McAfee, there is no reason to use it. My system has the very latest Windows 10 updates & upgrades.

I tried adding an exclusion for C:\Users<YOUR_USER_NAME>.atom to Windows Security / Virus & threat protection / Virus & threat protection settings / Manage settings / Exclusions / Add or Remove exclusions / Add an exclusion.

I tried setting the path to:

This path worked: C:\\Windows\\system32\\bash.exe

I then removed the virus scanning exclusion and discovered it did not make a difference. I don't want a malicious Atom plugin destroying my system.

the-j0k3r commented 5 years ago

@mslinn Thank you for reaching out to us on this issue.

I tried adding an exclusion for C:\Users.atom to Windows Security / Virus & threat protection / Virus & threat protection settings / Manage settings / Exclusions / Add or Remove exclusions / Add an exclusion.

I tried setting the path to:

C:\Windows\sysnative\bash.exe C:\Windows\system32\bash.exe C:\Windows\sysnative\wsl.exe C:\Windows\system32\wsl.exe

This path worked: C:\Windows\system32\bash.exe

Good to hear this. =)

I don't want a malicious Atom plugin destroying my system.

Certainly not,, no one would want that. MacAfee is clearly being too aggressive, nothing this project can do about it, in any case the reports are here. However whoever owns MacAfee and experiences such issues like this, should report it to them, its up to them and or you to fix the issue best you can and workarounds are documented with thanks to feedback like yours.

If you're unsure if any plugin/software Atom related its opensource everything related is, you can audit the its source code and know what you run in your system. And you are free to implement any security precautions you see fit, its your system. =)

Also and unrelated to above this project is based on term.js which is unmaintained for 4 years for this project to fully support WSL we would need to use xterm.js see #426 so any issue here can only be solved by that implementation.

Thanks for your feedback, others if they use bash on Windows can read your findings.

PS

Speaking of security is WSL actually that secure?, re: Bashware. I certainly dont run it not for that reason though, virtualization is still my goto solution and will be for the foreseeable future and regards bash on Windows Im happy with the packaged with Git, WSL fills no gap here, =)

mslinn commented 5 years ago

@the-j0k3r Works fine with WSL, no issues, unsure why you say otherwise. You can learn more about WSL, which is a major effort for Microsoft, here: https://docs.microsoft.com/en-us/windows/wsl/faq

the-j0k3r commented 5 years ago

@mslinn see https://github.com/platformio/platformio-atom-ide-terminal/issues/435, if you have other reports that contradict that, please post your findings in detail in that ticket.

I dont need WSL, Im aware what it is ;), thanks anyway for posting links to its docs.

NormanEdance commented 5 years ago

Same problem. McAfee here

the-j0k3r commented 5 years ago

@NormanEdance there are documented solutions above, feel free to review them and implement which one works.

xavalex commented 5 years ago

Thanks This is sorted out by making McAfee not look at Platformio.

On Fri, Jul 5, 2019 at 8:08 AM the-j0k3r notifications@github.com wrote:

@NormanEdance https://github.com/NormanEdance there are documented solutions above, feel free to review them and implement which one works.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/platformio/platformio-atom-ide-terminal/issues/668?email_source=notifications&email_token=AD2C3ZGIVMFF22NWWKOA5IDP53XM5A5CNFSM4G3O4JY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZIXLSA#issuecomment-508655048, or mute the thread https://github.com/notifications/unsubscribe-auth/AD2C3ZEMB46OIPYYQEIXSZTP53XM5ANCNFSM4G3O4JYQ .

-- Xavier Alexandre

YuseongJay commented 5 years ago

I tried to using git bash, but it didn't work well.

After install npm, it works fine! And at each step when I follow above them, I restart my pc, every time

my windows is 10 edu, 1903

richardMeggyes commented 5 years ago

Hi! Same problem here with a fresh install of Arch linux. Just installed atom and platformio-ide-terminal and a cursor is just blinking. Same thing is happening with all of the terminal plugins. Is there a linux terminal that is required by this plugin?

the-j0k3r commented 5 years ago

@richardMeggyes You will need to provide more information, fill in the issue template [](and) post it in a reply on this issue.

Same thing is happening with all of the terminal plugins. Is there a linux terminal that is required by this plugin?

The information requested will help in ascertain the answer. But in short NO,

Thanks

FoxtrotFaux commented 5 years ago

Had the same problem on Manjaro 18.0.4 with Atom 1.38.2 and package version 2.9.1. The package is said to be incompatible due to being built with node 46 against the client's node 69.

image

Upon rebuilding the package and reloading Atom, the problem persists. A look at dev tools tells the same story.

image

Nuking the .atom and .config/Atom folders does not solve the issue.

the-j0k3r commented 5 years ago

@FoxtrotFaux yes, node-pty-prebuit 0.7.6 max node ABI is 57 which should be good against Atoms 1.38.2 node version, however node-pty-prebuit 0.7.6 has to have prebuilt modules for your OS, It maybe missing.

Looking at https://github.com/daviwil/node-pty-prebuilt/releases/tag/v0.7.6 the assets say Linux should be having prebuilt binaries there, so some conflict or something else?

If the workaround posted further up on this thread dont work for you, Im not sure what to recommend, since Arch based tends to be bleeding edge, so it could be a case of conflicts with system libs, no way for me to know until Im able to duplicate that.

Also if youre using anything like flatpak to Install Atom, I suggest you look at a direct installation instead.