Giter Site home page Giter Site logo

Comments (5)

1j01 avatar 1j01 commented on May 29, 2024

I am also having this problem. I added some logging at the end of lib/index.js:

(function(){
    var addLoggers = function(o, n){
        for(var k in o){
            (function(k){
                var v = o[k];
                if(typeof v === "function"){
                    o[k] = function(){
                        console.log("call", n+k, "with", Array.apply(null, arguments));
                        return v.apply(this, arguments);
                    };
                }
            })(k);
        }
    };
    addLoggers(NwBuilder.prototype, "NwBuilder#");
    addLoggers(Downloader, "Downloader.");
})();

and got this output:

call NwBuilder#on with [ 'log', [Function] ]
call NwBuilder#run with []
call NwBuilder#checkFiles with []
call NwBuilder#checkVersions with [ undefined ]
call NwBuilder#emit with [ 'log', 'Using v0.10.' ]
Using v0.10.
call NwBuilder#downloadNodeWebkit with [ { version: '0.10.',
    platforms:
     { win: 'v0.10./node-webkit-v0.10.-win-ia32.zip',
       osx: 'v0.10./node-webkit-v0.10.-osx-ia32.zip',
       linux32: 'v0.10./node-webkit-v0.10.-linux-ia32.tar.gz',
       linux64: 'v0.10./node-webkit-v0.10.-linux-x64.tar.gz' } } ]
call NwBuilder#emit with [ 'log',
  'Create cache folder in C:\\Users\\Isaiah\\Documents\\GitHub\\pesterchum\\node_modules\\node-webkit-builder\\cache\\0.10.' ]
Create cache folder in C:\Users\Isaiah\Documents\GitHub\pesterchum\node_modules\node-webkit-builder\cache\0.10.
call Downloader.checkCache with [ 'C:\\Users\\Isaiah\\Documents\\GitHub\\pesterchum\\node_modules\\node-webkit-builder\\cache\\0.10.\\win',
  [ 'nw.exe',
    'ffmpegsumo.dll',
    'icudt.dll',
    'libEGL.dll',
    'libGLESv2.dll',
    'nw.pak' ] ]
call Downloader.downloadAndUnpack with [ 'C:\\Users\\Isaiah\\Documents\\GitHub\\pesterchum\\node_modules\\node-webkit-builder\\cache\\0.10.\\win',
  'http://dl.node-webkit.org/v0.10./node-webkit-v0.10.-win-ia32.zip' ]
call NwBuilder#emit with [ 'log',
  'Downloading: http://dl.node-webkit.org/v0.10./node-webkit-v0.10.-win-ia32.zip' ]
|Downloading: http://dl.node-webkit.org/v0.10./node-webkit-v0.10.-win-ia32.zip
call Downloader.extractZip with [ 'C:\\Users\\Isaiah\\AppData\\Local\\Temp\\s-114616-10788-19heofp',
  'C:\\Users\\Isaiah\\Documents\\GitHub\\pesterchum\\node_modules\\node-webkit-builder\\cache\\0.10.\\win' ]

The last thing called is Downloader.extractZip which basically just interfaces with DecompressZip.
DecompressZip is an external dependency which was somewhat recently updated!

from nw-builder.

1j01 avatar 1j01 commented on May 29, 2024

Further debugging...

.........
call DecompressZip#findEndOfDirectory with [ <Buffer 3c 21 44 BL AB LA BL AB LA..........> ]
call DecompressZip#emit with [ 'error',
  [Error: Could not find the End of Central Directory Record] ]
call DecompressZip#closeFile with []

DecompressZip is emitting an error event.
.on('error', done.reject) doesn't work. Replacing it with .on('error', function(err){ done.reject(err); }) let's it show the error.

Here's the Error: Could not find the End of Central Directory Record

Well that's my part. 🐟

from nw-builder.

andymerskin avatar andymerskin commented on May 29, 2024

I'm also having the same problem and figured out that the version number it's trying to fetch does not exist.

It should be 0.10.0 not 0.10. (notice the trailing dot).

If you paste the download path it's attempting to fetch and add a 0, it works:
from: http://dl.node-webkit.org/v0.10./node-webkit-v0.10.-osx-ia32.zip
to: http://dl.node-webkit.org/v0.10.0/node-webkit-v0.10.0-osx-ia32.zip

I have no idea how the issue would be corrected for the builder tool, but since it's getting a 404, it simply exits the script and doesn't respond to the error.

I have also tried to force version 0.10.0 with -v 0.10.0 and -v "0.10.0" to no avail. 😦

Here are the available versions:
http://dl.node-webkit.org/

from nw-builder.

1j01 avatar 1j01 commented on May 29, 2024

Aha, that makes sense. So it's trying to decompress nothing, and that's why it was getting that error. There really should be more error handling in this module. A lot more, probably.
And sure enough, there's a 0.10. folder in cache.
...
I linked a simple app with my fork to try and see what's going on, but now that part's working (it's fetching 0.10.0) and it's failing when trying to execute (when running) or copy (when building) nw.exe, because the path is missing the node-webkit-v0.10.0-win-ia32 part.
...
Either way, a bit of error handling: #36

from nw-builder.

gabepaez avatar gabepaez commented on May 29, 2024

This is fixed in the latest build on npm

from nw-builder.

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.