Comments (6)
Hi @tessem
I never accounted for users behind a proxy.
From your error message, it looks as though the api
object was never created. Would you mind inspecting the error object and let me know what it says:
var client = require('phonegap-build-api');
client.auth({ username: 'zelda', password: 'tr1f0rce' }, function(e, api) {
console.log(e); // output the error object
});
Does your proxy require authentication as well?
from node-phonegap-build-api.
I have to admit I am fresh with Node.js so the proxy issue was more of a guess than expert knowledge. I do not have to authenticate with the proxy, only proxy host and port. The error shows as follows:
C:\nodejs>node.exe
var client = require('phonegap-build-api');
undefinedundefined
client.auth({ username: '[email protected]', password: 'PxxxWxxx' }, function(e, api) {
... console.log(e); // output the error object
... });
undefined
{ [Error: connect ETIMEDOUT] code: 'ETIMEDOUT', errno: 'ETIMEDOUT', syscall: 'connect' }
Hope this helpes. Thanks for your time.
from node-phonegap-build-api.
Thanks for the info! I think you're right, the connection is timing out because it can't access the proxy.
Tomorrow I'll test the library on Windows (I never have) and add a patch to enable proxy configuration. I'll update this ticket once it's ready.
from node-phonegap-build-api.
Hi @tessem,
I've added support for a proxy server and managed to test it against a local copy of Charles Proxy. The client.auth(...)
function now accepts options.proxy
as the proxy server address.
Can you please update the NPM package to the latest version 0.3.2
and try a sample such as this:
// authenticate against phonegap build
client.auth({ username: '[email protected]', password: 'xxx', proxy: 'http://myproxy.com:8181' }, function(e, api) {
// get your user account information
api.get('/me', function(e, data) {
console.log('error:', e);
console.log('data:', data);
});
});
from node-phonegap-build-api.
Tested successfully.
Thanks for your time !
from node-phonegap-build-api.
Perfect!
from node-phonegap-build-api.
Related Issues (20)
- Implement PUT apps/:id/collaborators/:id
- Implement POST keys/:platform
- Implement DELETE apps/:id
- Implement DELETE apps/:id/collaborators/:id
- Implement DELETE keys/:platform/:id
- Multi-part forms are not supported HOT 1
- Errors are not caught
- File paths do not expand home directory (~)
- File Upload Progress HOT 4
- Phonegap + node js HOT 4
- Application packages download is not working HOT 6
- Wrong hadnling of 302 redirects
- Please update readme.js so that links point to the API documentation HOT 2
- key_id in build options? HOT 2
- Saved Token HOT 3
- node js build API upload error 411 HOT 1
- Add Bithound Badge
- Put app with file option results in 500 errors and non-working app; using phonegap ui does work...
- Build Android without signing
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-phonegap-build-api.