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

Outgoing Webhook fails due to dotted field names in response #7305

Closed
polygox opened this issue Jun 22, 2017 · 0 comments · Fixed by #8413
Closed

Outgoing Webhook fails due to dotted field names in response #7305

polygox opened this issue Jun 22, 2017 · 0 comments · Fixed by #8413

Comments

@polygox
Copy link

polygox commented Jun 22, 2017

Rocket.Chat Version: 0.55.1
Running Instances: 1
DB Replicaset OpLog: Disabled
Node Version: v4.8.1

We use an outgoing Webhook for fetching work item details from Microsoft Team Foundation Server. It reacts on WI and uses the REST API of TFS.

This integration worked with rocket chat in version 0.36.
When we switched to 0.55.1, the webhook succeeds in requesting the information, but is unable to store the response:

[I20170622-10:44:28.065(0) [Integrations ➔ Outgoing WebHook.info Will be executing the Integration "WI-hook" to the url: http://tfs.intra.mycompany.de:8080/tfs/DefaultCollection/_apis/wit/workitems/ 
[I20170622-10:44:28.071(0) prepare_outgoing_request 
[I20170622-10:44:28.153(0) [Integrations ➔ Outgoing WebHook.info Status code for the Integration WI-hook to http://tfs.intra.mycompany.de:8080/tfs/DefaultCollection/_apis/wit/workitems/ is 200
[I20170622-10:44:28.159(0) Exception in callback of async function: MongoError: The dotted field 'System.AreaPath' in 'httpResult.data.fields.System.AreaPath' is not valid for storage.  
    at Object.Future.wait (/app/bundle/programs/server/node_modules/fibers/future.js:449:15)  
    at [object Object].<anonymous> (packages/meteor.js:213:24)  
    at [object Object].MongoConnection.(anonymous function) [as update] (/app/bundle/programs/server/packages/mongo.js:836:49)  
    at Object.<anonymous> (packages/matb33_collection-hooks.js:504:27)  
    at Object.collection.(anonymous function) [as update] (packages/matb33_collection-hooks.js:146:21)  
    at [object Object].update (/app/bundle/programs/server/packages/mongo.js:3886:31)  
    at ModelsBaseDb.update (/app/bundle/programs/server/packages/rocketchat_lib.js:9648:32)  
    at IntegrationHistory.update (/app/bundle/programs/server/packages/rocketchat_lib.js:4211:36)  
    at RocketChatIntegrationHandler.updateHistory (/app/bundle/programs/server/packages/rocketchat_integrations.js:631:42)  
    at /app/bundle/programs/server/packages/rocketchat_integrations.js:1465:12  
    at runWithEnvironment (packages/meteor.js:1176:24)      - - - - -  
    at Function.MongoError.create (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:31:11)  
    at toError (/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:114:22)  
    at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1049:67  
    at /app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/connection/pool.js:455:18  
    at nextTickCallbackWith0Args (node.js:489:9)  
    at process._tickDomainCallback (node.js:459:13)

The response contains dotted fields; examples can be found here
But it did work before. What has changed since version 0.36?
Is there a simple workaround for this problem?

Update: Looks like the difference is the web hook history; as the call stack shows, RocketChatIntegrationHandler.updateHistory causes the the problem. the history did not exist in 0.36 AFAIK. Is it possible to deactivate the history feature (for one web hook or all)?

@polygox polygox changed the title Outgoing TFS integration fails due to dotted field names Outgoing Webhook fails due to dotted field names in response Jun 22, 2017
@rodrigok rodrigok added this to the 0.60.0 milestone Nov 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants