Dogfalo / materialize

Materialize, a CSS Framework based on Material Design
https://materializecss.com
MIT License
38.87k stars 4.74k forks source link

Meteor: Failed to decode downloaded font #2217

Closed PolGuixe closed 8 years ago

PolGuixe commented 8 years ago

I am getting the following warnings: Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/dist/font/roboto/Roboto-Regular.woff2 (index):1 OTS parsing error: invalid version tag (index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/dist/font/roboto/Roboto-Regular.woff (index):1 OTS parsing error: invalid version tag (index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/dist/font/roboto/Roboto-Regular.ttf (index):1 OTS parsing error: invalid version tag

These are the packages I have installed in the project:

accounts-password 1.1.3* Password support for accounts aldeed:autoform 5.7.1 Easily create forms with automatic in... aldeed:collection2 2.5.0 Automatic validation of insert and up... autopublish 1.0.4 (For prototyping only) Publish the en... blaze-html-templates 1.0.1 Compile HTML templates into reactive ... cfs:gridfs 0.0.33 GridFS storage adapter for CollectionFS cfs:s3 0.1.3 Amazon Web Services S3 storage adapte... cfs:standard-packages 0.5.9 Filesystem for Meteor, collectionFS check 1.0.6* Check whether a value matches a pattern ecmascript 0.1.5* Compiler plugin that supports ES2015+... ejson 1.0.7 Extended and Extensible JSON library email 1.0.7* Send email messages fortawesome:fontawesome 4.4.0 Font Awesome (official): 500+ scalabl... fourseven:scss 3.3.3_3 Style with attitude. Sass and SCSS ... insecure 1.0.4 (For prototyping only) Allow all data... iron:router 1.0.12 Routing specifically designed for Me... jquery 1.11.4 Manipulate the DOM using CSS selectors limemakers:three 0.71.0+ Three.js core library + several usef... logging 1.0.8 Logging facility. materialize:materialize 0.97.2+ Materialize (official): A modern res... meteor-base 1.0.1 Packages that every Meteor app needs meteortoys:allthings 2.1.3 Insanely Handy Development Tools for ... mobile-experience 1.0.1 Packages for a great mobile user expe... mongo 1.1.2* Adaptor for using MongoDB and Minimon... polguixe:meteor-datgui 0.5.1_4 meteor-datgui is a wrapper for mete... random 1.0.4* Random number generator and utilities reload 1.1.4 Reload the page while preserving appl... session 1.1.1 Session variable spacebars 1.0.7 Handlebars-like template language for... standard-minifiers 1.0.1* Standard minifiers used with Meteor a... tracker 1.0.9 Dependency tracker to allow reactive ... useraccounts:iron-routing 1.12.4 UserAccounts package providing route... useraccounts:materialize 1.12.4 Accounts Templates styled for Materi...

Anyone experiencing the same problem?

zenonn37 commented 8 years ago

1+ Yes same issue Version 97.2.

jasongrishkoff commented 8 years ago

+1 same

ghost commented 8 years ago

The problem seems to be with addition of local() in this commit: ce169cb

FelipeRosa commented 8 years ago

Had the same problem. Solved it changing the package.js file.

The changes I made:

PS: I'm using the git version of materialize because it's not working from atmosphere.

rhkina commented 8 years ago

I'm using the git version of materialize also. I've just put the materialize font folder in public folder and it worked.

jasongrishkoff commented 8 years ago

Looks like the newest version just went live on Atmosphere (0.97.2) without resolving this issue.

s7dhansh commented 8 years ago

created a PR with @FelipeRosa fix - https://github.com/Dogfalo/materialize/pull/2272

acburst commented 8 years ago

We are not very experienced with meteor. Can we get more confirmation that this is a working fix?

s7dhansh commented 8 years ago

As the above error hints, the font files are being searched in the dist/fonts folder, but in package.js the font files added are from the top level fonts folder. The package.js file contains all the "asset" files that need to be added to the package. Only those files are then available to Meteor. Since in package.js font was being used instead of dist/font, Meteor was unable to access dist/font as given in the url.

So I have modified those paths in package.js. It resolves this issue.

maarteNNNN commented 8 years ago

@s7dhansh This fixed it for me

manosinistra commented 8 years ago

Hi, sorry, which package.js file are you looking at?

acburst commented 8 years ago

This should've been fixed in the latest release. I'll keep this issue open in case there are still issues with the fonts.

shatyajeet-hk commented 8 years ago

Materialize v0.97.3

I am still getting this issue. screen shot 2015-12-11 at 1 35 06 pm

s7dhansh commented 8 years ago

@shatyajeet-hk can't reproduce. Can you please check your version in .meteor/versions?

MaestroJurko commented 8 years ago

I am still getting this, meteor 1.2.1

s7dhansh commented 8 years ago

@mato75 your materialize version?

nomadts commented 8 years ago

the same issue. Worked fine before updating to Meteor 1.4

Meteor 1.4 materialize:materialize@0.97.7 useraccounts:materialize@1.14.2

(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Regular.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Regular.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Regular.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Regular.woff
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Regular.woff
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Regular.woff
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Medium.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Medium.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Medium.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Thin.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Thin.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Thin.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Light.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Light.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Light.woff2
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Light.woff
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Light.woff
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Light.woff
(index):1 OTS parsing error: invalid version tag
(index):1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Regular.ttf
yanickrochon commented 8 years ago

I also have the same issue in Meteor 1.4. Since everywhere I go it says that I have nothing to do, what's the fix for this?

nomadts commented 8 years ago

@yanickrochon I have solved it by rolling back materialize:materialize package to version 0.97.6. Worked for me

do-n-khanh commented 8 years ago

@bruceLeeOfMeteor I tried to run meteor add materialize:materialize@0.97.6,

but it returns

materialize:materialize added, version 0.97.7

do you know why?

materialize problem

s7dhansh commented 8 years ago

@do-n-khanh Use @= instead of just @

Pugio commented 8 years ago

Rolling back to 0.97.6 fixed for me as well (Meteor 1.4), thanks. Would be nice of course to have it working on the latest version.

nomadts commented 8 years ago

@do-n-khanh type the following: meteor remove materialize:materialize meteor add materialize:materialize@=0.97.6

nomadts commented 8 years ago

@Pugio Glad it helped!

TristanWiley commented 8 years ago

Thanks, just a fyi you spelled materialize wrong @bruceLeeOfMeteor .

ghost commented 8 years ago

This is still an issue. materialize:materialize@0.97.7

Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Bold.woff2
discussions:1 OTS parsing error: invalid version tag
discussions:1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Bold.woff
discussions:1 OTS parsing error: invalid version tag
discussions:1 Failed to decode downloaded font: http://localhost:3000/packages/materialize_materialize/fonts/roboto/Roboto-Bold.ttf
discussions:1 OTS parsing error: invalid version tag
prawee commented 8 years ago

Thank @Pugio and @bruceLeeOfMeteor
working fine for me.

ratacibernetica commented 8 years ago

Confirming same issue with version 0.97.7. Version 0.97.6 works fine

0o-de-lally commented 8 years ago

+1 the issue is introduced in 0.97.7

KoenLav commented 8 years ago

Same issue here!

lefunes commented 7 years ago

Issue still on materialize:materialize@0.97.7

proficiat commented 7 years ago

Same issue! version 0.97.7

jrosseel commented 7 years ago

+1. Issue on 0.97.7

tomscholz commented 7 years ago

Still! v0.97.7 + 0.97.8

PeuKaa commented 7 years ago

+1 for 0.97.8 downgrading 0.97.6 will work

tomscholz commented 7 years ago

@PeuKaa I don't want to downgrade ;D

cphillips89 commented 7 years ago

This is still an issue for v0.97.7 and 0.97.8.

adammoisa commented 7 years ago

Still an issue

tomscholz commented 7 years ago

Gotcha! Found the issue. Boom. Yeah. wuuuuuhu 🤗 . The issue is that in _variables.scss $roboto-font-path: "../fonts/roboto/" !default; is defined, but in the packages.js 'dist/fonts/roboto/Roboto-Bold.ttf', is defined . So you have to change either the path in the packages.js to 'fonts/roboto/Roboto-Bold.ttf', or the fonts path in the_variables.scss to $roboto-font-path: "../dist/fonts/roboto/" !default;

adammoisa commented 7 years ago

Where is the packages.js file?

Best, Adam M. Moisa

On Tue, Dec 13, 2016 at 1:10 PM, Tom notifications@github.com wrote:

Gotcha! Found the issue. Boom. Yeah. wuuuuuhu 🤗 . The issue is that in the _variables.scss file $roboto-font-path: "../fonts/roboto/" !default; But in the packages.js they look for 'dist/fonts/roboto/Roboto-Bold.ttf', . So you have to change either the path in the packages.js to '/fonts/roboto/Roboto-Bold.ttf', or the fonts path in the_variables.scss to $roboto-font-path: "../dist/fonts/roboto/" !default;

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Dogfalo/materialize/issues/2217#issuecomment-266815687, or mute the thread https://github.com/notifications/unsubscribe-auth/AGPm2dLdm10gThc9KXtFn1VVPZVK3oMNks5rHt-ggaJpZM4GWmcr .

tomscholz commented 7 years ago

@adammoisa Aww shit. Clone the materialize repo into the /packages folder inside your project folder. Via shell:

cd /path/to/YOURPROJECTFOLDER
mkdir packages
cd packages
git clone https://github.com/Dogfalo/materialize.git

222222

Then open this file inside the materialize folder in your packages folder. bildschirmfoto 2016-11-29 um 11 06 08 and change

  name: 'materialize:materialize',  // http://atmospherejs.com/materialize/materialize

to something like this:

  name: 'tomscholz:materialize',  // http://atmospherejs.com/materialize/materialize

Then run:

meteor remove materialize:materialize
meteor add tomscholz:materialize

Than follow the instructions here: https://github.com/Dogfalo/materialize/issues/2217#issuecomment-266815687

And when the PR will be accepted, run:

meteor remove tomscholz:materialize
meteor add materialize:materialize

et voilà

tomscholz commented 7 years ago

I created a branch on my fork with all fixes for all the bugs known to happen when using materialize with meteor. You can now clone this branch into your packages folder and rename the packages name in the packages.js described above.

cd /path/to/project/
git clone https://github.com/tomscholz/materialize.git --branch make-metor-great-again --single-branch packages/materialize/

Then open this file inside the materialize folder in your packages folder. bildschirmfoto 2016-11-29 um 11 06 08 and change

  name: 'materialize:materialize',  // http://atmospherejs.com/materialize/materialize

to something like this:

  name: 'tomscholz:materialize',  // http://atmospherejs.com/materialize/materialize

And finally run:

meteor remove materialize:materialize
meteor add tomscholz:materialize
0o-de-lally commented 7 years ago

@Dogfalo I'm up to date with 0.98.0 installed from Meteor Atmosphere. Is there a reason I'm still seeing this warning? I don't think this should be closed.

ilan-schemoul commented 7 years ago

I installed npm version and everything's working seamlessly. Meteor plans to depreciate Atmosphere in favor of npm in any way.

0o-de-lally commented 7 years ago

@NitroBAY can you give more details about how you did imports etc?

ilan-schemoul commented 7 years ago

Sure, I did npm i --save materialize-css. I use sass so I had two choices : 1) In my import.scss (or whatevernameyouwant.scss) in my /client folder do @import "../node_modules/materialize-css/sass/materialize.scss" OR 2) if you want to import only certains sass modules. You put materialize.scss in your client, or you put materialize.scss in /imports and you import it in a .scss file from /client. In the file that you copy paste from node_modules/materialize-css/sass/materialize.scss or from the git repo you replace every single @import "components/" by @import {}/node_modules/ or @import ../node_modules (you put as much as ../ as you need to access from materialize.scss to the root folder). After that you can import only sass modules you want.

I didn't try importing .js yet. EDIT : Not only the Meteor package is buggy but also the npm package, see #1422. This project is good but has so many issues unsolved...

0o-de-lally commented 7 years ago

@NitroBAY I'm struggling with this I can't seem to use @import while using the NPM bundle. Any tips? While processing files with fourseven:scss (for target web.browser): /client/style.scss: Scss compiler error: File to import: {}/node_modules/materialize-css/sass/materialize.scss not found in file: /client/style.scss

rotexhawk commented 7 years ago

Was having the same issue with 0.98.1. This worked for me.

@import '../../node_modules/materialize-css/sass/materialize.scss';

dryhurst commented 6 years ago

Hi everyone, I am having this same issue now with materialize:materialize@0.100.2

It's been exactly two years since this issue was first reported, why are we still seeing this issue? How to fix this?