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

"Search ..." commands open an empty tab #621

Open
Valentino1970 opened this issue Nov 7, 2021 · 30 comments
Open

"Search ..." commands open an empty tab #621

Valentino1970 opened this issue Nov 7, 2021 · 30 comments
Labels
external The bug is caused by Firefox or other external software.

Comments

@Valentino1970
Copy link

Valentino1970 commented Nov 7, 2021

Hi! Using a gesture to search selected text in a new tab with option highlight the new tab open an empty tab. Same problem in the last few Gesturefy versions.

  • Operating system: Windows 8.1
  • Firefox version: 94.0.1
  • Gesturefy version: 3.2.3
@Robbendebiene
Copy link
Owner

Hi, it's working fine for me. Since when does this problem occur to you?

Can you please try to reassign the command to your gesture, save your gesture and see if it works then?

@Valentino1970
Copy link
Author

Valentino1970 commented Nov 7, 2021

Hi and thank you for your answer.

It started some days ago (maybe after one automatic update?). I tried everything (downgrade, inspect console, reassigning and so on) with no success.
If I reassign and save, the search runs opening in a new tab and taking focus, BUT only for the first search, than next ones only open and focus new blank tabs.
Hopying this can help...

@Robbendebiene
Copy link
Owner

Ohh, so it's opening a completely empty tab without showing an empty search engine. I've experienced the problem too about 3 days ago on my working machine, but it only happened on one particular site and after a browser restart I wasn't able to reproduce it again. I've also checked the console and it was empty. Since downgrading Gesturefy doesn't fix the problem I assume it's some sort of bug in Firefox 94 which was released recently.

If I reassign and save, the search runs opening in a new tab and taking focus, BUT only for the first search, than next ones only open and focus new blank tabs.

This however makes me think it's a bug in Gesturefy.

Since I'm not able to reproduce it myself I rely on further investigation by you. Maybe you can detect some sort of pattern.
Just to make sure please check the console again the following way:

  1. Enter about:devtools-toolbox?type=extension&id=%7B506e023c-7f2b-40a3-8066-bc5deb40aebe%7D in your address bar
  2. Switch to the "Console" tab in the top bar
  3. Clear the console via the bin icon (because it also shows errors unrelated to Gesturefy)
  4. Reproduce the error
  5. Head back to the console and copy and paste all outputs into the issue

@Valentino1970
Copy link
Author

I made it, only messages are:
16:41:22.433 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
sendOptions moz-extension://2e569851-022b-4929-97e5-cfa322a210cd/background.js:228
background.js:228:18
16:41:24.538 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
sendOptions moz-extension://2e569851-022b-4929-97e5-cfa322a210cd/background.js:228
background.js:228:18

@Robbendebiene
Copy link
Owner

Looks like this is an error from a different extension since Gesturefy's background.js only consists of 211 lines of code.

@Valentino1970
Copy link
Author

Yes, I tried in the past days to unable all the extensions that could be involved, but with no success. Besides, the fact that the first time the gesture works made me think it was a gesturefy extension bug, but I'll try to unable selectively by groups all the extensions to try to solve. I'll update you if I have news, thank you

@Robbendebiene
Copy link
Owner

In theory another extension shouldn't be able to interfere with Gesturefy at least in this particular scenario. So it's probably not caused by another extension. Currently I'm able to reproduce the error on my working machine again but it only happens sometimes or on some websites. I really cannot make sense of it right now.

@Valentino1970
Copy link
Author

Valentino1970 commented Nov 7, 2021

Yes, it is the same for me, that is the reason I wrote to you ;)
Trying to experiment with extensions, but with crazy results: sometimes the problem seems solved (gesturefy works as espected all the time), but if I try to reproduce the procedure to solve the problem, the problem came back...with only gesturefy enabled, the problem persist...maybe something esoteric about firefox?

@Robbendebiene
Copy link
Owner

Just to be sure, you are using the "Search Text Selection In New Tab" right? Can you confirm that it does work if you disable tab focus/highlight?

maybe something esoteric about firefox?

Yea.. if you can confirm the above then this must be the case.

@Valentino1970
Copy link
Author

Finally I solved! I made some esoteric research on my pc and the culprit is FISSION (site isolation) in firefox. The problem is present (with crazy results) when FISSION is enabled. I think firefox team has to work a little more on it.
I hope this will be useful to you ;)
Thank you for your help and your great extension

@Robbendebiene
Copy link
Owner

That's it, great catch! :) They just started rolling this out so it makes sense it doesn't happen on every machine. I'll open a ticket on bugzilla.

@Robbendebiene Robbendebiene added the external The bug is caused by Firefox or other external software. label Nov 7, 2021
@Robbendebiene Robbendebiene changed the title Search selected text in a new tab with option highlight the new tab not working "Search selected text in a new tab" command opens an empty tab Nov 7, 2021
@Valentino1970
Copy link
Author

;)

@Robbendebiene Robbendebiene pinned this issue Nov 9, 2021
@Robbendebiene
Copy link
Owner

Just for reference: https://bugzilla.mozilla.org/show_bug.cgi?id=1741694

@Valentino1970
Copy link
Author

Thank you

@Bahoslav
Copy link

I'm having same problem.

@Robbendebiene
Copy link
Owner

For now this can only be "solved" by going to about:config and setting fission.autostart to false.

@Robbendebiene Robbendebiene changed the title "Search selected text in a new tab" command opens an empty tab "Search ..." commands open an empty tab Jan 2, 2022
@bubblefoil
Copy link

Wow, it started happening again. So I checked the fission.autostart flag and apparently a recent update re-enabled it!
It's sad there's little progress regarding the bug in Firefox and they are also breaking the workaround.

@byzod
Copy link

byzod commented Mar 6, 2022

Lucky enough to capture a log for this bug (when try to search some text with search popup menu)

Promise rejected after context unloaded: Actor 'Conduits' destroyed before query 'RuntimeMessage' was resolved
2 [iframe-popup-command-view.mjs:113](moz-extension://e9a0bda0-215b-4f76-8cfa-2da37bcb8b79/core/views/popup-command-view/iframe-popup-command-view.mjs)
    terminate moz-extension://e9a0bda0-215b-4f76-8cfa-2da37bcb8b79/core/views/popup-command-view/iframe-popup-command-view.mjs:113

Code when click it

/**
 * Closes the messaging channel and sends the popup termination message to close the popup
 **/
function terminate () {
  // disconnect channel
  channel.disconnect();
  // close/remove popup
  browser.runtime.sendMessage({
    subject: "popupTermination"
  });
}

line 113 is browser.runtime.sendMessage({

@Robbendebiene
Copy link
Owner

@byzod Thanks for your investigation. However this is not related to the problem. You can also reproduce the problem with the simple "Search selected text" command.
The error message existed before and shouldn't affect the extension in any way. I never found a way to properly suppress the error, but I remember the devs on mozilla were talking about removing it all together, because it has now use.

@ScienceDiscoverer
Copy link

ScienceDiscoverer commented Jun 14, 2022

It's still happening. I only learned about this extension today, I'm total noob, and got startled by this bug. I guess I'm a bug-magnet =\

I can add few interesting findings. The most interesting one: when I open console tab to try and catch some error messages, the bug disappears completely and cannot be reproduced! I'm using "Search highlighted text in new tab" with focus switch to created tab. I can search text on any site any number of times with no issue. Also nothing is written to console. However, when I close console tab and try to search text again, bug returns! How this can be explained, I wonder? Honestly, I have no idea at all...

One more observation - this bug only happens if I search selected text AND have "Switch to search tab" option enabled. If searching without focus shift, there is no bug. Also with custom URL in search field, but seems to not happen too... But "empty search disable" rule does not work in this case. Yea, its a mess!

Though, I got lucky I found this issue, at least! I hope that switching off fission.autostart will solve this, for now...

@OLOPOLON
Copy link

OLOPOLON commented Sep 12, 2022

I've recently uptaded Firefox from 89.01 to 103 and later 104, and both newest versions cause that empty tab error. Sometimes it works, sometimes not. It was better on 103, cause there was some regularity in the occurrence of this problem. Every first using of popup particular search engine was opened empty tab, but if you used the same search engine again, you saw results of your searching in new tab. In 104 version problem became more often and unpredictable, so I was forced back to old 89.01 version, which doesn't cause any problems with popup searching.
I tested it on few different versions of Gesturefy (including 3.2.6) on Windows 10 Home.

BTW, is it possible to add option to select individual search engines which show in pop-up window?

@mherrmann3
Copy link

mherrmann3 commented Sep 12, 2022

I didn't notice differences among the >v100 versions; but occasionally, empty tabs appear, yes.

@OLOPOLON regarding your "BTW" (select individual search engines): Currently, this is not possible due to Firefox' limited search API (and may never be), but have a look here: #584; you may use my suggested workaround by "outsourcing" search engines to bookmarks.

@byzod
Copy link

byzod commented Sep 17, 2023

Good news is that this bug is stable now, it might be helpful for debug

I ALWAYS get a blank page, the search popup is unusable completely

@Robbendebiene
Copy link
Owner

Indeed, I can confirm this. But since I'm unable to fix the bug please post any valuable information here: https://bugzilla.mozilla.org/show_bug.cgi?id=1741694

@byzod
Copy link

byzod commented Sep 18, 2023

Indeed, I can confirm this. But since I'm unable to fix the bug please post any valuable information here: https://bugzilla.mozilla.org/show_bug.cgi?id=1741694

This addon has a working feature that you can select words and drag to search it with current search engine, looks similar. Hope it helps

@Robbendebiene
Copy link
Owner

Robbendebiene commented Sep 18, 2023

@byzod Thanks for the Info, looks like the developer added a timeout there as a workaround.

I also just tried to reproduce the bug on Firefox 119.0a1 (2023-09-18) without any success. So perhaps it has already been fixed.

Edit: I tested it again and it seems like I crowed too soon. While it works at the beginning with few tabs, the problem reoccurs at a tab count of about 7 and more.

@byzod
Copy link

byzod commented Oct 4, 2023

Yes I can confirm it was fixed in 119b4 :D

Well it's there again :/

I can't reproduce it in a new profile, it's working normally. Only appears on my main profile and 100% blank page, however sometimes (like 15%) it's working if I disable all my other addon. Looks like problem related to performance and timeout or something...

@byzod
Copy link

byzod commented Oct 6, 2023

Can I have a timeout hack version of gesturefy as you mentioned please? @Robbendebiene

Thanks for the Info, looks like the developer added a timeout there as a workaround.

Since glitterdrag's drag search is 100% reliable for me while waiting Mozilla to fix this bug might take another 10 years... ;_;

@Robbendebiene
Copy link
Owner

Can I have a timeout hack version of gesturefy as you mentioned please? @Robbendebiene

Try https://github.com/Robbendebiene/Gesturefy/archive/refs/heads/empty-tab-on-search-mitigation.zip

Extract the zip and then re-zip everything inside the src directory. Then you should be able to install it clicking the "gear" icon under about:addons

@byzod
Copy link

byzod commented Oct 10, 2023

Can I have a timeout hack version of gesturefy as you mentioned please? @Robbendebiene

Try https://github.com/Robbendebiene/Gesturefy/archive/refs/heads/empty-tab-on-search-mitigation.zip

Extract the zip and then re-zip everything inside the src directory. Then you should be able to install it clicking the "gear" icon under about:addons

Thank you so much, it works like a charm ❤️

Never expect 50 milliseconds would make such big difference, I love hacking

And fuck Mozilla

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external The bug is caused by Firefox or other external software.
Projects
None yet
Development

No branches or pull requests

8 participants