hagemt / node-cisco-webex-tools

Convenient scripts for Cisco Webex (using public APIs for Teams, etc.)
https://developer.webex.com/
5 stars 1 forks source link

Abnormal script termination! #51

Open olivierproffit opened 6 years ago

olivierproffit commented 6 years ago

OPROFFIT-M-D2QN:~ oproffit$ cst guest Y2lzY29zcGFyazovL...mE0ZWRlYjE 3KHjws...Ik= Composing the token and signing it: eyJhbGciOiJIUzI1NiIsInR5cCI...xIx4365c2mWPNZRU Logging in using by posting signed JWT to: https://api.ciscospark.com/jwt/login Error: {"message":"The requested JWT issuer does not exist","errors":[{"description":"The requested JWT issuer does not exist"}],"trackingId":"ROUTER_5B7752B4-1306-01BB-5317-806BF1B85317"} at SparkTools.jwtLogin (/Users/oproffit/.nvm/versions/node/v8.10.0/lib/node_modules/ciscospark-tools/support/SparkTools.js:246:9) at at process._tickCallback (internal/process/next_tick.js:188:7) Now sending a message to: oproffit@cisco.com { Error: (tracking ID: ROUTER_5B7752B5-FBF9-01BB-5317-806BF1B85317) Failed to create room. at Function.fromResponse (/Users/oproffit/.nvm/versions/node/v8.10.0/lib/node_modules/ciscospark-tools/support/SparkError.js:16:24) at at process._tickCallback (internal/process/next_tick.js:188:7) body: { message: 'Failed to create room.', errors: [ [Object] ], trackingId: 'ROUTER_5B7752B5-FBF9-01BB-5317-806BF1B85317' }, response: Response { size: 0, timeout: 0, [Symbol(Body internals)]: { body: [Object], disturbed: true, error: null }, [Symbol(Response internals)]: { url: 'https://api.ciscospark.com/v1/messages', status: 400, statusText: 'Bad Request', headers: [Object] } } }

Error: Abnormal script termination! at Object. (/Users/oproffit/.nvm/versions/node/v8.10.0/lib/node_modules/ciscospark-tools/scripts/index.js:20:23) at Module._compile (module.js:652:30) at Object.Module._extensions..js (module.js:663:10) at Module.load (module.js:565:32) at tryModuleLoad (module.js:505:12) at Function.Module._load (module.js:497:3) at Function.Module.runMain (module.js:693:10) at startup (bootstrap_node.js:188:16) at bootstrap_node.js:609:3

Error message(s) above may be due to bugs in the npm package: ciscospark-tools

If so, please file a GitHub issue (with full reproduction steps) here:

https://github.com/hagemt/node-ciscospark-tools/issues

OPROFFIT-M-D2QN:~ oproffit$

olivierproffit commented 6 years ago

The error message is correct {"message":"The requested JWT issuer does not exist" But that can be confusing "Error: Abnormal script termination!" Bottom line this issue is not a big deal since the first error message is correct which is the most important.

hagemt commented 6 years ago

There should be some enhancements made to the guest script(s):

  1. Introduce a try-catch around the login part, so that a neater error message is produced.
  2. Add custom flags to the guest command. (am thinking -n, --name and -s, --subject)