benbusby / whoogle-search

A self-hosted, ad-free, privacy-respecting metasearch engine
https://pypi.org/project/whoogle-search/
MIT License
9.58k stars 946 forks source link

[BUG - Android] Firefox Custom Search Engine - Error Connecting #824

Open tootbrute opened 2 years ago

tootbrute commented 2 years ago

Describe the bug I can't get Firefox Android to add Whoogle as a custom search engine. It says "Error connecting to Whoogle..." It works happily on my desktop Fedora 36 using Brave and Firefox though.

It gives me the error: "Error connecting to "Whoogle""

I tried http, https, and just the domain name but I got the same error.

To Reproduce Steps to reproduce the behavior:

  1. Go to Settings
  2. Click on 'Search'
  3. Click on + Add search egine
  4. Type ' blah.com/search?q=%s
  5. Shows error "Error connecting to blah..."

Deployment Method

Version of Whoogle Search

Smartphone (please complete the following information):

pieslinger commented 2 years ago

Did you see #703?

benbusby commented 2 years ago

Unfortunately I'm not able to replicate this with my Android device. The only Android device I have is an old tablet though, so it's not the best for testing this kind of stuff.

I'd recommend checking your server logs when you're attempting to add the engine and see if there's some endpoint it's attempting to reach when you add it. If there's something weird in there, I can help debug further that way, otherwise it'd likely be best for someone with an Android device to try and debug this.

tootbrute commented 2 years ago

Logs from this whoogle container are pretty weird. Lots of TOR in here.

$ sudo docker ps
CONTAINER ID   IMAGE                                 COMMAND                  CREATED       STATUS                   PORTS                                                                                  NAMES
c5efb0cc6c32   benbusby/whoogle-search:latest        "/bin/sh -c 'misc/to…"   7 days ago    Up 7 minutes (healthy)   0.0.0.0:5000->5000/tcp, :::5000->5000/tcp                                              whoogle-search
$ sudo docker logs c5efb0cc6c32 --since 5m
Aug 11 08:25:06.000 [notice] New control connection opened from 127.0.0.1.
Aug 11 08:25:06.000 [notice] Heartbeat: Tor's uptime is 0:01 hours, with 1 circuits open. I've sent 318 kB and received 2.66 MB. I've received 14 connections on IPv4 and 0 on IPv6. I've made 5 connections with IPv4 and 0 with IPv6.
Aug 11 08:25:06.000 [notice] While bootstrapping, fetched this many bytes: 556367 (consensus network-status fetch); 13361 (authority cert fetch); 2031905 (microdescriptor fetch)
Aug 11 08:25:37.000 [notice] New control connection opened from 127.0.0.1.
Aug 11 08:25:37.000 [notice] Heartbeat: Tor's uptime is 0:01 hours, with 1 circuits open. I've sent 318 kB and received 2.66 MB. I've received 15 connections on IPv4 and 0 on IPv6. I've made 5 connections with IPv4 and 0 with IPv6.
Aug 11 08:25:37.000 [notice] While bootstrapping, fetched this many bytes: 556367 (consensus network-status fetch); 13361 (authority cert fetch); 2031905 (microdescriptor fetch)
Aug 11 08:25:55.000 [notice] Bootstrapped 70% (loading_descriptors): Loading relay descriptors
Aug 11 08:25:56.000 [notice] Bootstrapped 75% (enough_dirinfo): Loaded enough directory info to build circuits
Aug 11 08:25:57.000 [notice] Bootstrapped 80% (ap_conn): Connecting to a relay to build circuits
Aug 11 08:25:57.000 [notice] Bootstrapped 85% (ap_conn_done): Connected to a relay to build circuits
Aug 11 08:25:57.000 [notice] Bootstrapped 89% (ap_handshake): Finishing handshake with a relay to build circuits
Aug 11 08:25:59.000 [notice] Bootstrapped 90% (ap_handshake_done): Handshake finished with a relay to build circuits
Aug 11 08:25:59.000 [notice] Bootstrapped 95% (circuit_create): Establishing a Tor circuit
Aug 11 08:26:00.000 [notice] Bootstrapped 100% (done): Done
Aug 11 08:26:07.000 [notice] New control connection opened from 127.0.0.1.

No info about trying to add it to firefox. Tried a few times and checked these logs unless there is a better way to get logs.

About issue #703 I did check that. I don't have authentication on my whoogle. Also I just restarted all of docker before taking these logs.

benbusby commented 2 years ago

Nothing weird about that -- the Tor service is started by default in the Whoogle container, so those startup logs are to be expected.

The default server that Whoogle uses doesn't actually report info about new requests, so I think I'll have to add a way of enabling debugging within the container. I'll try to get to that soon.