GithubHelp home page GithubHelp logo

Comments (6)

asnowfix avatar asnowfix commented on June 8, 2024

@brianleroux @mwbrooks indeed api.get() result is a zero bytes android.apk.

from node-phonegap-build-api.

mwbrooks avatar mwbrooks commented on June 8, 2024

Thanks @adicherafik @snowfix! I'll take a look at this in a few hours.

from node-phonegap-build-api.

mwbrooks avatar mwbrooks commented on June 8, 2024

Hmm... I'm having trouble reproducing this issue. Running the above code or the get.apps.id.platform.js example will download the android.apk with the correct number of bytes (and it installs okay).

A few ideas that come to mind:

  • Are you using version 0.3.3 of the library?
  • Does your account have access to that app ID?
  • Perhaps it was a PhoneGap/Build hiccup? Can you try rerunning the example again?

from node-phonegap-build-api.

asnowfix avatar asnowfix commented on June 8, 2024

Indeed @mwbrooks , this was a temporary build.phonegap.com issue: today the download takes place normally:

$ node download.js 
$ ls -al android.apk 
-rw-r--r--  1 kowalskif  staff  356441 Jun  6 08:45 android.apk

Thanks to have looked into this. We will try to handle the time-out case as a standard error condition. BTW, we were indeed using 0.3.3. You can consider the issue closed.

from node-phonegap-build-api.

asnowfix avatar asnowfix commented on June 8, 2024

BTW, I do not have the necessary privileges to close the issue.

from node-phonegap-build-api.

mwbrooks avatar mwbrooks commented on June 8, 2024

As a heads up, the api object (and helper functions) map all options to request.

So, you can use the timeout option supported by request instead of implementing your own.

Example:

// timeout request after 30 seconds
api.get('/apps/427391/android', { timeout: 30000 }).pipe(fs.createWriteStream('android.apk'));

from node-phonegap-build-api.

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.