t4rra / CCStopper

[Archived] Stops Adobe's pesky background apps and more 😉
GNU General Public License v3.0
1.06k stars 65 forks source link

[Issue]: "Cannot connect to GitHub #82

Closed Neonlinx closed 1 year ago

Neonlinx commented 1 year ago

What happened?

Installed via PowerShell, ran with "unrestricted", with administrator privilege and with antivirus turned off. This is the result:

CCStopper-Error.jpg

Expected Result?

As I had old entries in hosts file, I expected ccstopper to delete the old entries and insert the new/updated ones.

Version?

1.2.3 pre2

Windows Version?

Windows 10 Pro 22H2

t4rra commented 1 year ago

Are you able to go to this page: https://raw.githubusercontent.com/eaaasun/CCStopper/data/devHosts.txt That's what the module tries to access when getting the list of URLs to block.

Neonlinx commented 1 year ago

Yes

t4rra commented 1 year ago

Could you enter this into powershell and see if it errors?

(Invoke-WebRequest "https://raw.githubusercontent.com/eaaasun/CCStopper/data/devHosts.txt" -TimeoutSec 5 -Headers @{"Cache-Control" = "no-cache" }).Content.Split("`n", [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { $_ -ne '' } | ForEach-Object { $_.Trim() }

It's a slightly modified version of the command the module uses to get (and check) the list of URLs to block.

Poloin34 commented 1 year ago

I have this issue too, ran the command and got this ouptput:

PS C:\Windows\system32> (Invoke-WebRequest "https://raw.githubusercontent.com/eaaasun/CCStopper/data/devHosts.txt" -TimeoutSec 5 -Headers @{"Cache-Control" = "no-cache" }).Content.Split("`n", [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { $_ -ne '' } | ForEach-Object { $_.Trim() }

Invoke-WebRequest : Le contenu de la rĂ©ponse ne peut pas ĂȘtre analysĂ©, car le moteur d’Internet Explorer n’est pas
disponible ou la configuration du premier lancement d’Internet Explorer n’est pas complĂšte. SpĂ©cifiez le paramĂštre
UseBasicParsing et réessayez.
Au caractĂšre Ligne:1 : 2
+ (Invoke-WebRequest "https://raw.githubusercontent.com/eaaasun/CCStopp ...
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                                                     
    + CategoryInfo          : NotImplemented: (:) [Invoke-WebRequest], NotSupportedException
    + FullyQualifiedErrorId : WebCmdletIEDomNotSupportedException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand                                                        

Translating too

The content of the response cannot be parsed because the Internet Explorer engine is not
available or Internet Explorer first launch configuration is not complete. Specify the parameter
UseBasicParsing and try again.

Thanks to this thread, https://stackoverflow.com/questions/38005341/the-response-content-cannot-be-parsed-because-the-internet-explorer-engine-is-no, we can edit the command to

 (Invoke-WebRequest "https://raw.githubusercontent.com/eaaasun/CCStopper/data/devHosts.txt" -TimeoutSec 5 -UseBasicParsing -Headers @{"Cache-Control" = "no-cache" }).Content.Split("`n", [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { $_ -ne '' } | ForEach-Object { $_.Trim() }    
Poloin34 commented 1 year ago

Not wanting to update/wait for fix?

Edit file \CCStopper\scripts\HostBlock.ps1, and edit the command line 26, to add -UseBasicParsing on column 66

t4rra commented 1 year ago

Updated the files/release, thanks for the tip!

maryamgolii commented 6 months ago

Are you able to go to this page: https://raw.githubusercontent.com/eaaasun/CCStopper/data/devHosts.txt That's what the module tries to access when getting the list of URLs to block.

i have the same problem and i cant go to that link .error 404 haapen