markdown-viewer
markdown-viewer copied to clipboard
Firefox missing file:// Blank page
Once in a while it works. Mostly it displays a blank page. I can't figure out the conditions that it will display my file as markdown. When I hit refresh there's a flash of the original text file.
This is on Firefox.
I have it working wonderfully on Chrome and Chrome beta
On those working versions, on the advanced settings page there is an origin set of "file://" I don't have that option on firefox. Also on Chrome there is an option within Chrome settings to allow local files. I don't know how to set it on Firefox.
So I can't use this extension on my main browser, Firefox.
Local file:// URLs are not supported in Firefox, last time I checked it wasn't working. That's why this option is disabled in the Advanced Options page for the extension.
You can easily run a file server on localhost. Check out this short screencast if you haven't already https://www.youtube.com/watch?v=c7Lb_Y092ok
You can read more about the issue here https://github.com/simov/markdown-viewer/issues/54
You can easily run a file server on localhost. Check out this short screencast if you haven't already https://www.youtube.com/watch?v=c7Lb_Y092ok
Thanks, that's good to know. Is there something I can to to Firefox or my system beside run the server? (I actually run a full time local server, but I use markdown files scatted around my filesystem as notes to myself. It's not practical to have to move them over to the server folders.
I think there was some sort of fix related to modifying some Firefox files to change the mime type of the Markdown documents to plain/text or something like that. But I've never tried it.
I have this running for my home folder, so that it includes everything I work on. And then you can have a trigger in your editor to load the file in your browser with the correct URL.
I tried the several extensions and found this 'GitLab Markdown Viewer' is working for local file scheme ( file:// ). (in firefox 68.0.1 windows 10)
'GitLab Markdown Viewer' works for file:/// URIs too for me also, in Firefox 69.0.1 on Mac OS X 10.11.6.
I am using Firefox Developer Edition version 74.0b7 and this extension correctly rendered my Markdown when I use file:///
.
Thanks for letting me know it's supposed to work. I hit refresh over and over on some refreshes it will display markdown, on some others, just a blank white page, and on some the unformated markdown source. It's regularly unreliable. When it is showing properly drawn markdown, another refresh will often go back to a blank white page. I'm on 69. I guess I'll try an update or maybe a fresh install.
@vayulove update your Markdown Viewer extension to the latest version. The blank page issue should be fixed now. As for newer versions of Firefox serving markdown files properly on file:/// URLs, that would be great, and I'll check that myself too.
@duongdominhchau can you share your Operation System as well. I just tried on FF Nightly 75.0a1 (2020-02-29) (64-bit)
and it still doesn't work for file:// URLs on Linux (Ubuntu 18.04).
Here they are:
- OS: ArchLinux
- Firefox Developer Edition v74.0 from Arch official repo
- Extension installed 2 days ago, from https://addons.mozilla.org/en-US/firefox/addon/markdown-viewer-chrome/
- Customization on system: I created a file to map Markdown file extensions to
text/plain
. I created this when I useGitLab Markdown Viewer
extension, without it Firefox will try to download the file instead of displaying it. Path of that file is$HOME/.local/share/mime/packages/text-markdown.xml
, below is its content:
<?xml version="1.0"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="text/plain">
<glob pattern="*.md"/>
<glob pattern="*.mkd"/>
<glob pattern="*.markdown"/>
</mime-type>
</mime-info>
- Detailed informations about Firefox (filtered from Help -> Troubleshooting Information):
Application Basics
------------------
Name: Firefox
Version: 74.0b9
Build ID: 20200228110326
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0
OS: Linux 5.5.6-arch1-1
Multiprocess Windows: 1/1 Enabled by default
Remote Processes: 7
Enterprise Policies: Inactive
Google Location Service Key: Found
Google Safebrowsing Key: Found
Mozilla Location Service Key: Found
Safe Mode: false
Extensions
----------
Name: Default Bookmark Folder
Version: 2.12.0
Enabled: true
ID: [email protected]
Name: KeePassXC-Browser
Version: 1.5.4
Enabled: true
ID: [email protected]
Name: Markdown Viewer
Version: 3.8
Enabled: true
ID: [email protected]
Name: Personal Blocklist (not by Google)
Version: 3.4.0
Enabled: true
ID: [email protected]
Name: Search by Image on Google
Version: 1.6
Enabled: true
ID: {1d6267dd-4b37-459a-84da-a5d2580daa6a}
Name: uBlock Origin
Version: 1.25.0
Enabled: true
ID: [email protected]
Important Modified Preferences
------------------------------
accessibility.typeaheadfind.flashBar: 0
browser.cache.disk.amount_written: 143568
browser.cache.disk.capacity: 1048576
browser.cache.disk.filesystem_reported: 1
browser.contentblocking.category: standard
browser.download.folderList: 2
browser.privatebrowsing.autostart: true
browser.sessionstore.upgradeBackup.latestBuildID: 20191228115717
browser.startup.homepage: about:blank
browser.startup.homepage_override.buildID: 20200228110326
browser.startup.homepage_override.mstone: 74.0
browser.urlbar.placeholderName: DuckDuckGo
browser.urlbar.placeholderName.private: DuckDuckGo
dom.push.userAgentID: bc14b1281c4a405f8f0bfb23510ab56f
extensions.lastAppVersion: 74.0
font.internaluseonly.changed: true
idle.lastDailyNotification: 1582974865
media.gmp-gmpopenh264.abi: x86_64-gcc3
media.gmp-gmpopenh264.lastUpdate: 1578133194
media.gmp-gmpopenh264.version: 1.8.1.1
media.gmp-manager.buildID: 20200228110326
media.gmp-manager.lastCheck: 1582945108
media.gmp.storage.version.observed: 1
network.dns.disablePrefetch: true
network.http.speculative-parallel-limit: 0
network.predictor.cleaned-up: true
network.predictor.enabled: false
network.prefetch-next: false
places.database.lastMaintenance: 1582877233
places.history.expiration.transient_current_max_pages: 112348
plugin.flash.lastmod_hi: 367
plugin.flash.lastmod_lo: -1536175928
print.print_bgcolor: false
print.print_bgimages: true
print.print_duplex: 0
print.print_evenpages: true
print.print_footerleft:
print.print_footerright:
print.print_headerleft:
print.print_headerright:
print.print_margin_bottom: 0.5
print.print_margin_left: 0.5
print.print_margin_right: 0.5
print.print_margin_top: 0.5
print.print_oddpages: true
print.print_orientation: 0
print.print_page_delay: 50
print.print_paper_data: 0
print.print_paper_height: 11.69
print.print_paper_name: iso_a4
print.print_paper_size_unit: 0
print.print_paper_width: 8.27
print.print_scaling: 1.00
print.print_shrink_to_fit: true
print.print_to_file: false
print.print_unwriteable_margin_bottom: 56
print.print_unwriteable_margin_left: 25
print.print_unwriteable_margin_right: 25
print.print_unwriteable_margin_top: 25
privacy.history.custom: true
privacy.sanitize.pending: [{"id":"newtab-container","itemsToClear":[],"options":{}}]
security.fileuri.strict_origin_policy: false
security.remote_settings.crlite_filters.checked: 1582545787
security.remote_settings.intermediates.checked: 1582545787
security.sandbox.content.tempDirSuffix: e3c8a670-6196-4c6c-8027-2018edd7e370
security.sandbox.plugin.tempDirSuffix: 0e1423e2-2f23-4de2-b227-a06ec26cc743
security.tls.version.enable-deprecated: true
services.sync.declinedEngines:
signon.importedFromSqlite: true
storage.vacuum.last.index: 1
storage.vacuum.last.places.sqlite: 1580815554
Important Locked Preferences
----------------------------
fission.autostart: false
Please let me know if you want any other informations. Currently I can't think of anything else relevant to include in this comment.
Thanks @duongdominhchau! Your customization for text/plain
is exactly what makes Firefox serve Markdown files instead of prompting for an application to open them. It's great to have it documented here!
Unfortunately Firefox does not support that by default. So I can't claim that Markdown Viewer renders local file URLs on Firefox.
Also I can't add this information to the readme, unless I have similar guide on how to make it work on Windows and MacOS.
I have just installed it on Firefox 73 running on Windows, worked without any modification on my system. It has the problem similar to @vayulove mentioned though, sometimes it show a blank page, sometimes it renders correctly. I said it is similar because I can't see it displayed raw Markdown, even after hundreds refresh, just either blank or fully rendered. On Arch I rarely see this problem, most of the time it just works.
Thanks for the feedback! I have a Windows machine around, so I'll hook it up over the weekend and see what's going on :+1:
Just checked latest Firefox stable on Windows 10 and it seems the operating system or the browser appends a .txt
extension at the end of the markdown file like this:
file:///C:/Users/simov/Downloads/syntax.md.txt
And so that isn't being rendered at all on my end because the file URL entry is disabled for Firefox in the Advanced Options page, and I can't really update the Path Matching RegExp to match on txt
as well.
So I'm really not sure how Firefox is picking this up on your end, but I'm definitely going to revisit the file URL support for Firefox.
I don't know but when I test this extension, I just install and open md file in Firefox, no configuration. At that time it can't even render md from http://
and https://
URL because I haven't configure it yet, but md using file://
URL is still displayed correctly.
Does it have .txt
appended on your end? Also which version of Windows do you use, is it 10?
It's Windows 10 updated about 5 months ago, I installed it to use Visual Studio for my assignment. My file doesn't have .txt
at the end. How did you create the file? Did you forget to show the file extension on Windows, because by default Windows hides the real extension. I once forgot to turn off that "feature" of Windows.
I downloaded it from here, but now I have to hook the entire machine back just to check if it was stored as syntax.md.txt or not ...
still has problem with markdown viewer 3.9. and the more plugins, the higher the problem frequency
my env
debian stable
firefox esr
Markdown Viewer v5.1 was released with lots of new features and bugfixes so make sure you check that out. Also there is a new screencast about it and a new documentation specific to Firefox issues and workarounds.
I'm closing this issue because it seems that it may contain a lot of inaccurate facts about the extension. For example one thing that I fixed in v5.1 was about Firefox showing a blank page when navigating back and forward between markdown documents.
Feel free to open up another issue if you find anything specific.