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

Clink very often does not start #367

Closed
oliversen opened this issue Oct 22, 2022 · 4 comments
Closed

Clink very often does not start #367

oliversen opened this issue Oct 22, 2022 · 4 comments
Labels
external The issue is due to external causes outside of Clink

Comments

@oliversen
Copy link

oliversen commented Oct 22, 2022

Very often, during the start of the command line or after executing various commands, a message appears:

"Initializing Clink is taking a long time..."

log at this moment
2df8 inject                    570 ---- 2022/10/22 01:59:15.882 -------------------------------------------------
2df8 inject                    571 Injecting Clink...
2df8 inject_dll                269 Version: 1.3.48.4dadd8
2df8 inject_dll                270 Arch: x86
2df8 inject_dll                271 DLL: C:\Users\user3948\AppData\Local\Temp\clink\dll_cache\1.3.48.4dadd8_4c16f1b9\clink_dll_x86.dll
2df8 inject_dll                273 Parent pid: 2540
2df8 check_dll_version         168 DLL version: 00010003 00300000
2df8 inject                    654 Initializing Clink...
2df8 wait_monitor::on_waited   209 Initializing Clink is taking a long time...

Then the following message appears:

"Initializing Clink timed out. An antivirus tool may be blocking Clink.
Consider adding an exception for Clink in the antivirus tool(s) in use.

Unable to inject Clink.
See log file for details (C:\Users\user3948\AppData\Local\clink\clink.log)."

log at this moment
0e5c start_logger              160 ---- 2022/10/22 01:59:46.941 -------------------------------------------------
0e5c start_logger              166 Host process is 'cmd.exe' (pid 3676)
0e5c start_logger              170 DLL path is 'C:\Program Files\clink'
0e5c start_logger              184 Windows version 10.0.17134 (x86)
0e5c start_logger              189 Clink version 1.3.48.4dadd8 (x86)
0e5c host_cmd::validate        304 Host is not interactive; cancelling inject.

Antiviruses and any other means of protection are not installed. Only the standard Windows Defender. I start the command line using "Run (win + R) - cmd". Autorun was specified during Clink installation. All settings are standard, only Oh My Posh is installed:

load(io.popen('oh-my-posh init cmd --config "C:\\Users\\user3948\\AppData\\Local\\Programs\\oh-my-posh\\themes\\mytheme.omp.json"'):read("*a"))()

If I disable it, the problem occurs much less often, but does not disappear.

clink info
version          : 1.3.48.4dadd8
session          : 9912
binaries         : C:\Program Files\clink
state            : C:\Users\user3948\AppData\Local\clink
log              : C:\Users\user3948\AppData\Local\clink\clink.log
default settings : C:\Program Files\clink\default_settings
settings         : C:\Users\user3948\AppData\Local\clink\clink_settings
history          : C:\Users\user3948\AppData\Local\clink\clink_history
scripts          : C:\Program Files\clink ; C:\Users\user3948\AppData\Local\clink
default_inputrc  : C:\Program Files\clink\default_inputrc
inputrc          : %clink_inputrc%
                     (unset)
                 : state directory
                     C:\Users\user3948\AppData\Local\clink\.inputrc   (LOAD)
                     C:\Users\user3948\AppData\Local\clink\_inputrc
                 : %userprofile%
                     C:\Users\user3948\.inputrc
                     C:\Users\user3948\_inputrc
                 : %localappdata%
                     C:\Users\user3948\AppData\Local\.inputrc
                     C:\Users\user3948\AppData\Local\_inputrc
                 : %appdata%
                     C:\Users\user3948\AppData\Roaming\.inputrc
                     C:\Users\user3948\AppData\Roaming\_inputrc
                 : %home%
                     C:\Users\user3948\.inputrc
                     C:\Users\user3948\_inputrc
screenshots

clink_issue_screenshot

clink_issue_screenshot2

Clink v1.3.48.4dadd8
Windows 10.0.17134.1

@pukkandan
Copy link

Only the standard Windows Defender

So, add exception to defender...

#366

@chrisant996
Copy link
Owner

chrisant996 commented Oct 22, 2022

@gpm7315

Clink very often does not start

The title of this issue says Clink does not start. But the description and screen shots show that Clink starts.

Can you clarify -- are there also times where CMD is started but the Clink prompt never shows up and for example Alt-H doesn't show key bindings?

Antiviruses and any other means of protection are not installed. Only the standard Windows Defender.

Windows Defender is an antivirus tool. It monitors programs and can make decisions to interfere with programs, just like all antivirus tools do.

As @pukkandan suggested, adding an exception in Windows Defender might improve things.

Autorun was specified during Clink installation.

Try disabling autorun. It is convenient, but it also forces injecting Clink into hundreds of CMD processes that are started in the background and don't show up as windows. That can potentially lead to problems, depending on other programs (including antivirus tools) running on the computer.

screenshots

The screenshots are interesting. They show that indeed it is the background CMD processes that are running into problems.

Coincidentally, yesterday I made a change 308d053 to detect non-interactive CMD processes earlier (before the Clink DLL is remotely loaded into CMD). That change might be able to reduce or eliminate the messages that show up from the background non-interactive CMD instances.

@chrisant996 chrisant996 added the external The issue is due to external causes outside of Clink label Oct 22, 2022
@oliversen
Copy link
Author

The title of this issue says Clink does not start. But the description and screen shots show that Clink starts.

I'm sorry for the inaccuracy. Clink starts, but often with a very long delay.

Can you clarify -- are there also times where CMD is started but the Clink prompt never shows up and for example Alt-H doesn't show key bindings?

No.

Windows Defender is an antivirus tool. It monitors programs and can make decisions to interfere with programs, just like all antivirus tools do.

Yes, of course, I added Clink to the exclusions first. I also turned off all Windows protection. It did nothing.

Coincidentally, yesterday I made a change 308d053...

Upgrading to version 1.3.49.3b3066 fixed the problem completely. Thank you very much!

@chrisant996
Copy link
Owner

Windows Defender is an antivirus tool. It monitors programs and can make decisions to interfere with programs, just like all antivirus tools do.

Yes, of course, I added Clink to the exclusions first. I also turned off all Windows protection. It did nothing.

Maybe something else in the AutoRun configuration is interfering, or if it's a work machine maybe the employer has additional software installed that interferes. 🤷🏻‍♂️

Upgrading to version 1.3.49.3b3066 fixed the problem completely. Thank you very much!

That's great to hear! 😎 Thank you for confirming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external The issue is due to external causes outside of Clink
Projects
None yet
Development

No branches or pull requests

3 participants