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

TypeError: Cannot read property 'raw_author' of undefined on commit hook #17

Open
anton-siardziuk opened this issue Mar 26, 2015 · 3 comments
Labels

Comments

@anton-siardziuk
Copy link

When I push new branch, or merge this branch to staging, eveything works fine.

When I try to push to master fast-forwarded merge from staging, I got this in logs:

2015-03-26T07:03:52.531Z - error: TypeError: Cannot read property 'raw_author' of undefined
    at postPayload (/usr/local/lib/node_modules/strider/node_modules/strider-bitbucket/lib/api.js:154:34)
    at Object.startCommitJob (/usr/local/lib/node_modules/strider/node_modules/strider-bitbucket/lib/api.js:182:14)
    at /usr/local/lib/node_modules/strider/node_modules/strider-bitbucket/webapp.js:187:11
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/strider/node_modules/express/lib/router/layer.js:82:5)
    at next (/usr/local/lib/node_modules/strider/node_modules/express/lib/router/route.js:110:13)
    at projectProvider (/usr/local/lib/node_modules/strider/lib/middleware.js:123:3)
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/strider/node_modules/express/lib/router/layer.js:82:5)
    at next (/usr/local/lib/node_modules/strider/node_modules/express/lib/router/route.js:110:13)
    at Promise.<anonymous> (/usr/local/lib/node_modules/strider/lib/middleware.js:249:7)
    at Promise.<anonymous> (/usr/local/lib/node_modules/strider/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)
    at Promise.EventEmitter.emit (events.js:95:17)
    at Promise.emit (/usr/local/lib/node_modules/strider/node_modules/mongoose/node_modules/mpromise/lib/promise.js:84:38)
    at Promise.fulfill (/usr/local/lib/node_modules/strider/node_modules/mongoose/node_modules/mpromise/lib/promise.js:97:20)
    at Promise.resolve (/usr/local/lib/node_modules/strider/node_modules/mongoose/lib/promise.js:114:23)
    at Promise.<anonymous> (/usr/local/lib/node_modules/strider/node_modules/mongoose/node_modules/mpromise/lib/promise.js:177:8)
    at Promise.EventEmitter.emit (events.js:95:17)
POST /<project/repo>/api/bitbucket/commit/<secret> 500 33.957 ms - -
@chevett
Copy link

chevett commented Jun 10, 2015

I am having the same problem here. I push to dev branch. Then if it all looks good I push to master, but strider fails with the raw_author message.

@chevett
Copy link

chevett commented Jun 10, 2015

This appears to be a bug with bitbucket. The commits array from bitbucket is empty, so there is no way to tell strider what to build.

There appears to be a new webhooks api from bitbucket. Perhaps that works correctly?

svenvarkel pushed a commit to svenvarkel/strider-bitbucket that referenced this issue May 6, 2016
svenvarkel pushed a commit to svenvarkel/strider-bitbucket that referenced this issue May 6, 2016
svenvarkel pushed a commit to svenvarkel/strider-bitbucket that referenced this issue May 6, 2016
svenvarkel pushed a commit to svenvarkel/strider-bitbucket that referenced this issue May 6, 2016
svenvarkel pushed a commit to svenvarkel/strider-bitbucket that referenced this issue May 6, 2016
@svenvarkel
Copy link

svenvarkel commented May 6, 2016

I'm able to reproduce this error so that I make 2 commits and pushes to the same projects to different branches. It occurs after 2nd push.

The order of pushes does not matter. It fails on the 2nd push every time.

--- (after searching and debugging around) ---

I found the reason of this problem:

  1. it occurs after merging/pushing the same commit to multiple branches
  2. BitBucket API seems to be sending ONE message per commit with proper payload

this Strider API gets notified with proper payload only on the first event and with empty commit payload on subsequent push events.

The logic of commit triggers must be changed to cope with this (thinking)

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

No branches or pull requests

4 participants