t4rra/CCStopper

[Issue]: "Cannot connect to GitHub

Neonlinx opened this issue · 7 comments

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

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.

Yes

t4rra commented

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.

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() }    

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

Updated the files/release, thanks for the tip!

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