Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dst parameter not present #43

Closed
leonyu opened this issue Jun 28, 2016 · 4 comments
Closed

dst parameter not present #43

leonyu opened this issue Jun 28, 2016 · 4 comments

Comments

@leonyu
Copy link

leonyu commented Jun 28, 2016

Intermittent dst parameter not present error for send_message on OSX. Only solution is reinstall node_module.

Node.js 6

Error: the object {
  "api_id": "de3aa25c-3d6f-11e6-9264-22000ae40186"
  "error": "dst parameter not present"
} was thrown, throw an Error :)

Does not appear to happen on Linux at all.

@cachrisman
Copy link

can you post the code you use to send the message? what version of the plivo-node library are you using?

@leonyu
Copy link
Author

leonyu commented Jun 28, 2016

Found the bug, it would appear it is an incompatibility issue with request versions. And when request is being specified as devDependencies, it would not pull down a separate older version for plivo.

Here's how to reproduce it:

package.json

{
  "dependencies": {
    "plivo": "^0.3.3"
  },
  "devDependencies": {
    "request": "^2.72.0"
  }
}

test.js

const plivo = require('plivo');

const config = {
    PLIVO_AUTH_ID: 'XXXXXXXXXX',
    PLIVO_AUTH_TOKEN: 'XXXXXXXXXX',
    PLIVO_SRC_TEL: 'XXXXXXXXXX',
};


const api = plivo.RestAPI({
authId: config.PLIVO_AUTH_ID,
authToken: config.PLIVO_AUTH_TOKEN,
});
api.send_message({
    src: config.PLIVO_SRC_TEL,
    dst: 'XXXXXXXXXX',
    text: 'test sms'
}, function (status, response) {
    if (status >= 400) {
    console.error(response);
    } else {
    console.log(response);
    }
});

@leonyu
Copy link
Author

leonyu commented Jun 28, 2016

NPM bug: npm/npm#10277

@plivo-sdks
Copy link
Contributor

This issue has been marked as stale because it has not had recent activity and is now closed. Please open the issue if the solution is not found yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants