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

Browserosaurus does not show when opening downloaded html file #564

Open
3 tasks done
aaronkollasch opened this issue Aug 11, 2022 · 11 comments
Open
3 tasks done

Browserosaurus does not show when opening downloaded html file #564

aaronkollasch opened this issue Aug 11, 2022 · 11 comments

Comments

@aaronkollasch
Copy link

Is there an existing issue for this?

Current Behaviour

When opening a downloaded html file, Browserosaurus grabs focus but no window appears.

Expected Behaviour

Browserosaurus shows the browser picker, a prompt to approve opening the file, or some error message stating that the file could not be opened.

Steps To Reproduce

  1. Download an html file from the web, e.g. https://example.com/index.html
  2. Right-click the file -> Open With -> Browserosaurus (or double-click if Browserosaurus is the default app for opening html files)

Browserosaurus version

19.0.0

macOS version

12.5

CPU Architecture

ARM

Anything else?

The downloaded file has the com.apple.quarantine attribute, and removing it with xattr -d com.apple.quarantine index.html allows the browser picker to appear as expected.

@will-stone
Copy link
Owner

Thanks. I've not heard of com.apple.quarantine, I'll have to do some reading up on that.

@will-stone
Copy link
Owner

I don't really know the solution here as Browserosaurus cannot see the incoming URL (file) 🤷‍♂️

@mreid-tt
Copy link
Contributor

mreid-tt commented Jan 10, 2023

I don't really know the solution here as Browserosaurus cannot see the incoming URL (file) 🤷‍♂️

Hmm, I'm sure there must be a way to handle this since other apps can open the file directly. Consider these command prompt examples:

% open -a "Brave Browser" index.html
% open -a "Safari" index.html

But if we use 'B', it fails if you use the command:

% open -a "Browserosaurus" index.html

So I'm thinking there must be some way for 'B' to be configured to accept input using the standard MacOS open command (from /usr/bin/open).

EDIT: Perhaps it's just a different input type for 'file' versus 'URL' that 'B' needs to be enabled to parse and then pass onto a specific browser using a similar open command?

@will-stone
Copy link
Owner

This should now be fixed in v20.9.1 but let me know if you still have issues with it.

@mreid-tt
Copy link
Contributor

mreid-tt commented Aug 26, 2024

This should now be fixed in v20.9.1 but let me know if you still have issues with it.

I've just upgraded and I don't see any changed behaviour based on the original steps to reproduce. I'm running Sonoma 14.6.1 with B 20.9.1.

@will-stone
Copy link
Owner

Strange, seems to be okay for me. Your command works with B too.

@mreid-tt
Copy link
Contributor

Strange, seems to be okay for me. Your command works with B too.

Strange indeed. Neither works for me...

Untitled.mp4

@will-stone
Copy link
Owner

You're right; just tried it on my work machine and it still doesn't work. Boo 😭

@will-stone will-stone reopened this Aug 28, 2024
@AlexStrNik
Copy link
Contributor

AlexStrNik commented Oct 15, 2024

Add this to your Info.plist, should work afterwards

<key>CFBundleDocumentTypes</key>
<array>
  <dict>
	  <key>CFBundleTypeIconSystemGenerated</key>
	  <integer>1</integer>
	  <key>CFBundleTypeName</key>
	  <string>HTML document</string>
	  <key>CFBundleTypeRole</key>
	  <string>Viewer</string>
	  <key>LSHandlerRank</key>
	  <string>Default</string>
	  <key>LSItemContentTypes</key>
	  <array>
		  <string>public.html</string>
	  </array>
  </dict>
  <dict>
	  <key>CFBundleTypeIconSystemGenerated</key>
	  <integer>1</integer>
	  <key>CFBundleTypeName</key>
	  <string>XHTML document</string>
	  <key>CFBundleTypeRole</key>
	  <string>Viewer</string>
	  <key>LSHandlerRank</key>
	  <string>Default</string>
	  <key>LSItemContentTypes</key>
	  <array>
		  <string>public.xhtml</string>
	  </array>
  </dict>
</array>

@will-stone
Copy link
Owner

will-stone commented Oct 16, 2024

@AlexStrNik thanks. Could you please test and PR that? I can see it says “public.html”. Is that a special string? Otherwise won’t it only work for files called “public”?

@AlexStrNik
Copy link
Contributor

I'm sorry, maybe next week I will have more free time. "public.html" is a special string, I'm not sure why it is like this, but it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants