chern123's avatar

OTS parsing error: invalid version tag

After deploying to a live server (set up on a 'develop' branch, local not prod) I found that bootstrap fonts were not being loaded correctly. This seems to work fine on my local environment...

Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.woff2
/#/:1 OTS parsing error: invalid version tag
/#/:1 Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.woff2
/#/:1 OTS parsing error: invalid version tag
/#/:1 Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.woff
/#/:1 OTS parsing error: invalid version tag
/#/:1 Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.woff
/#/:1 OTS parsing error: invalid version tag
/#/:1 Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.ttf
/#/:1 OTS parsing error: invalid version tag
/#/:1 Failed to decode downloaded font: http://dev.test.com/fonts/glyphicons-halflings-regular.ttf
/#/:1 OTS parsing error: invalid version tag

And in my gulpfile:

    mix.copy('node_modules/bootstrap/dist/fonts', 'public/build/fonts');
    mix.copy('node_modules/font-awesome/fonts', 'public/build/fonts');

Local webpack.config.js:


module.exports = {
    entry: __dirname + "/index.js",
    output: {
        path: __dirname + "/",
        filename: "specs.js"
    },
    module: {
        loaders: [
            { test: /.js/, exclude: /node_modules/, loader: 'babel', query: {presets: [['es2015', {modules: false}]]}},
            { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&minetype=application/font-woff" },
            { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" }
        ]
    }
};

Any idea on what the culprit may be? Not sure why the fonts aren't being loaded.

0 likes
2 replies
ejdelmonico's avatar
Level 53

It could be the old issue with relative vs absolute paths. Check your leading slashes.

1 like
chern123's avatar

I realized I changed the paths, but they were set up for a project using versioning (and I am not). Thanks!

Please or to participate in this conversation.