Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Can't add custom search engine "https://searx.be/?q=%s" on Android #11332

Closed
Rochey opened this issue Jun 8, 2020 · 16 comments
Closed

Can't add custom search engine "https://searx.be/?q=%s" on Android #11332

Rochey opened this issue Jun 8, 2020 · 16 comments
Labels
🐞 bug Crashes, Something isn't working, .. Feature:SearchProvider

Comments

@Rochey
Copy link

Rochey commented Jun 8, 2020

When i try to add a searx search engine and put the search string "https://searx.be/?q=%s", it says "Error connecting to searx".
I've also tried "https://searx.ninja/?q=%s".

I've tried on both Firefox Preview and Firefox Beta (installed just now) and both show the same error message.
I'm using a Oneplus 7T pro, Android 10.

The custom search engines work on the desktop version of Firefox.

┆Issue is synchronized with this Jira Task

@Rochey Rochey changed the title Can't add custom search engine "https://searx.be/search?q=%s" on Android Can't add custom search engine "https://searx.be/?q=%s" on Android Jun 8, 2020
@github-actions github-actions bot added the needs:triage Issue needs triage label Jun 8, 2020
@kglazko kglazko added Feature:SearchProvider 🐞 bug Crashes, Something isn't working, .. and removed needs:triage Issue needs triage labels Jun 8, 2020
@Dunexus
Copy link

Dunexus commented Jun 8, 2020

Probably the same as #9831

@kbrosnan
Copy link
Contributor

Don't believe this is a duplicate of #9831. That is requesting direct substitution which the regex does not allow.

Might be related to or dupe of #10605 .

@ghost
Copy link

ghost commented Jul 20, 2020

Any progress towards fixing it?

@unixfox
Copy link

unixfox commented Jul 25, 2020

This issue occurs due to a program that filter clients that doesn't send specific headers when doing an HTTP request, this program is used in order to combat against bots that harm the searx search engine. The program is called filtron.

When adding https://searx.be as a search engine, fenix sends a request in order to test if the search engine works. The issue is that it doesn't include deflate in the Accept-Encoding header, it doesn't send the Accept=text/html header and thus gets blocked by filtron.

Here are the headers sent by fenix when adding the website as a search engine:

User-Agent: MozacFetch/50.0.20200712190143
Accept: */*
Accept-Language: */*
Accept-Encoding: gzip
Connection: keep-alive

And here are the headers from a normal request in fenix when browsing the specific page that fenix use when adding the search engine:

User-Agent: Mozilla/5.0 (Android 9; Mobile; rv:80.0) Gecko/80.0 Firefox/80.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: en-US
Accept-Encoding: gzip, deflate
Connection: keep-alive
Upgrade-Insecure-Requests: 1
DNT: 1

As you can see the missing headers that I talked earlier are present and the request succeed.

On other instances from the Searx project which aren't behind filtron, adding the instance as a new search engine works. An example is https://searx.xyz.

This issue can be safely closed because I opened an issue here in order to fix the issue on Searx instances that are behind filtron but if the fenix developers would like to change the behavior when adding a search engine so that it mimics a real request that are done in a normal browsing session then this issue can be kept open.

@unixfox
Copy link

unixfox commented Jul 27, 2020

@Rochey the issue can be closed, it has been fixed in searx/searx-docker#49.
You can test by adding https://searx.be as search engine and it will work.

@Rochey
Copy link
Author

Rochey commented Jul 31, 2020

@unixfox - I've just tested this again and added searx.be in Firefox beta. I can confirm that it now works as espected - woohoo!
Thanks for all the help sorting it out.
I'm happy for this issue to be closed.

@Rochey Rochey closed this as completed Jul 31, 2020
@data-sync-user data-sync-user changed the title Can't add custom search engine "https://searx.be/?q=%s" on Android FNX3-14562 ⁃ Can't add custom search engine "https://searx.be/?q=%s" on Android Aug 10, 2020
@data-sync-user data-sync-user changed the title FNX3-14562 ⁃ Can't add custom search engine "https://searx.be/?q=%s" on Android FNX-12244 ⁃ Can't add custom search engine "https://searx.be/?q=%s" on Android Aug 11, 2020
@data-sync-user data-sync-user changed the title FNX-12244 ⁃ Can't add custom search engine "https://searx.be/?q=%s" on Android FNX2-13430 ⁃ Can't add custom search engine "https://searx.be/?q=%s" on Android Aug 11, 2020
@Sepero
Copy link

Sepero commented Nov 29, 2020

I had success adding searx.be

But still getting the error for searx.info and searx.ninja

@unixfox
Copy link

unixfox commented Nov 29, 2020

I had success adding searx.be

But still getting the error for searx.info and searx.ninja

Maybe those instances aren't up to date. Unfortunately we cannot do anything about that, you will have to contact the maintainer or use another instance.

@Sepero
Copy link

Sepero commented Nov 29, 2020

They display the version on the loading page.

searx.info is running the same version as searx.be (which works). and searx.ninja is running a newer version that both of them.

The issue appears to be solved for searx.be, but not any other server I've tried

@Sepero
Copy link

Sepero commented Nov 29, 2020

There is a chance that someone contacted the host of searx.be about this problem, and they may have changed something on their side to make themselves compatible with Firefox search engine. Which would explain why they appear to be the only ones that are to be able to add

@unixfox
Copy link

unixfox commented Nov 30, 2020

They display the version on the loading page.

searx.info is running the same version as searx.be (which works). and searx.ninja is running a newer version that both of them.

The issue appears to be solved for searx.be, but not any other server I've tried

This issue is unrelated to Searx, in fact it's not even a Searx bug but the antibot solution (filtron) that flagged Firefox android as a bot. So version number of Searx doesn't matter at all.

Filtron is a common tool used among public Searx instances.

There is a chance that someone contacted the host of searx.be about this problem, and they may have changed something on their side to make themselves compatible with Firefox search engine. Which would explain why they appear to be the only ones that are to be able to add

A while ago I pushed a fix for that on searx-docker so any up to date instances receive it, including searx.be.

The fix: searx/searx-docker#61

@newhoa
Copy link

newhoa commented Jun 22, 2021

Got this error when trying to add searx.be to Firefox 89.1.0 and also Fennec 89.1.1 both on Android.

If it's an issue on Fennec again should this be reopened? Or is this something that has been or should be reported to Mozilla? Thanks for any help or direction on this!

@unixfox
Copy link

unixfox commented Jun 23, 2021

Got this error when trying to add searx.be to Firefox 89.1.0 and also Fennec 89.1.1 both on Android.

If it's an issue on Fennec again should this be reopened? Or is this something that has been or should be reported to Mozilla? Thanks for any help or direction on this!

Hello, could you try again if it works now? By the way, I just tested on Firefox for android 89.1.1, and it works perfectly.

Screenshot_20210623-115019_Firefox_1_1

@newhoa
Copy link

newhoa commented Jun 27, 2021

@unixfox I tried it again and it is working now! Not sure what the issue was before. Maybe an error on my part or something with my config (I did upgrade to Firefox 89.1.1 and cleared Data before trying again). Anyway, thank you for checking and for getting back with me so quickly. Sorry for any inconvenience!

@data-sync-user data-sync-user changed the title FNX2-13430 ⁃ Can't add custom search engine "https://searx.be/?q=%s" on Android Can't add custom search engine "https://searx.be/?q=%s" on Android May 18, 2022
@pjzzzz
Copy link

pjzzzz commented Aug 18, 2022

"Firefox could not download the search plugin from: https://searx.be/opensearch.xml?method=POST&autocomplete=swisscows"
This is what I get on Firefox 103.0.2 (64-bit) when I try to add searx.be to Firefox by right-clicking the address bar.

@unixfox
Copy link

unixfox commented Aug 18, 2022

"Firefox could not download the search plugin from: searx.be/opensearch.xml?method=POST&autocomplete=swisscows" This is what I get on Firefox 103.0.2 (64-bit) when I try to add searx.be to Firefox by right-clicking the address bar.

Sorry opensearch was broken, please try again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Crashes, Something isn't working, .. Feature:SearchProvider
Projects
None yet
Development

No branches or pull requests

9 participants