H5P crashing browser when download link clicked

Submitted by thomas.kramer on Thu, 07/27/2017 - 20:22

Hi

I have created a Drupal 7 site and successfully installed the H5P modules. Most every thing works well. However, when I click on the download link on any content I created it crashes the browser. Using Chrome on a Mac. Please see attached pic.

Tom

BV52

Fri, 07/28/2017 - 07:15

Permalink

Hi Tom,I was able to

Hi Tom,

I was able to reproduce the problem both on Chrome and Safari (works in Firefox). I filed a report on this, you can follow it here. I also attached a screenshot of what I am seeing on my end. Please confirm if this is the same scenario that you have. If not please re-attach your screenshot.

-BV52

thomas.kramer

Fri, 07/28/2017 - 17:02

Permalink

Drupal 7 Crashing Browser

Hi BVV52:

Yes, I can confirm that is the same that I have. Thanks for the help.

Tom

papi Jo

Mon, 04/02/2018 - 23:08

Permalink

I have the same problem.

I have the same problem. Looking forward to a fix.

BV52

Tue, 04/03/2018 - 07:38

Permalink

I have updated the ticket to

I have updated the ticket to include your report.

-BV52

falcon

Tue, 04/03/2018 - 10:37

Permalink

H5P.org is a Drupal 7 site.

H5P.org is a Drupal 7 site. Do you experience the same problem here with the latest version of Chrome? (I don't)

papi Jo

Tue, 04/03/2018 - 11:27

Permalink

works fine on H5P.org

works fine on H5P.org

crashes with following settings:

Chrome Version 65.0.3325.181 (Build officiel) (64 bits)

drupal 7.58

H5P 7.x-1.34

on both local host and online site

BV52

Thu, 04/05/2018 - 03:47

Permalink

Hi papi Jo,Thank you I've

Hi papi Jo,

Thank you I've added these information to the ticket.

-BV52

falcon

Thu, 04/05/2018 - 10:43

Permalink

Is it possible for you to

Is it possible for you to provide a link to the online site where it fails?

otacke

Wed, 04/11/2018 - 11:47

Permalink

Hey guys!Sorry for not

Hey guys!

Sorry for not kicking in earlier: Are you sure that your servers are set up properly? H5P is not crashing, but your servers seem to be sending the wrong MIME type, so the browser displays the H5P file (which is a ZIP file but will not necessarily be detected as such) in the browser.

You should be able to get rid of the problem by setting an appropriate MIME type on your servers (e.g. for Apache in mime.types). Adding

application/x-h5p h5p

to the list of MIME types should do the trick. If you want to be really ;-) sure, you could also add/update

application/zip zip h5p
application/x-zip-compressed h5p

papi Jo

Wed, 04/11/2018 - 15:44

Permalink

Hi Oliver!Your solution does

Hi Oliver!

Your solution does not explain why the download goes OK on the other browsers but fails on Google Chrome. Anyway, I added the mime types you suggest to my local machine apache mime.types file and the H5P Download works OK now for Google Chrome. However I do not have an access to my web provider's apache mime.type options, of course, so back to square one!

otacke

Thu, 04/12/2018 - 09:17

Permalink

That's because browsers do

That's because browsers do not come with the exact same set of MIME type definitions, and they may handle "unknown" types sent by servers differently.

You can also set MIME types in .htaccess files.

papi Jo

Thu, 04/12/2018 - 16:34

Permalink

Thanks Oliver,Putting :

Thanks Oliver,

Putting : AddType application/x-h5p h5p in an .htaccess file at the root of my online server web folder did the trick! Thanks again for your help.

otacke

Thu, 04/12/2018 - 23:45

Permalink

You're welcome!

You're welcome!

Enkerli

Fri, 01/07/2022 - 21:24

Permalink

AddType to .htaccess Trick

Worked for me as well!

Sounds like advice we should have in a convenient location. Almost qualifies as FAQ material. Especially since keywords aren't easy to figure out.

Was preparing for a presentation about offline H5P (and PressBooks) and this issue really tripped me until I stumbled upon Oliver's reply in another thread.