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

PyCharm's terminal issues after update to 1.0.56 #1083

Open
3 tasks done
Ronserruya opened this issue Mar 10, 2022 · 7 comments
Open
3 tasks done

PyCharm's terminal issues after update to 1.0.56 #1083

Ronserruya opened this issue Mar 10, 2022 · 7 comments
Labels
codebase:shell-integrations Shell integrations type:bug Something isn't working

Comments

@Ronserruya
Copy link

Ronserruya commented Mar 10, 2022

Sanity checks

  • I have searched github.com/withfig/fig/issues and there are no duplicates of my issue
  • I have run fig doctor in the affected terminal session
  • I have typed 'git ' and included a screenshot of the Debugger (click the Fig icon in the macOS menu bar)

Issue Details

Description:

After the latest update, the Pycharm terminal seems to have a broken behavior

  1. It seems like it doesn't fully source my .bash_profile, after the terminal starts my PS1 prompt is the default, and none of my aliases are defined
  2. Closing the terminal prompts a confirmation window, warning that there is still a process running in that terminal
  3. Before the update, opening the terminal already opened it with my python virtualenv activated, now it doesn't

I noticed this issue #49 and run the commands from this comment #49 (comment), which made fig work in my terminal but didn't fix any of the previous issues

Might this can help you figure it out:

  • Commenting only the final line in .bash_profile fixed issue 1 only if I manually run source ~/.bash_profile
  • Commenting only the first line fixes all 3 issues, but fig doesn't work in that case
fig_issue.mov

If anyone else has this issue, I use this workaround for now:
In pycharm's setting make the terminal start with a env variable "BASH_FROM_PYCHARM=true"
then change the lines in .bash_profile to

if [ -z $BASH_FROM_PYCHARM ]; then
  export PATH="${PATH}:${HOME}/.local/bin";
  eval "$(fig init bash pre)";
fi;

Environment

Diagnositc from iTERM2:

ron@bash:~$ fig diagnostic
# Fig Diagnostics
## Fig details:
  - Fig version: Version 1.0.56 (B401) [ABC]
  - Bundle path: /Applications/Fig.app
  - Autocomplete: true
  - Settings.json: true
  - Accessibility: true
  - Number of specs: 0
  - Symlinked dotfiles: false
  - Only insert on tab: false
  - Keybindings path:
  - Installation Script: true
  - PseudoTerminal Path: <generated dynamically>
  - SecureKeyboardInput: false
  - SecureKeyboardProcess: <none>
## Hardware Info:
  - Model Name: MacBook Pro
  - Model Identifier: MacBookPro15,1
  - Chip:
  - Cores: 6
  - Memory: 16 GB
## OS Info:
  - macOS 10.15.7 (19H2)
## Environment:
  - User Shell: /usr/local/bin/bash
  - Current Directory: /Users/ron
  - CLI Installed: true
  - Executable Location: /usr/local/bin/fig
  - Current Window ID: 108902/% (com.googlecode.iterm2)
  - Active Process: bash (59485) - /dev/ttys004
  - Installed via Brew: true
  - Environment Variables:
    - FIG_INTEGRATION_VERSION=8
    - TERM_SESSION_ID=w0t1p0:9A3E5749-379D-413C-8582-3AB976439962
    - FIG_TERM=1
    - FIG_TERM_VERSION=4.2.0
    - TERM=xterm-256color
    - PATH=/Users/ron/.sdkman/candidates/java/current/bin:/usr/local/opt/gnu-tar/libexec/gnubin:/usr/local/opt/grep/libexec/gnubin:/Users/ron/.nvm/versions/node/v12.13.1/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Users/ron/.local/bin:/Users/ron/.fig/bin:/Users/ron/.local/bin:/Users/ron/Library/Python/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.8/bin
    - FIG_CHECKED_PROMPTS=1
## Integrations:
  - SSH: false
  - TMUX: false
  - iTerm: installed!
  - Hyper: application is not present.
  - Visual Studio Code: application is not present.
  - Docker: true

Diagnostic from the broken pycharm terminal:

bash-5.0$ fig diagnostic
# Fig Diagnostics
## Fig details:
  - Fig version: Version 1.0.56 (B401) [ABC]
  - Bundle path: /Applications/Fig.app
  - Autocomplete: true
  - Settings.json: true
  - Accessibility: true
  - Number of specs: 0
  - Symlinked dotfiles: false
  - Only insert on tab: false
  - Keybindings path: 
  - Installation Script: true
  - PseudoTerminal Path: <generated dynamically>
  - SecureKeyboardInput: false
  - SecureKeyboardProcess: <none>
## Hardware Info:
  - Model Name: MacBook Pro
  - Model Identifier: MacBookPro15,1
  - Chip: 
  - Cores: 6
  - Memory: 16 GB
## OS Info:
  - macOS 10.15.7 (19H2)
## Environment:
  - User Shell: /usr/local/bin/bash
  - Current Directory: /Users/ron/Desktop/Projects/contact_enricher
  - CLI Installed: true
  - Executable Location: /usr/local/bin/fig
  - Current Window ID: 108627/% (com.jetbrains.pycharm)
  - Active Process: bash (61082) - /dev/ttys005
  - Installed via Brew: true
  - Environment Variables:
    - FIG_INTEGRATION_VERSION=8
    - TERM_SESSION_ID=5ae8ebf9-dbe6-4390-a1f7-82a721c078eb
    - FIG_TERM=1
    - FIG_TERM_VERSION=4.2.0
    - TERM=xterm-256color
    - PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Users/ron/.local/bin:/Users/ron/.fig/bin:/Users/ron/.local/bin
    - FIG_CHECKED_PROMPTS=1
## Integrations:
  - SSH: false
  - TMUX: false
  - iTerm: installed!
  - Hyper: application is not present.
  - Visual Studio Code: application is not present.
  - Docker: true


<img width="362" alt="Screen Shot 2022-03-10 at 14 35 48" src="https://user-images.githubusercontent.com/21235163/157669688-d612a9fa-d297-4d14-baf8-aadae5f9c828.png">
@thmsrmbld
Copy link

Can also confirm that I can reproduce this too, in basically the exact same conditions.

@mschrage mschrage added type:bug Something isn't working codebase:shell-integrations Shell integrations and removed NEED_TO_LABEL labels Mar 26, 2022
@mschrage
Copy link
Member

I'm investigating this now! @thmsrmbld @Ronserruya

Can you confirm that this only happens in bash?

@Ronserruya
Copy link
Author

Thanks @mschrage
I tried switching to zsh,
with zsh looks like issue 1 is fixed, it does run the full .zshrc file and all my aliases/env vars are defined
However 2 and 3 are still unfixed, that being said I never used zsh in pycharm before so I can't say if that's a bugged behavior or normal

Weird thing is that even if I comment out the fig lines in .zshrc this behavior continues to happen, and fig continues to work in the terminal

@2minchul
Copy link

2minchul commented Jun 3, 2023

Is there any news?
It still needs to be fixed.

@JFox
Copy link

JFox commented Jun 5, 2023

I can confirm that with zsh it happens today exactly as @Ronserruya described and it is a bug from fig that was not happening before

@VikalpRusia
Copy link

Any updates?

@VikalpRusia
Copy link

@mschrage , @thmsrmbld , @Ronserruya any updates here.
It has no updates since a V long time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codebase:shell-integrations Shell integrations type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants