-
Notifications
You must be signed in to change notification settings - Fork 8
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
getHistoricalCountByArea test fails in newer node versions #20
Comments
I also had this happen on node v0.10.26 on jenkins as well. |
This passes on node v0.10.40 on Travis. An environmental variable tripping us up? |
Sorry, typo: I meant 0.12.6 |
Confirmed, fails on node v0.12.7 in Travis |
@benatwork99 please fix in master and 2.0.x |
WIll do. Looking at the code what was there seems wrong, a slight change will make it more correct. I'll also update node to v12 for cognicity-rem-server, do we want to update node to v12 for cognicity-server? |
I've already bumped it up (at least in 2.0.x) for cognicity-server and cognicity-rem-server to 4.2.1 which is what we use for dev and prod. |
Ok great. I'll update the version Travis uses when I commit so we can see the test pass. |
I've already done that too, and it still fails. https://travis-ci.org/smart-facility/cognicity-server/builds/92194867 |
See 9feeca8 |
I am about to push a fix for this, I notice a build error in the Travis build (expand the 'npm install' section) https://travis-ci.org/smart-facility/cognicity-server/builds/92194867
I see the same build error locally using node 4.x or 5.x. I will look into what this means, it looks like a fatal build error but the build then continues. |
That version of pg depends on a version of nan that has issues with newer nodejs (a common issue - see nodejs/node#2798 ). Safe to disregard that, as well as warnings from lack of postgres libraries—pg will work without native libraries; we do install the native libraries on our dev and prod boxes, see https://github.com/smart-facility/cognicity-server/blob/master/.ebextensions/packages.config for example on AWS EB. |
Closed by 6d331b8 |
FYI I have not fixed on master yet am about to do that now. |
Sorry, caught the 2.0.x commit but forgot about master. Use closes keyword in commit message. |
Description
This is with node v4.1.2 (latest available with homebrew
brew update && brew install node
) but I suspect also common to newer io.js-derived node.js versions across platforms that care about properties being read only. I suspect strict mode is enable now by default and that is throwing the error because of the way those variables are defined.Output of npm test
52 passing (883ms)
1 failing
TypeError: Cannot assign to read only property 'start_time' of ale
at chainQueries (CognicityServer.js:433:21)
at Object.server.getCountByArea (test/testCognicityServer.js:631:4)
at Object.CognicityServer.getHistoricalCountByArea (CognicityServer.js:452:8)
at Context. (test/testCognicityServer.js:642:10)
The text was updated successfully, but these errors were encountered: