jsforce / jsforce/jsforce-ajax-proxy

timeout and login decline after attempting to create connection while on corporate proxy

Open
#7 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
50
Forks
45
PR merge metrics
No merged PRs in 30d

Description

Hello,

I have jsforce-ajax-proxy running in the background, but when I create a connection in my JSForce app as such:

var conn = new jsforce.Connection({
    loginUrl : 'https://test.salesforce.com',
    proxyUrl : 'http://localhost:3123/proxy/'
});

and do a login as such:

conn.login(user, (pass+token), function(err, userInfo) {
    console.log("DEBUG");
    if (err) {
        return console.error(err);
    }

I do not even get my console logging statement as it hangs. Eventually, after a LONG while, I get a timeout error:

POST http://localhost:3123/proxy?(some number here) net::ERR_EMPTY_RESPONSE
DEBUG
Error: Access Declined(…)

This does not happen at all when I am not under the proxy (and my app works fine), but I would like this to work behind a proxy. Is there a setting I can apply to do this, such as setting an http proxy variable? If it helps, I am behind something that looks like user:pass@proxy.company.com:port_id.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing conn.login with the shown proxyUrl through the corporate proxy, including its user:pass@host:port form, and inspect the jsforce-ajax-proxy request path. Done means the login completes behind the proxy without the timeout, ERR_EMPTY_RESPONSE, or Access Declined error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.