will-stone / browserosaurus

🦖 The browser prompter for macOS
https://browserosaurus.com
GNU General Public License v3.0
1.72k stars 161 forks source link

Not working with links from Full Screen apps and multiple workspaces/desktops (need to restart app frequently) #595

Open varunyellina opened 1 year ago

varunyellina commented 1 year ago

Is there an existing issue for this?

Current Behaviour

I use apps in Full screen mode on macOS Ventura 13.0.1. When Browserosaurus app starts, clicking links in the full-screen apps works. The Browser selection overlay shows up on the full screen app.

After sometime (indeterminate) when I click on a link in a full screen app, the space changes to the Desktop and Browserosaurus selection overlay shows up for a split second and disappears.

https://user-images.githubusercontent.com/1850730/205856408-60466156-5bf5-4a4d-b279-590c3f013cdb.mov

Expected Behaviour

The Browser selection overlay should show on the Full screen app and allow me to tap on a Browser.

Steps To Reproduce

  1. Make an app Full screen
  2. Click on a link

Browserosaurus version

19.3.3

macOS version

13.0.1

CPU Architecture

ARM

Anything else?

No response

will-stone commented 1 year ago

Thanks for the bug report. I think this has happened before, some sort of Electron limitation, I can't remember. Anyway, I'll mark it as "help wanted" as I don't fullscreen apps 🙂

metacurb commented 1 year ago

I have had this same issue on and off for a long time, but in the last week or see it seems to have really ramped up how often this occurs. @will-stone do you remember anything about how it happened before to help figure out which direction to go in?

will-stone commented 1 year ago

Sorry, no. There may be some clue in searching the issues but nothing off the top of my head, no.

riotrah commented 1 year ago

I have occasionally noticed this in the rare times I use full screen mode, but if I observe an obvious pattern and have a hunch I'd be happy to discuss it further here and potentially think of a solution or PR

cesmend commented 1 year ago

I do fullscreen apps every day and can say that I've been seeing this issue more and more lately. Perhaps since updating to Ventura. I didn't know this was happenning specifically with fullscreen apps, so I'll try to not fullscreen them and check if I see it again.

will-stone commented 1 year ago

Looks related: https://github.com/electron/electron/issues/36364

jishnu7 commented 1 year ago

This is occurring for applications that are not in fullscreen mode as well. The only workaround is to quit and re-open browserosaurus.

will-stone commented 1 year ago

@jishnu7 Are you using virtual desktops?

Please note, I do not maintain the code for the underlying framework, Electron. If you'd really like to help, please add reproducible examples to the issue on their tracker: https://github.com/electron/electron/issues/36364 Thank you ☺️

iurikothe commented 1 year ago

Hope this issue gets fixed soon. Really wished i knew how to help. ;-)

jishnu7 commented 1 year ago

I did dig deep and found reproducible steps.

  1. Open Google Chrome on Desktop 1.
  2. Open Mail or any other application which has the link that we are going to open, on Desktop 2
  3. Clicking on the link in Desktop 2 will open browser prompt on correct Desktop.
  4. Go to Google Chrome, visit YouTube, play any video and click on full-screen button in the seek bar.
  5. Exit full screen
  6. Go to Desktop 2 and click on the link again. You can see that Browserosaurus is opening in an incorrect desktop and not allowing you to click on the browser list.
will-stone commented 1 year ago

Thanks @jishnu7 Now if you could boil that down to a very simple reproducible example for the Electron project, that would be awesome 😎 I use neither virtual desktops nor full screen apps so this will never be a priority for me 👍

jishnu7 commented 1 year ago

What do you mean by example for the electron project? If you can share some pointers, I might be able to help on that.

will-stone commented 1 year ago

@jishnu7 Your best bet is probably to use Electron Fiddle to make a reproducible example, you can then publish that and post it as an issue on the Electron repo 🙂 👍

kristiannotari commented 1 year ago

This is occurring for applications that are not in fullscreen mode as well. The only workaround is to quit and re-open browserosaurus.

I can confirm this as occurring more and more lately and also with non full-screen apps unfortunately. Same workaround here.

MaickelHubner commented 1 year ago

Same problem here

MaickelHubner commented 1 year ago

@ will-stone, you could restart the App automatically every 15 minutes (make it a parameter) to solve this (temporarily). What do you think?

will-stone commented 1 year ago

Sorry, that doesn’t sound like a good idea. The best solution is for someone to create a small reproducible example and submit to Electron.

metamole commented 1 year ago

I see this issue also. or a variant at least. If I have an application like Outlook, with a link in one of the email, the expected behaviour is to click on the link and to get the menu choice of which browser to open the link in.

Having restarted Browsersaurus, that happens.

However, after a period of time (varies) one of two things happens:

A reboot of Browsersaurus resolves the issue. Until it re-occurs.

To me it feels like there might be an issue with the browser requested being on a different desktop to the application where the ink menu is triggered, so in effect it can't fine the target and fails.

I'm on the latest Mac OS and latest patch. Any assistance in fixing this would be much appreciated as this is a really killer application :-)

will-stone commented 1 year ago

Any assistance in fixing this would be much appreciated

Indeed! 😄

Create a reproducible minimal example, and send it to the Electron project.

Please only update the issue if you can provide more information than has already been gleaned above: there will be quite a few people watching this now, and every time a new post is made they will be notified and disappointed it is not progression.

Thanks 🙂

vkravets commented 1 year ago

It seems fixed after upgrade to Ventura 13.2.1... Will see after some time. Will update if issue will appears again

gardamork commented 1 year ago

It seems fixed after upgrade to Ventura 13.2.1... Will see after some time. Will update if issue will appears again

I was still seeing this issue on 13.2.1 but then I realised I was running Browserosaurus 20.0.2 so I just updated to 20.1.0. Will report back if problem persists.

kopach commented 1 year ago

Just for reference: https://github.com/will-stone/browserosaurus/issues/175. Seems like same issue resolved in the past Anyway, 20.1.0 on Ventura 13.2.1 works fine for me for some time only and then stops. Restart required

kopach commented 1 year ago

I'm using multiple desktops daily, so this is critical for me. As a workaround - I've downgraded to https://github.com/will-stone/browserosaurus/releases/tag/v19.3.3 and blocked network access for the app, so it can't auto upgrade - testing.


Update: doesn't work also 😢

macmus82 commented 1 year ago

this is still happening.

kopach commented 1 year ago

Alright, I came up with a temporary workaround for this issue. I've created the script that would re-start the app. I've placed it into cron job to run every X minutes, but you can run it manually as well (or run it from Alfred, Mac Shortcuts, etc.) Here is the script:

#!/bin/bash

# If Browserosaurus is not running, exit, no need to re-open it
if ! pgrep Browserosaurus > /dev/null; then
  echo "Browserosaurus is not running"
  exit 1
fi

# Kill Browserosaurus
pkill Browserosaurus

# Define a function to wait for 50 milliseconds
wait_50ms() {
  sleep 0.05
}

# Wait until Browserosaurus is killed and re-open it
while true; do
  # Check if Browserosaurus is running
  if pgrep Browserosaurus > /dev/null; then
    echo "Browserosaurus is running"
  else
    echo "Browserosaurus is not running, opening it again"
    open -a Browserosaurus
    break
  fi

  # Wait for 50 milliseconds
  wait_50ms
done
Saij commented 1 year ago

Following for a better solution

will-stone commented 1 year ago

@Saij Please use the "subscribe" button when you would like to follow issues on GitHub. When you comment you inadvertently send a notification to everyone already following the thread. They don't know what the notification is about, so like me, they click it and think "ooo, someone's found a solution" but then it's just a bump message. You can see how this may not be the best netiquette? Please don't answer that 😆

sushione commented 1 year ago

Seems to be also a macOS problem : it was working well on 13.4.x but since 13.5 the issue is back (only displaying browser window on one virtual desktop, not all). Also having it with other apps (like LittleSnitch or auto-update dialog alert..). Very annoying, hope Apple will resolve it soon. Edit : deleting and recreating all desktops in Mission Control seems to work to have browseraurus window on all desktop again.

joaovfsousa commented 1 year ago

@will-stone Are you okay with adding a feature(disabled by default) that will quit Browserosaurus after you select a browser? That solves the issue. I am willing to develop this feature if you agree to have it added.

will-stone commented 1 year ago

Sorry, not really. Although that works for you, it solves a problem I don’t have. Apple needs to fix this, or you could help Electron find a workaround.

However, this is open source. Fork the project and add your restarter code, there’s no requirement it has to make it to the parent project.

breuerfelix commented 1 year ago

@joaovfsousa would you fork the project and implement this? i am looking forward for this quick fix since the constant manual restarting after fullscreening one app drives me nuts :D

homebrew should make it easy to install forks instead of the official one :)

will-stone commented 1 year ago

Sounds weird to tout the competition, but you could always try Sindre's Velja? 🤷‍♂️

joaovfsousa commented 1 year ago

@will-stone Thanks for your suggestion. I tried it, and it works well with multiple desktops.

@breuerfelix I have most of the code done. I'll push the code to my fork later today if you are interested in building/using it. However, as Velja worked well for me and maintaining the fork would require a lot of time, I'll archive it after the changes are pushed.

breuerfelix commented 1 year ago

@will-stone Thanks for your suggestion. I tried it, and it works well with multiple desktops.

@breuerfelix I have most of the code done. I'll push the code to my fork later today if you are interested in building/using it. However, as Velja worked well for me and maintaining the fork would require a lot of time, I'll archive it after the changes are pushed.

Velja also works well for me and since i configured rules now, i don't need a browser picker anymore, hence i don't know if i will go back to browserosaurus anyways but thanks!

dylan-chong commented 1 year ago

I have found a (it's a feature not a bug) workaround in the meantime. When you click the link in the fullscreen app, if you quickly press the shortcut key to open the right browser, it will open that browser during the mission control space switch animation.

So, click link then immediately press s for safari

kopach commented 1 year ago

Mac has feature to "Assign apps to spaces". In this case, I believe, Browserosaurus should be assigned to All desktops by default. See: https://support.apple.com/guide/mac-help/work-in-multiple-spaces-mh14112/14.0/mac/14.0#mchlp03b679a The problem is, that as a user I can't do this manually as Browserosaurus dosen't appear in Dock (which is required to assign app to "All desktops")


From docs:

By default, when switching to an app, the desktop automatically switches to a space that has open windows for the app.

kopach commented 1 year ago

~Here is solution https://superuser.com/a/1320800/969522~

For an app (like Touch Bar Simulator) that has a floating window without an icon in the Dock, you have to find the .app file and drag it to your Dock. From there you can use the method that Tesujin mentioned to have it available on all workspaces by right clicking on app icon, Options, Assign To All Desktops.


After some more testing discovered this doesn't work. Popup window seems to be not the same “window” instance as main Browserosaurus process.

tomasvotava commented 8 months ago

I've been dealing with this for a long time, so I've added this to my crontab (crontab -e):

1/3 * * * * killall Browserosaurus > /dev/null 2>&1 || echo "not found" > /dev/null

It will kill Browserosaurus every 3 minutes, the next time you click a link, it will simply take a little bit longer to start, but it mitigates the problem altogether. A fix for this would be appreciated, though, as it may take few seconds to start Browserosaurus and opening links has become a PITA.

Thanks for the app anyways, Mac OS wouldn't be usable for me without it :heart:

mrdavemorgan commented 7 months ago

Regarding the "assign app to spaces" solution @kopach suggested, while it does not work with the main app, it does work if you drag the embedded "Browserosaurus Helper" to the dock and assign to all spaces.

sushione commented 7 months ago

it does work if you drag the embedded "Browserosaurus Helper" to the dock and assign to all spaces.

Where is that helper ? Couldn't find it inside app package.

kopach commented 7 months ago

@mrdavemorgan , I'm also curious how you did that. By "Browserosaurus Helper" do you mean this small popup window with browsers list? how have you dragged it into dock? I can't drag it :(

kopach commented 7 months ago

@sushione , ok, I guess, I've found it. You have to find "Browserosaurus.app" (under /Applications), right click and select "Show Package Contents". Then navigate to Contents -> Frameworks. You will find "Browserosaurus Helper" there which you can drag into Dock and change window options. Doesn't seem to work for me though (but I'm testing it)

RootMePLS commented 6 months ago

Apple M1 macOS: 14.4.1 (23E224) Browserosaurus: 20.8.0

"Browserosaurus Helper" - works, but it's an ugly solution :(

js-d-coder commented 6 months ago

I am facing this issue on MAC OS 14.4.1 running on M3. Link does not open but instead Browserosaurus switches desktop and disappears.

benjamingwynn commented 5 months ago

@will-stone sorry if this has been asked before, but does browserosaurus need to run in background? is there a reason it can't just spawn when asking for a browser then entirely exit when done?

I believe that this would fix this issue by proxy, which would be good because I can't use this excellent program as soon as I go into a fullscreen youtube video

will-stone commented 5 months ago

B’s first load is quite slow. I don’t think this would be a viable solution.

Unless someone knows how to fix this issue upstream, and you need full screen support, I’d suggest using Velja by Sindre Sorhus for now.

AlexStrNik commented 5 months ago

I've been waiting for a fix too long, so i written SwiftUI port today. Still testing, but at least this bug seems to be fixed.

https://github.com/AlexStrNik/Browserino/

will-stone commented 5 months ago

@AlexStrNik this is great (not that I’ve tested it), and I would have switched to Swift too if I had the know-how (by that I mean: I am a TS engineer by trade, and recently became a father, so do not currently have the time or energy to learn a new language).

May I please suggest that you carve out your own identity for the app? For example, the readme could highlight what it does and how to use it, rather than simply dunking on Browserosaurus.

I know it’s early days for Browserino, and you probably just wanted to get something up to show people quickly, but let’s respect each other’s efforts. This project has been provided for free for seven years.

AlexStrNik commented 5 months ago

Hey @will-stone! Sorry, never meant to disrespect you or your app. Was a little bit busy on job to write good Readme but wanted to already share. I changed description in the repository.

P.S I'm too web developer at my position. Changed my thoughts about typescript a lot after learning Swift)

will-stone commented 5 months ago

And a screenshot, that looks great 😄 Out of interest, which do you prefer, TS or Swift?