Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

phonegapbuild.on('login') never gets called #63

@wildeyes

Description

@wildeyes

And this is the output.

The documentation says I don't have to login manually, I can simply listen to the event that authentication is needed - is this incorrect?

the code:

#!/usr/bin/env node
var phonegapbuild = require('phonegap-build');

phonegapbuild.on('login', function(options, callback) {
        console.log('Logging in...')
    options.username = ...
    options.password = ...
    callback(null, options);
});

var options = { platforms: ['android'], }

console.log('Calling `build` function...')
phonegapbuild.build(options, function(e, data) {
    if (e) error(e)
    else console.log('Success!')
})

const error = (err) => { console.error(err); process.exitCode = 1; }

output:

<html>
<head>
  <title>Page Not Found (404)</title>
  <style type="text/css">

html {
background: #eaeaea url(/ui/imgs/bg-quilted.jpg);
}
body {
font-family: "adobe-clean","Helvetica Neue",Helvetica,Arial,sans-serif;
margin:0px;
}
#homepage-hero {
position: absolute;
left: 0;
right: 0;
height: 480px;
background: #309dc2 url(/images/marketing/cloud.jpg) repeat-x 50% 100%;
text-align: center;
margin-bottom: 32px;
border-bottom: 8px whitesmoke solid;
border-top: 1px solid rgba(5,5,5,0.2);
}
#homepage-hero img {
position: absolute;
left: 50%;
top: 75px;
margin-left: -420px;
width: 350px;
max-width: 100%;
}
@media only screen and (min-width: 760px) {
#homepage-hero {
-webkit-animation: animate-cloud 30s linear infinite;
-moz-animation: animate-cloud 30s linear infinite;
-ms-animation: animate-cloud 30s linear infinite;
-o-animation: animate-cloud 30s linear infinite;
animation: animate-cloud 30s linear infinite;
}
#homepage-hero img {
-webkit-animation: animate-bot 3s ease-in-out infinite;
-moz-animation: animate-bot 3s ease-in-out infinite;
-ms-animation: animate-bot 3s ease-in-out infinite;
-o-animation: animate-bot 3s ease-in-out infinite;
animation: animate-bot 3s ease-in-out infinite;
}
}

#homepage-hero .intro {
position: absolute;
top: 140px;
left: 50%;
margin-left: -20px;
width: 490px;
max-width: 100%;
color: #fff;
font-size: 1.2em;
text-align: center;
font-weight: 300;
font-size:1.2em;
}
#homepage-hero .intro h2 {
margin: 0;
font-size: 1.8em;
font-weight: 300;
}

#homepage-hero .intro h1 {
margin: 0;
font-size: 5.0em;
font-weight: 500;
}

#homepage-hero a {
color: #fff;
}
#homepage-hero a:hover {
font-weight:400;
}

@-webkit-keyframes animate-cloud {
from { background-position: 1000px 100%; }
to { background-position: 0 100%; }
}
@-moz-keyframes animate-cloud {
from { background-position: 1000px 100%; }
to { background-position: 0 100%; }
}
@-ms-keyframes animate-cloud {
from { background-position: 1000px 100%; }
to { background-position: 0 100%; }
}
@-o-keyframes animate-cloud {
from { background-position: 1000px 100%; }
to { background-position: 0 100%; }
}

@-webkit-keyframes animate-bot {
from { margin-top: 0; }
50% { margin-top: 10px; }
to { margin-top: 0; }
}
@-moz-keyframes animate-bot {
from { margin-top: 0; }
50% { margin-top: 10px; }
to { margin-top: 0; }
}
@-ms-keyframes animate-bot {
from { margin-top: 0; }
50% { margin-top: 10px; }
to { margin-top: 0; }
}
@-o-keyframes animate-bot {
from { margin-top: 0; }
50% { margin-top: 10px; }
to { margin-top: 0; }
}

@media only screen and (max-width: 759px) {
#homepage-hero {
padding: 24px 24px 60px;
height: auto;
position: static;
background-size: 500px 242px;
margin-left: -8px;
margin-right: -8px;
min-height: 325px;
}

#homepage-hero img, #homepage-hero .intro {
position: static;
margin: 0;
}

#homepage-hero img {
width: 200px;
position: static;
left: 2%;
}

#homepage-hero .intro {
margin-top: 10px;
width: auto;
}

#homepage-hero h1, h2 {
font-size: 1.8em;
}
}


  </style>
</head>

<body>

  <section id="homepage-hero">

Build Bot Prime

404

Maybe you need to
sign in.

```
at Request._callback (/Users/wie/code/lab/tfd/node_modules/phonegap-build-api/lib/api.js:214:31)
at Request.self.callback (/Users/wie/code/lab/tfd/node_modules/phonegap-build-api/node_modules/request/main.js:122:22)
at emitTwo (events.js:106:13)
at Request.emit (events.js:191:7)
at Request.<anonymous> (/Users/wie/code/lab/tfd/node_modules/phonegap-build-api/node_modules/request/main.js:655:16)
at emitOne (events.js:101:20)
at Request.emit (events.js:188:7)
at IncomingMessage.<anonymous> (/Users/wie/code/lab/tfd/node_modules/phonegap-build-api/node_modules/request/main.js:617:14)
at emitNone (events.js:91:20)
at IncomingMessage.emit (events.js:185:7)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions