karma-ng-html2js-preprocessor icon indicating copy to clipboard operation
karma-ng-html2js-preprocessor copied to clipboard

Unit test runs in PhantomJS but in chrome throws error RangeError: Maximum call stack size exceeded

Open karthikv-26 opened this issue 8 years ago • 3 comments

Using module('templates'); in unit test case throws the below error for below chrome version. Chrome 60.0.3112 (Windows 7 0.0.0) RangeError: Maximum call stack size exceeded at Object.invoke (bower_components/angular/angular.js:4718:19) at bower_components/angular/angular.js:4526:62 at forEach (bower_components/angular/angular.js:321:20) at Object.createInjector [as injector] (bower_components/angular/angular.js:4526:3) at Object.WorkFn (bower_components/angular-mocks/angular-mocks.js:3120:52)

Same works in Phantom JS browser.

karthikv-26 avatar Aug 09 '17 17:08 karthikv-26

Also seeing this issue with Chrome Version 60.0.3112.101 on Windows 10:

RangeError: Maximum call stack size exceeded at Object.invoke (lib/angular/angular.js:4771:19) at lib/angular/angular.js:4578:62 at forEach (lib/angular/angular.js:325:20) at Object.createInjector [as injector] (lib/angular/angular.js:4578:3)

Code works in Firefox as well as PhantomJS.

bbmena avatar Aug 23 '17 19:08 bbmena

The same situation with Chrome 61.0.3163.79 on Ubuntu 16.04.

jkordas avatar Sep 13 '17 09:09 jkordas

I found the cause of this bug. In my case it was html report file generated by eslint-html-reporter. I have accidentally added path with this file to files array in my karma config. It appears that karma-ng-html2js-preprocessor cannot handle this file while running in chrome.

jkordas avatar Sep 13 '17 09:09 jkordas