-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just updated to .13, Cannot read property 'mtime' of undefined #1494
Just updated to .13, Cannot read property 'mtime' of undefined #1494
Comments
Thanks for the report, I will try to fix it in the morning |
What version of node are you running? |
0.12.7 |
for some reason karma-jasmine's new version number is lower than the old one! 0.1.6 is < 0.3.6 so NPM favored the newer one. Does this work with the latest (assuming 0.3.6) |
There was an issue with the tagging of karma-jasmine, as there are two versions, the |
@robertbaker I just tested things, and it seems to work fine for me, could you create a small project that reproduces this error please? |
I'm also getting this error once I updated to On top of that im using requirejs in the tests. I have a version that test with and without requirejs. If I dont run the requirejs tests this error does not occur. @robertbaker are you using requirejs in your tests? If i comment out the requirejs plugin from I checked and the karma-requirejs has been updated last time a year ago. I doubt there are big changes and the internals seem pretty simple. I am using Not sure what to think about this tbh, i cant find the 'mtime' error line, havent tried a node debugger yet, not even sure I can run it with my |
The relevant line is this https://github.com/karma-runner/karma/blob/master/lib/file-list.js#L173 my guess is that the pattern that is checked in the glob isn't found. As requirejs does some strange things when it comes to imports I could imagine that somewhere around there it fails. |
But this simple requirejs example in our integration tests works fine: https://github.com/karma-runner/integration-tests/tree/master/requirejs |
@jonnenauha what os are you running on? |
Win8.1 64bit, node v0.12.5, npm 2.11.2 If anyone else bumps to this until is resolved, I just forced my package.json to the old version. What was missing was forcing karma itself to 0.12.x, if not done something else in the chain was pulling in 0.13 with Force old version(s) with in
|
Thanks @jonnenauha it looks like this has to do something with windows :( I will see what I can find out |
@dignifiedquire just to give you some more information in case it is helpful. I am running Win7, node v0.10.30 and npm1.4.21 |
@jonnenauha I was able to run off of karma-jasmine 0.3.6 |
Could one of you please post a full log output with log level set to |
|
Here is mine
Does looks like you were right. I havent changed the glob strings in a long time. Here is what they look like, I changed the folder names as its a private repo, hope it clarifies anyways :) From
|
I'm on 8.1 x64. |
I was finally able to reproduce this, it seems it's a combination of requirejs + karma@0.13 + windows |
@dignifiedquire I'm not using requirejs. However I am using karma-jspm (trying karma-systemjs atm). My JS is transpiled typescript to ES6. |
Thanks @robertbaker I found the issue, I hope to be pushing a fix out tonight |
@jonnenauha also when I have the fix ready I will cut |
Normalize glob patterns before they are passed to node-glob to avoid issues on windows, where the resolved files and the statCache entries do not match. Closes #1494
Fix was released in |
Can verify this fixed my issue. Thanks.
|
hiya,
Regards. |
@fbengrid could you provide more details? For me this is working fine |
@dignifiedquire sure I don't use requirejs but have my own adapter for the dojo toolkit with its AMD loader. The environment is windows.
breaks karma with the following stack trace:
To resolve the issue and have it working as it was with karma 0.12.x I would need to replace the patterns with the following one:
so splitting the filters works as before, but the grouping them based on the files extension doesn't anymore :( Not sure if you need more information ? EDIT: |
I can't reproduce this with the pattern structure you are describing above. Could I see the adapter code you are using, as my guess is that the issue is related to something in there |
@dignifiedquire sure, i would be surprised if that was the issue since the only thing which has changed is the version of karma.
|
Okay, the adapter seems to have nothing to do with it. Could you do me a big favor and add in your karma version manually the following line onto https://github.com/karma-runner/karma/blob/master/lib/file-list.js#L173 log.debug('Fetching cache', pattern, path)
log.debug('Resolved', Object.keys(mg.statCache)) and then run with log level set to |
Sending you the logs by email (too big to paste here)
The pass.log use the patterns:
|
hiya,
Okay, the adapter seems to have nothing to do with it. Could you do me a big favor and add in your karma version manually the following line onto https://github.com/karma-runner/karma/blob/master/lib/file-list.js#L173log.debug('Fetching cache', pattern, path) |
I think tou sent the email to github instead of to me. my email is dignifiedquire@gmail.com and you can just paste it into gist.github.com if you want |
oups.. |
I've just changed the pattern from
to
and it's working now. |
Good to hear. I found the underlying issue which is related to inconsistencies in node-glob, so it will take a bit till it's fully fixed. Thanks for the detailed report. |
glad to have helped. |
@dignifiedquire fixed my issue as well. |
you're welcome :) |
+1 to @fbengrid's answer. Thanks a lot :) |
you're welcome :) |
I got this issue when running Karma via Gulp via Gradle, using node 5.0.0. Changing the glob syntax didn't work. Instead upgrading node to 5.4.0 solved the problem. |
…re files When serving the fixture files via systemjs.includeFiles, Karma will try to load all fixtures files when Karma starts. This has weird results, for example, .html fixture files are added using a <link> tag, and CSS fixture files will always be present in the DOM for all tests, which is not necessary. So I changed the cfg.src.fixtures property into a detailed pattern object so Karma knows it can serve these files over http, but will not include them in the DOM by default. Next to that, I added support for loading .js fixture files and changed the 'extension' pattern for fixture files to work around this issue: karma-runner/karma#1494 (comment)
I have the same issue using Karma (0.13.3) via Grunt with node (6.0.0). Will open a new issue as this one is closed ( New Issue #2158 ). |
The text was updated successfully, but these errors were encountered: