Bug 1176444 - Browsers couldn't run local .swf files
Summary: Browsers couldn't run local .swf files
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: chromium
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-12-21 22:01 UTC by Mikhail
Modified: 2016-09-22 14:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-22 14:08:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mikhail 2014-12-21 22:01:25 UTC
Description of problem:
Browsers couldn't run local .swf files (instead download them)

Solution:
Edit /usr/share/mime/packages/freedesktop.org.xml as root and replace the following:
<mime-type type="application/vnd.adobe.flash.movie">

With:
<mime-type type="application/x-shockwave-flash">

And then run:
update-mime-database /usr/share/mime

Why this change couldn't make in upstream?

Comment 1 Fedora End Of Life 2015-11-04 14:36:09 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Bastien Nocera 2016-09-21 16:31:47 UTC
(In reply to Mikhail from comment #0)
> Description of problem:
> Browsers couldn't run local .swf files (instead download them)

What browsers? How do you launch it?

> Solution:
> Edit /usr/share/mime/packages/freedesktop.org.xml as root and replace the
> following:
> <mime-type type="application/vnd.adobe.flash.movie">
> 
> With:
> <mime-type type="application/x-shockwave-flash">
> 
> And then run:
> update-mime-database /usr/share/mime
> 
> Why this change couldn't make in upstream?

Because you didn't file an upstream bug?

This seems like a bug in the browser. application/x-shockwave-flash is already an alias of application/vnd.adobe.flash.movie. application/vnd.adobe.flash.movie is the correct mime-type for .swf files.

Which browser was it then?

Comment 3 Mikhail 2016-09-21 18:46:15 UTC
> What browsers?

Any browser which contain Flash Plugin. (Better of course Google Chrome because support flash out of box on Linux with GPU acceleration)

> How do you launch it?

1) "Open With Other Application" in nautilus.
2) Drag file from nautilus and drop it to browser.
3) Manually entering address file:///home/mikhail/lesson1.swf in browser address bar


> This seems like a bug in the browser. application/x-shockwave-flash is already an alias of application/vnd.adobe.flash.movie. application/vnd.adobe.flash.movie is the correct mime-type for .swf files.

This workaround I found in internet and it works. With application/vnd.adobe.flash.movie browser download swf file instead of play it.

> Which browser was it then?

Google Chrome 55.0.2859.0 dev checked in Fedora 25.

Comment 4 Bastien Nocera 2016-09-22 12:40:03 UTC
Seems like a bug in the browser. The 2 mime-types are equivalent, but the browser isn't making use of that information.

I'll reassign to Chromium, but you'll want to file bugs against other affected browsers if there's any other.

Comment 5 Tom "spot" Callaway 2016-09-22 14:08:16 UTC
Chromium doesn't have flash out of the box. But, since that's a bit of a cop-out, I looked at how Chromium does mime handling... and it uses a bundled copy of git://anongit.freedesktop.org/xdg/xdgmime

Based on my (albeit limited) understanding of how the files in /usr/share/mime work, Chromium should inherit the alias... but I don't think it ever tries to use it.

Looking at:

chrome/browser/resources/plugin_metadata/plugins_linux.json

"adobe-flash-player": {
    "mime_types": [
      "application/futuresplash",
      "application/x-shockwave-flash"
    ],
    "matching_mime_types": [
      "application/futuresplash"
    ],

....

There are a number of places where the chromium code has hardcoded references to "application/x-shockwave-flash" (e.g. chrome/browser/media_galleries/fileapi/native_media_file_util.cc), but no references whatsoever to "application/vnd.adobe.flash.movie".

There is an open bug with Google here:
https://bugs.chromium.org/p/chromium/issues/detail?id=369015

So, which is correct?

In 2013, IANA got a registration for application/vnd.adobe.flash.movie:

http://www.iana.org/assignments/media-types/application/vnd.adobe.flash-movie

In that registration, it claims that it "has been previously seen under the non-standard media type application/x-shockwave-flash", and refers to the latest published specification:

http://www.adobe.com/devnet/swf.html

But that specification says:
"SWF files have the extension .swf and a MIME type of application/x
-shockwave-flash." (SWF FILE FORMAT SPECIFICATION VERSION 19)

However, it seems to predate the IANA registration, the specification was last updated in 2012.

Based on that, I'm inclined to believe that:

A) The published IANA mime type "application/vnd.adobe.flash.movie" is the correct mime type for Flash "SWF" files.
B) The Adobe SWF File Format Specification needs to be updated to reflect the current mime type.
C) Upstream chromium (and possibly the Adobe flash plugin) should be patched to handle files of type "application/vnd.adobe.flash.movie" identically to files of type "application/x-shockwave-flash", so that it will resolve this issue in Chrome.

But, to bring this full circle, we don't ship the flash plugin in Fedora's Chromium package because it is non-free. I strongly encourage you to comment on that Chrome bug report and try to resolve it there.


Note You need to log in before you can comment on or make changes to this bug.