0

On every .js library that needs to be downloaded, I keep getting errors like:

https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js. Unable to determine mime type for jquery-ui.min.js

I've read posts like this one: https://drupal.org/node/1825946 that look similiar, but I can't figure out where to install the patch file since I'm getting errors and nothing ends up being installed or moving past the download faze.

I've found that with more simple make files, if I just get rid of the libraries that are requiring the .js file I can get through everything, without errors, and it will actually install, however I really need to solve this problem because I need these JS libraries.

I'm currently using Drush 6.0 and I've installed all of the stuff that was in this tutorial: https://drupal.org/node/1260084

I got the tutorial to work, but had to comment out media_module and file_entity stuff

I'm using Windows 8 and the mysysgit (mingw32) for my prompt.

EDIT: I created a smaller test.make file to try and debug this. It only has the latest drupal 7 core and libraries for html5bp, jquery, and jqueryui. html5bp seems to be downloading ok.

Here is what is under libraries in my .make file:

; Libraries
; ---------
libraries[html5bp][download][type] = "file"
libraries[html5bp][download][url] = "http://github.com/h5bp/html5-boilerplate/zipball/v3.0.2stripped"
libraries[jquery][download][type] = "file"
libraries[jquery][download][url] = "https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"
libraries[jqueryui][download][type] = "file"
libraries[jqueryui][download][url] = "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"

I ran it with --debug and this is what I got:

(I've omitted the first half for the sake of keeping it short, because everything with the core is working fine already)

Returned from hook drush_pm_download [21.58 sec, 7.66 MB]                [debug]

Command dispatch complete [21.58 sec, 7.64 MB]                          [notice]

Peak memory usage was 9.21 MB [21.58 sec, 7.64 MB]                      [memory]

drupal-7.x-dev downloaded. [57.44 sec, 7.6 MB]                              [ok]

Undefined property: DrushMakeProject_Library::$type                     [notice]

make.project.inc:147 [57.45 sec, 7.5 MB]
Executing: wget --version
  GNU Wget 1.11.4

  Copyright (C) 2008 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later
  <http://www.gnu.org/licenses/gpl.html>.
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

  Originally written by Hrvoje Niksic <hniksic@xemacs.org>.
  Currently maintained by Micah Cowan <micah@cowan.name>.
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = c:\Program Files (x86)\GnuWin32/etc/wgetrc
Executing: wget -q --timeout=30 -O "C:\\Users\\jsmith85\\AppData\\Local\\Temp\\d
owFB52.tmp" http://github.com/h5bp/html5-boilerplate/zipball/v3.0.2stripped
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = c:\Program Files (x86)\GnuWin32/etc/wgetrc
Calling is_readable(C:\Users\jsmith85\AppData\Local\Temp\dowFB52.tmp)    [debug]

[59.1 sec, 7.63 MB]
Calling                                                                  [debug]

is_writable(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa7
2d)
[59.1 sec, 7.64 MB]
Calling rename(C:\Users\jsmith85\AppData\Local\Temp\dowFB52.tmp,         [debug]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/v3.0.2str
ipped)
[59.1 sec, 7.64 MB]
html5bp downloaded from                                                     [ok]

http://github.com/h5bp/html5-boilerplate/zipball/v3.0.2stripped.
[59.1 sec, 7.5 MB]
Examining                                                                [debug]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/v3.0.2str
ipped
headers. [59.1 sec, 7.5 MB]
Mime type for                                                           [notice]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/v3.0.2str
ipped
is application/zip [59.11 sec, 7.51 MB]
Examining                                                                [debug]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/v3.0.2str
ipped
headers. [59.11 sec, 7.51 MB]
Mime type for                                                           [notice]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/v3.0.2str
ipped
is application/zip [59.11 sec, 7.51 MB]
Calling                                                                  [debug]

chdir(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d)
[59.11 sec, 7.51 MB]
Executing: unzip C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5a
caaa72d/v3.0.2stripped -d C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527
621_537a5b0559509
  Archive:  C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa7
2d/v3.0.2stripped
  5f341a34e8a37b8deeb1f416fa2a7b8a0a78638a
     creating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/
   extracting: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/.gitattributes
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/.gitignore
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/.htaccess
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/404.html
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/apple-touch-icon-114x114-precomposed.png
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/apple-touch-icon-57x57-precomposed.png
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/apple-touch-icon-72x72-precomposed.png
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/apple-touch-icon-precomposed.png
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/apple-touch-icon.png
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/crossdomain.xml
     creating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/css/
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/css/style.css
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/favicon.ico
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/humans.txt
     creating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/img/
   extracting: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/img/.gitignore
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/index.html
     creating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/js/
     creating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/js/libs/
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/js/libs/jquery-1.7.1.js
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/js/libs/jquery-1.7.1.min.js
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/js/libs/modernizr-2.5.3.min.js
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/js/plugins.js
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/js/script.js
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/readme.md
    inflating: C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0
559509/h5bp-html5-boilerplate-359a13f/robots.txt
Calling chdir(C:\wamp\www\fit3) [59.39 sec, 7.52 MB]                     [debug]

Calling                                                                  [debug]

drush_delete_dir(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5a
caaa72d/__build__/sites/all/libraries/html5bp,
1) [59.39 sec, 7.52 MB]
Calling                                                                  [debug]

is_readable(C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0559
509/h5bp-html5-boilerplate-359a13f)
[59.39 sec, 7.52 MB]
Calling                                                                  [debug]

is_writable(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa7
2d/__build__/sites/all/libraries)
[59.4 sec, 7.52 MB]
Calling                                                                  [debug]

rename(C:/Users/jsmith85/AppData/Local/Temp/drush_tmp_1400527621_537a5b0559509/h
5bp-html5-boilerplate-359a13f,
C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/__build__
/sites/all/libraries/html5bp)
[59.4 sec, 7.52 MB]
Undefined property: DrushMakeProject_Library::$type                     [notice]

make.project.inc:147 [59.42 sec, 7.53 MB]
Executing: wget -q --timeout=30 -O "C:\\Users\\jsmith85\\AppData\\Local\\Temp\\d
ow300.tmp" https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = c:\Program Files (x86)\GnuWin32/etc/wgetrc
Calling is_readable(C:\Users\jsmith85\AppData\Local\Temp\dow300.tmp)     [debug]

[59.88 sec, 7.62 MB]
Calling                                                                  [debug]

is_writable(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa7
2d)
[59.88 sec, 7.62 MB]
Calling rename(C:\Users\jsmith85\AppData\Local\Temp\dow300.tmp,          [debug]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jquery.mi
n.js)
[59.88 sec, 7.62 MB]
jquery downloaded from                                                      [ok]

https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js.
[59.88 sec, 7.53 MB]
Examining                                                                [debug]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jquery.mi
n.js
headers. [59.88 sec, 7.53 MB]
Unable to determine mime type from header bytes 0x2a2f of               [notice]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jquery.mi
n.js.
[59.88 sec, 7.53 MB]
Examining                                                                [debug]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jquery.mi
n.js
extension. [59.89 sec, 7.53 MB]
Unable to determine mime type for jquery.min.js. [59.89 sec, 7.53 MB]    [error]

Calling                                                                  [debug]

is_readable(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa7
2d/jquery.min.js)
[59.89 sec, 7.53 MB]
Calling                                                                  [debug]

is_writable(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa7
2d/__build__/sites/all/libraries/jquery)
[59.89 sec, 7.53 MB]
Calling                                                                  [debug]

rename(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jq
uery.min.js,
C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/__build__
/sites/all/libraries/jquery/jquery.min.js)
[59.89 sec, 7.54 MB]
Undefined property: DrushMakeProject_Library::$type                     [notice]

make.project.inc:147 [59.9 sec, 7.54 MB]
Executing: wget -q --timeout=30 -O "C:\\Users\\jsmith85\\AppData\\Local\\Temp\\d
ow4E5.tmp" https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.j
s
  SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
  syswgetrc = c:\Program Files (x86)\GnuWin32/etc/wgetrc
Calling is_readable(C:\Users\jsmith85\AppData\Local\Temp\dow4E5.tmp)     [debug]

[60.43 sec, 7.74 MB]
Calling                                                                  [debug]

is_writable(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa7
2d)
[60.43 sec, 7.74 MB]
Calling rename(C:\Users\jsmith85\AppData\Local\Temp\dow4E5.tmp,          [debug]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jquery-ui
.min.js)
[60.43 sec, 7.74 MB]
jqueryui downloaded from                                                    [ok]

https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js.
[60.44 sec, 7.54 MB]
Examining                                                                [debug]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jquery-ui
.min.js
headers. [60.44 sec, 7.55 MB]
Unable to determine mime type from header bytes 0x2a2f of               [notice]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jquery-ui
.min.js.
[60.44 sec, 7.55 MB]
Examining                                                                [debug]

C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jquery-ui
.min.js
extension. [60.44 sec, 7.55 MB]
Unable to determine mime type for jquery-ui.min.js. [60.44 sec, 7.55     [error]

MB]
Calling                                                                  [debug]

is_readable(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa7
2d/jquery-ui.min.js)
[60.44 sec, 7.55 MB]
Calling                                                                  [debug]

is_writable(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa7
2d/__build__/sites/all/libraries/jqueryui)
[60.44 sec, 7.55 MB]
Calling                                                                  [debug]

rename(C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jq
uery-ui.min.js,
C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/__build__
/sites/all/libraries/jqueryui/jquery-ui.min.js)
[60.45 sec, 7.55 MB]
Returned from hook drush_make [60.45 sec, 7.55 MB]                       [debug]

Command dispatch complete [60.45 sec, 7.53 MB]                          [notice]

Peak memory usage was 9.38 MB [60.45 sec, 7.52 MB]                      [memory]
  • If you are using recent drush, there will be no place to apply patches from linked report, as it was fixed on November 3, 2012 and since then code in the patched part is already patched (or was totally rebuilt, rendering patches not applicable). Response headers from ajax.googleapis.com do contain Content-Type text/javascript; charset=UTF-8, so it is not a server issue. Test yourself, maybe your proxy strips this header? – Mołot May 19 '14 at 19:35
  • Thanks for the info, I was driving myself crazy trying to figure out how to add mime_magic to my wamp installation. How do I go about testing my proxy for this? I posted a --debug above and it looks like html5bp is coming through ok (although it throws a notice). – architarious May 19 '14 at 19:58
  • github uses manyadresses and i sometimes have issues because of the redirects ... when i try it with wget, it goes to https://codeload.github.com/h5bp/html5-boilerplate/legacy.zip/v3.0.2stripped , try putting that in your make file ? – mojzis May 19 '14 at 20:23
  • so just to make sure, what do you get for 'drush version` ? – mojzis May 19 '14 at 20:23
  • Drush Version : 6.0 The boilerplate is already going through ok. However, the actual js files are not. I'm thinking it's got to do with the js file-types, like @Molot was mentioning earlier, because those always comeback with errors and, in some cases (like with how views_slideshow calls another make file to download carousel.js) I can't just control it with just my make file. It could very well be the proxy, I just have no idea how to test/fix it beyond drush --debug. I'm working on a college network btw, however I've not had any problems with drush, git or pulling down data before. – architarious May 19 '14 at 21:03
0

In a succesful run of drush make, the message may be:

Mime type for /tmp/make_tmp_1403284094_53a46a7e2ceaf/jquery.min.js is text/html

In the log you posted, drush make tries to examine the file headers to try and determine the mime type for the file:

Examining C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jquery-ui
.min.js headers.
Unable to determine mime type from header bytes 0x2a2f of C:/Users/jsmith85/AppData/Local/Temp/make_tmp_1400527562_537a5acaaa72d/jquery-ui
.min.js.

This happens when your php has no fileinfo support, and drush tries to guess what's the mime type (link to the related function).

You can verify if you're instalaltion has fileinfo available this way:

$ php -i |grep fileinfo
fileinfo
fileinfo support => enabled

As for installation instructions, from PHP's fileinfo installation page:

Windows users must include the bundled php_fileinfo.dll DLL file in php.ini to enable this extension.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.