Comments (9)
I also have this kind of issue after a push on github:
TypeError: Cannot call method 'indexOf' of undefined
at pushJob (/home/strider/strider/node_modules/strider-github/lib/webhooks.js:126:19)
at startFromCommit (/home/strider/strider/node_modules/strider-github/lib/webhooks.js:42:16)
at receiveWebhook (/home/strider/strider/node_modules/strider-github/lib/webhooks.js:222:3)
at callbacks (/home/strider/strider/node_modules/express/lib/router/index.js:164:37)
at projectProvider (/home/strider/strider/lib/middleware.js:107:3)
at callbacks (/home/strider/strider/node_modules/express/lib/router/index.js:164:37)
at Promise.<anonymous> (/home/strider/strider/lib/middleware.js:201:5)
at Promise.<anonymous> (/home/strider/strider/node_modules/mongoose/node_modules/mpromise/lib/promise.js:162:8)
at Promise.EventEmitter.emit (events.js:95:17)
at Promise.emit (/home/strider/strider/node_modules/mongoose/node_modules/mpromise/lib/promise.js:79:38)
So it is caused by this line:
if (payload.ref.indexOf('refs/heads/') === 0) {
branchname = payload.ref.substring('refs/heads/'.length)
ref = {
branch: branchname,
id: payload.after
}
} else {
although, in the payload in the request, I have the ref property
"ref": "refs/heads/jelix-1.6.x",
from strider-github.
@laurentj That was fixed by #16 Unless I'm mistaken :)
from strider-github.
@oliversalzburg yes, you're right. I didn't saw the fix about JSON.parse...
from strider-github.
Latest HEAD of strider-github is now on npm as v1.2.2. But you can confirm that there is still an issue with Github web hooks?
from strider-github.
@niallo Our setup seems to work fine now. I think the problem I was seeing is only related to that initial ping sent by GitHub when the webhook is set up.
from strider-github.
Same error this side, maybe npm
version is outdated?
from strider-github.
@cusspvz did you solve the issue?
from strider-github.
Yes, I don't quite remember this but things are working flawless at the time.
from strider-github.
Thanks @cusspvz
from strider-github.
Related Issues (20)
- Error creating project (Failed to setup repo: Bad status code: 401) HOT 2
- getting this working with github enterprise HOT 10
- sendJob should return true, because if we reach that point in the code, the job has been successfully created?
- Github auth callback url issue HOT 22
- Please update version on npm to 2.2.0 HOT 5
- Setting up a private project I can access but do not own HOT 3
- Fix tests
- File version mismatch on npm install HOT 1
- Allow specification of APP_ID, SECRET, DOMAIN, ENDPOINT per account HOT 1
- webhooks.js expecting objects to exist that do not HOT 2
- Use SSH authentication instead of HTTPS HOT 3
- Unable to 'run' new projects due to ssh failure (publickey) HOT 10
- Delete branch HOT 12
- Strider fails to install deploy key
- Strider build 'undefined' branch when tag is pushed HOT 4
- Plugin crashes when pull request has merge conflict HOT 2
- Webhook error on release HOT 2
- Git Clone Invalid Syntax HOT 1
- git clone fails HOT 9
- Question: Do you need an email address for Github to work? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strider-github.