Comments (7)
can you trace through the code to see what's happening?
from node-geoip.
I'll have a deeper look later, it's a little hard with node-webkit because it seems to be quite selective what is showed when debugging
from node-geoip.
throw in some console.log statements in the geoip code
from node-geoip.
Even then node-webkit doesn't seem to log all existing console.log statements (maybe due to the fact i tries to reroute the io stream?)
So far I've determined that the paths to the data files are still correct, haven't been relatively incorrect.
Is there a minimum version of node required?
EDIT
Sorry just realised there was. Node-webkit has been built with
node-webkit v0.10.5
node.js v0.11.13-pre
So that shouldn't be an issue.
from node-geoip.
It appears that when running under node-webkit, around line 330ish, these values are different:
cache4.lastLine = (datSize / cache4.recordSize) - 1;
cache4.lastIP = cache4.mainBuffer.readUInt32BE((cache4.lastLine * cache4.recordSize) + 4);
cache4.firstIP = cache4.mainBuffer.readUInt32BE(0);
console.log(cache4.lastIP);
Terminal based node result shows 3758096383, when in node-webkit, it shows -536870913
from node-geoip.
looks like a difference in how the two types of node read in files from
disk. I know we did have problems with older versions of node (prior to
0.10), so could it be that node-webkit is based off an older version?
from node-geoip.
If issue is still valid, please reopen
from node-geoip.
Related Issues (20)
- ERR_BUFFER_OUT_OF_BOUNDS after automatic update HOT 2
- Re: Database updates HOT 16
- Custom directory in updatedb doesn't work. HOT 6
- Sometimes geoip return null value HOT 3
- returns wrong country for 72.18.74.123 HOT 1
- Update database HOT 1
- 401 Unauthorized when trying to upgrade HOT 8
- Upgrade is extremely slow. HOT 4
- Get the postal / zip code ? HOT 1
- The included data is out of date HOT 2
- remove fs dependency HOT 3
- IP from US but the returned result is from Africa HOT 3
- Incorrect geolocation for non-geolocated IPs HOT 8
- IPv6 not working HOT 4
- Error in getting the Info HOT 2
- Seeking insight into the development process and buffer lookup approach used. HOT 2
- updatedb.js: ERROR: HTTP Request Failed [302 Found]
- Cannot use geoip-lite in next js application HOT 3
- Custom data directory not working HOT 3
- [Request] What to do if we don't need the 'city' database ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-geoip.