IE(10) bug: Uint8ClampedArray is undefined


So, yet again, I am running into IE problems! :frowning:
IE10 on Win7, packages and package.json can be found here, all working properly on proper browsers! :wink:

I can launch the app on IE, all is fine, but if I want to insert something into a Mongo collection directly on the client (–> minimongo) with a callback function (UPDATE: Does not matter if write it in arrow syntax or ES5 style), the code breaks on IE:

'Uint8ClampedArray' is undefined in modules.js

If the debugger is correct, it is in this codeblock:

function isObjectWeShouldTraverse(val) {
  if (val !== Object(val)) return false;
  // There are some object types that we know we shouldn't traverse because
  // they will often result in overflows and it makes no sense to validate them.
  if (val instanceof Date) return false;
  if (val instanceof Int8Array) return false;
  if (val instanceof Uint8Array) return false; 
  if (val instanceof Uint8ClampedArray) return false; 
  if (val instanceof Int16Array) return false;
  if (val instanceof Uint16Array) return false;
  if (val instanceof Int32Array) return false;
  if (val instanceof Uint32Array) return false;
  if (val instanceof Float32Array) return false;
  if (val instanceof Float64Array) return false;

  return true;

When I check Uint8ClampedArray in the IE JS console, it is indeed undefined, but curiously, also just entering Uint8Array in the console returns an error:

Array.prototype.toString: 'this' is null or undefined

It seems to me that this actually breaks the code at some point. according to IE debugger, this error originates from here (last line, return fn.apply(that, arguments);):

//                                                                                                                     //
// node_modules/core-js/modules/_ctx.js                                                                                //
//                                                                                                                     //
// optional / simple context binding                                                                                   // 1
var aFunction = require('./_a-function');                                                                              // 2
module.exports = function(fn, that, length){                                                                           // 3
  aFunction(fn);                                                                                                       // 4
  if(that === undefined)return fn;                                                                                     // 5
  switch(length){                                                                                                      // 6
    case 1: return function(a){                                                                                        // 7
      return, a);                                                                                         // 8
    };                                                                                                                 // 9
    case 2: return function(a, b){                                                                                     // 10
      return, a, b);                                                                                      // 11
    };                                                                                                                 // 12
    case 3: return function(a, b, c){                                                                                  // 13
      return, a, b, c);                                                                                   // 14
    };                                                                                                                 // 15
  }                                                                                                                    // 16
  return function(/* ...args */){                                                                                      // 17
    return fn.apply(that, arguments);                                                                                  // 18
  };                                                                                                                   // 19
};                                                                                                                     // 20

Can somebody help? I desperately need my app to work on IE10 and 11 (9 would be great) … any ideas on this?

best, Patrick


What version of Meteor are you using (from .meteor/release)? What version of meteor-node-stubs do you actually have installed (meteor npm ls meteor-node-stubs)?

Instead of providing bits and pieces of your problem, can you just share a basic reproduction in the form of a Meteor application published to GitHub? :slight_smile:


It is the most current v1.5. meteor npm ls meteor-node-stubs gives me meteor-node-stubs@0.2.11.
Don’t know how easy it would be to make a simple app to reproduce the error but in any case:

The error originates from this file of the npm package simpl-schema: click

As this package is used to validate the obj which should inserted into the DB any time, I can’t insert anything into my (mini)mongo DB anymore. Workaround is to use the older aldeed:collection2 package (not maintained anymore).

Why the core-js shim for Uint8Array and Uint8ClampedArray isn’t working is beyond me, but I think that’s the root of the problem.

Any ideas?! :slight_smile:


Hi klabauter,

Did you get around to fixing this? I am facing the same issue with all IE browsers upto IE 11 when calling methods from the client using mdg-validated-method package.

If we call the method using, it works fine.


Unfortunately no! The only way I could fix this was by NOT using simpl-schema anymore, but the older meteor package simple-schema. Couldn’t find any other solution.