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

[BUG]: Bing (search engine) is broken #329

Closed
MohamedMehrath opened this issue Mar 9, 2024 · 8 comments
Closed

[BUG]: Bing (search engine) is broken #329

MohamedMehrath opened this issue Mar 9, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@MohamedMehrath
Copy link

Description

I used privacy.sexy (amazing tool btw) and bing isn't working well, When I click on Copilot, nothing happens. Bottom righthand side of screen shows javascript:void(0) also Bing isn't showing pictures.

OS

Windows 10 Pro

Screenshots

image
image

@MohamedMehrath MohamedMehrath added the bug Something isn't working label Mar 9, 2024
@undergroundwires
Copy link
Owner

This is most likely related to a host entry under Block tracking hosts category. Try to revert those and please share if you figure out which host exactly is blocking copilot as side-effect so we can document/discourage or remove that host.

@MohamedMehrath
Copy link
Author

MohamedMehrath commented Mar 10, 2024

I reverted all Block tracking hosts and re-enabled each one, and I ended up enabling all of them again, fixing the problem.
Edit: Afrer restarting my pc the bug came back.
Edit 2: After taking a look at the scripts of Block tracking hosts, I used Ctrl + F searching for bing, I found 10 results in Block Cortana and Live Tiles hosts.
I reverted Block Cortana and Live Tiles hosts script and now it's working fine.

@undergroundwires
Copy link
Owner

Thank you for the insights.

I cannot reproduce this. But it would be appreciated if you could test which host is causing this exactly (which bing host), so we can exclude it from privacy.sexy or document the behavior.

I cannot test this because for me, Copilot on Edge through Bing works when all hosts including "Block Cortana and Live Tiles hosts" are blocked:

image

@undergroundwires undergroundwires added the blocked/need-repro Needs a test case to reproduce the bug label Mar 13, 2024
@maxysoft
Copy link

There is r.bing.com that needs to be removed from hosts to make copilot works

undergroundwires added a commit that referenced this issue May 2, 2024
This commit modifies the blocking behavior of `r.bing.com` due to its
extensive use across multiple Windows features, including Copilot and
Maps. Previously, included in the 'Cortana and Live Tiles' block list,
this host was causing issues for Copilot functionalites, as noted in
issue #329. By excluding `r.bing.com` from block list, this update aims
to prevent unintended disruptions without compromising the privacy gains
of other scripts.

Changes include:

- Exclude `r.bing.com` from the "Cortana and Live Tiles" block list.
- Improve documentation to clarify the role and exclusions.
- Improve documentation with consistent header for blocked hosts.
@undergroundwires
Copy link
Owner

Thank you for figuring this out and reporting back @maxysoft.

r.bing.com is now excluded with the added documentation (see at the end):

image

It will be released in next patch.

@joethesaint
Copy link

Now that it has been excluded, how then can we that are facing the issue fix it?

@undergroundwires undergroundwires removed the blocked/need-repro Needs a test case to reproduce the bug label May 11, 2024
@undergroundwires
Copy link
Owner

The fix is released since 0.13.3 🎉.

Here's the revert code for r.bing.com for those who wants to allow r.bing.com back (@joethesaint):

PowerShell -ExecutionPolicy Unrestricted -Command "$domain ='r.bing.com'; $hostsFilePath = "^""$env:WINDIR\System32\drivers\etc\hosts"^""; $comment = "^""managed by privacy.sexy"^""; $hostsFileEncoding = [System.Text.Encoding]::UTF8; $blockingHostsEntries = @(; @{ AddressType = "^""IPv4"^"";  IPAddress = '0.0.0.0'; }; @{ AddressType = "^""IPv6"^"";  IPAddress = '::1'; }; ); try {; $isHostsFilePresent = Test-Path -Path $hostsFilePath -PathType Leaf -ErrorAction Stop; } catch {; Write-Error "^""Failed to check hosts file existence. Error: $_"^""; exit 1; }; if (-Not $isHostsFilePresent) {; Write-Output 'Skipping, the hosts file does not exist.'; exit 0; }; foreach ($blockingEntry in $blockingHostsEntries) {; Write-Output "^""Processing removal for $($blockingEntry.AddressType) entry."^""; try {; $hostsFileContents = [System.IO.File]::ReadAllText($hostsFilePath, $hostsFileEncoding); } catch {; Write-Error "^""Failed to read the hosts file for removal. Error: $_"^""; continue; }; $hostsEntryLine = "^""$($blockingEntry.IPAddress)`t$domain $([char]35) $comment"^""; if ([String]::IsNullOrWhiteSpace($hostsFileContents) -Or (-Not $hostsFileContents.Contains($hostsEntryLine))) {; Write-Output 'Skipping, entry not found.'; continue; }; $hostsEntryRemovalPattern = [regex]::Escape($hostsEntryLine) + "^""(\r?\n)?"^""; $hostsFileContentAfterRemoval = $hostsFileContents -Replace $hostsEntryRemovalPattern, "^"""^""; try {; [System.IO.File]::WriteAllText($hostsFilePath, $hostsFileContentAfterRemoval, $hostsFileEncoding); Write-Output 'Successfully removed the entry.'; } catch {; Write-Error "^""Failed to remove the entry. Error: $_"^""; continue; }; }"

@joethesaint
Copy link

joethesaint commented May 11, 2024 via email

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

No branches or pull requests

4 participants