Terminal not working on PhpStorm 2017.2.4 - terminal

I have this error when opening a terminal in PhpStorm:
Can't open local terminal
java.io.IOException: Exec_tty error:Unknown
I found simmilar problems on previous versions of PhpStorm fixed with the new release, but I can't find any info related to version 2017.2.4.
Has anyone got an idea why it is coming up with this error?

A path to the shell (File | Settings | Tools | Terminal) should be checked to make sure a system's default one is used.

Related

Problem trying to run Flutter on any IDE on macOS

I recently got the idea to try out flutter and found particularly difficult to implement it on my macOS (intel).
I have well updated my path, I could run flutter doctor nicely.
Flutter doctor -v
The problem resides in setting up the IDE, I tried both VScode and IntelliJ IDEA.
And I got the same result both time.
env: bash issue
When trying to create a project, there is no issue recognizing the path as shown on this picture
, the problem is brought up right after, when I click Create. It says that env: bash no such file or directory. What I don't understand is that I have a Zsh Shell, and I changed the setting on my IDE to use the /bin/zsh
But I still get a bash (my old SHELL) problem ?
I get the same problem on VScode.
If anyone has any help or information to provide, I would gladly accept it !
Thanks a lot.

Terminal prompt not working when opening DevContainer (OSX)

I am trying out the Remote - Containers VSCode extension. I get a docker warning and a prompt message if I want to continue but I can't type anything into the terminal. The cursor looks like it's active but nothing happens when I type.
So far I have tried:
Using iTerm.app instead of Terminal.app (in VSCode settings)
Disabled oh-my-zsh terminal plugin
Quit and start Visual Studio code
I solved this by using generating ssh key in the devcontainer and adding it to github.

Git Bash error in VS code unexpected token '&'

I'm a beginner and I'm getting a bash syntax error Unexpected token '&'
Initially, I was getting this error while using a virtual environment in python.
But today I cleaned my PC and reinstalled the window and now I can't even run normal programs.
Cause of Error -> I'm using VS Code and terminal as Git Bash.
After wasting days I got to know that this is happening because Bash and PowerShell have different syntax
and when I'm running the code the vs code is not adapting to bash's syntax (and yes it works on PowerShell).
And Default terminal is also set to Git Bash in my JSON setting file like this:
"terminal.integrated.defaultProfile.windows": "Git Bash",
I tried changing to another famous way:
"terminal.integrated.shell.windows":"path_here"
and it does not work either and says deprecated method.
How can I change the default Syntax of vs code terminal?
Do I have to reinstall the bash and change something in my options?
And I was using bash b4 as well but never faced this issue but then I recently started using virtual env
then this error occurred for the first time.
So I'm confused whether this is an in-built problem or something that I can fix?
And I found many ppl with the same type of question (which are posted recently that leads me to think it could be a fault from their side) in StackOverflow but no one was able to define it hence I'm adding this one.
Yes, i was right. The issue was in the VScode itself. Today there was an update and everything seems to be normal/working now.
But today I cleaned my pc and reinstalled the window and now i can't even run normal programs.
Make sure your %PATH% environment variable does include C:\Program Files\Git\bin\ in order to know about bash.exe
Try and launch, for testing, VSCode after setting the PATH in a CMD with:
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%GH%\mingw64\libexec\git-core;%PATH%
rem Then, in the same CMD
"%LOCALAPPDATA%\Programs\Microsoft VS Code\bin\code.cmd"

aptana 3 windows - terminal access denied

Wen I open the Antapa studio 3 terminal from specific project it notice me an error:
Permission denied to access C:\www\drupal\sites\all. Using default working
directory instead.
Also, I can get to the dir by cd C:\www\drupal\sites\all so it pretty wired..
Is somone handle with this issue, or is smone have any idea?
~ Almog Baku
I have exactly the same problem. You have described it exactly. I found no solution but here's my workaround. First, I want an EXTERNAL terminal window because the Aptana terminal window is too inconvenient for running git and rspec from the command line, so my solution always opens to the current project directory. Also note that I'm on a Mac and my solution is Mac specific.
From the Command menu, I selected Shell Script, and used the "Edit this Bundle" option. After some head scratching, I found that the bundle had been opened as a new project. Then I edited the open_directory_in_terminal.rb file to this:
require 'ruble'
command t(:open_terminal) do |cmd|
cmd.key_binding = 'M2+M4+O'
cmd.output = :output_to_console
cmd.working_directory = :current_project
cmd.invoke do |context|
`open -a Terminal.app "#{ENV['TM_PROJECT_DIRECTORY']}"`
end
end
Basically, all this does is use the Mac OS "open" command to open the Mac terminal app on the current directory. I am sure there are more elegant (and platform independent) ways to do this, but this is what I am using. Hope it gives you some ideas.
FYI, docs on editing the bundle items are here:
https://wiki.appcelerator.org/display/tis/Rubles

How to Get Xcode to Not Automatically Open Previously Opened Projects

So, I opened a xib file from an older project and it caused a crash. That's not the issue. The issue is that now when I restart Xcode, it tries to open all previously opened projects (and files) and the crash re-occurs. Where does Xcode store the list of previously open files, and how can I get it to start 'clean' without any open projects?
Update: As a note - this is the latest version of Xcode 4.2 on Lion.
Press option+Shift when clicking on the Xcode icon in the dock. Xcode then starts without opening previously used projects. This is related to version Version 4.5.2 (4G2008a) but I am almost sure that I used it in older versions as well.
I've recently had a similar problem. I tried the methods above and could launch Xcode from the command line, but as soon as I tried to open from the finder, it would try to open the "bad" document and hang.
I eventually resolved it by removing the contents of :
~/Library/Autosave Information/
~/Library/Saved Application State/com.apple.dt.Xcode.savedState
This seems to have fixed it for me.
I just spent half the day stressing over a very similar issue. I had tried updating and reinstalling Xcode - but the problem still persisted. Thankfully, a few minutes ago, I managed to solve this by doing what your question states with the help of this post.
Basically, I opened another Xcode project (it can be any file, though) from the terminal using the following command:
open -a /Applications/Xcode.app app.xcodeproj/ --args -ApplePersistenceIgnoreState YES
This successfully launched Xcode with the standard 'Welcome to Xcode' dialog box you usually get. Hope that helps!
I was able to do it with the following command line in Mavericks:
open -a /Applications/Xcode.app --args -ApplePersistenceIgnoreState YES
Not specific to Xcode:
Please make sure Close windows when quitting an application checkbox is checked under System Preferences > General.
You can stop Xcode from opening the last project by running the following command:
defaults write com.apple.dt.Xcode ApplePersistenceIgnoreState -bool YES
This and other useful commands are here.
Instead of looking for the file that contains Xcode's settings, take a look at the settings themselves using the defaults command:
% defaults read com.apple.xcode | more
I notice two keys that might be relevant: NSRecentXCFileDocuments and NSRecentXCProjectDocuments. Both appear to be arrays, so you could reset one like this:
% defaults write com.apple.xcode NSRecentXCFileDocuments -array ""
Alternately, you could use the defaults read command to dump the settings into a text file, edit that, and then use defaults write to update the settings:
% defaults read com.apple.xcode > xcsettings.plist
// edit xcsettins.plist with your favorite editor
% defaults write com.apple.xcode < xcsettings.plist
Given the project name "MyProject" in directory ~/Documents/Projects/MyProject do the following:
cd ~/Documents/Projects
mv MyProject MyProject.x
open -a Xcode
close MyProject (Option+Command+W)
mv MyProject.x MyProject
open -a Xcode
The this solved the crash for me... however my Storboard was corrupt. Fortunately the Time Machine backup of the folder was intact, I just restored it.
For me it wasn't a project that was causing the crash on startup, it was a particular file (an sks to be exact), so Kay's answer didn't work. When I went to open my particular project, it would still crash.
I simply temporarily deleted the file. Then I opened the project, cleaned, and re-added the file, and all was well.
I think Xcode may update its cache when you quit. It solved my issue to:
close projects
quit Xcode
reopen Xcode.

Resources