Coder Social home page Coder Social logo

Comments (7)

bluesmoon avatar bluesmoon commented on August 15, 2024

can you trace through the code to see what's happening?

from node-geoip.

isdampe avatar isdampe commented on August 15, 2024

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.

bluesmoon avatar bluesmoon commented on August 15, 2024

throw in some console.log statements in the geoip code

from node-geoip.

isdampe avatar isdampe commented on August 15, 2024

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.

isdampe avatar isdampe commented on August 15, 2024

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.

bluesmoon avatar bluesmoon commented on August 15, 2024

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.

ar2rsawseen avatar ar2rsawseen commented on August 15, 2024

If issue is still valid, please reopen

from node-geoip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.