invalid memory address or nil pointer dereference
Hunsu opened this issue · 6 comments
Hunsu commented
DEBU[1721] epoch=1468229169&storyAuthorPHID=PHID-USER-t6ri6rdnpitrxzehpzg2&storyData%5BobjectPHID%5D=PHID-DREV-osf4mldkw5pusskur6rq&storyData%5BtransactionPHIDs%5D%5BPHID-XACT-DREV-2kbgp7ketmerrf4%5D=PHID-XACT-DREV-2kbgp7ketmerrf4&storyData%5BtransactionPHIDs%5D%5BPHID-XACT-DREV-pemd3jkgtrrbl5z%5D=PHID-XACT-DREV-pemd3jkgtrrbl5z&storyID=11614&storyText=sometext&storyType=PhabricatorApplicationTransactionFeedStory
2016/07/12 09:22:20 [Recovery] panic recovered:
POST /v1/feed/receive HTTP/1.1
Host: localhost:8085
Accept: */*
Content-Type: application/x-www-form-urlencoded
runtime error: invalid memory address or nil pointer dereference
.gvm/gos/go1.6/src/runtime/panic.go:426 (0x42d2b9)
.gvm/gos/go1.6/src/runtime/panic.go:45 (0x42b969)
.gvm/gos/go1.6/src/runtime/sigpanic_unix.go:24 (0x441c1a)
.gvm/pkgsets/go1.6/global/src/github.com/etcinit/phabulous/app/controllers/feed.go:55 (0x5560ca)
.gvm/pkgsets/go1.6/global/src/github.com/etcinit/phabulous/app/controllers/feed.go:29 (0x5577aa)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/context.go:97 (0x557c7a)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/recovery.go:45 (0x56a511)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/context.go:97 (0x557c7a)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/logger.go:63 (0x5697aa)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/context.go:97 (0x557c7a)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/gin.go:284 (0x55ead2)
.gvm/pkgsets/go1.6/global/src/github.com/gin-gonic/gin/gin.go:265 (0x55e707)
.gvm/gos/go1.6/src/net/http/server.go:2081 (0x698d5e)
.gvm/gos/go1.6/src/net/http/server.go:1472 (0x69560e)
.gvm/gos/go1.6/src/runtime/asm_amd64.s:1998 (0x45de21)
VeeeneX commented
I fixed it by correcting permissions
iruizmar commented
Which permissions are those?
Roguelazer commented
I'm getting this same panic in a loop. Can you elaborate as to what causes it?
turboza commented
We got this kind of error too. It seems we didn't include the modules
in main.yml. After adding, it worked properly. You may try adapting my test config to use.
phabulous/config/main.yml
server:
hostname: ''
port: 8085
debug: false
serious: false
modules:
- core
slack:
token: YOUR_TOKEN_HERE
username: phabulous
enable: true
as-user: true
irc:
enable: false
nick: phabulous
hostname: some.irc.server
port: 6667
tls: true
conduit:
api: http://phabricator.url
token: YOUR_TOKEN_HERE
channels:
feed: '#phabricator'
feedTypes: ['TASK']
core:
summon:
expandProjects: true
includeSelf: true
misc:
ignore-ca: false
in case it still doesn't work, this is my docker-compose config
phabulous/docker-compose.yml
version: '2'
services:
phabulous:
image: quay.io/etcinit/phabulous:v3.0.0-beta1
environment:
- SLACK_TOKEN=xoxb-000000000000
- CONDUIT_API=http://phabricator.url
- CONDUIT_TOKEN=api-xxxxxxxxxxxxxxx
volumes:
- 'path_to_phabulous/config:/go/src/github.com/etcinit/phabulous/config'
ports:
- '8085:8085'
jorourke commented
I still get this error:
[phabulous-58bc5857fb-2srvf] runtime error: invalid memory address or nil pointer dereference
[phabulous-58bc5857fb-2srvf] /usr/local/go/src/runtime/panic.go:505 (0x42ac58)
[phabulous-58bc5857fb-2srvf] gopanic: reflectcall(nil, unsafe.Pointer(d.fn), deferArgs(d), uint32(d.siz), uint32(d.siz))
[phabulous-58bc5857fb-2srvf] /usr/local/go/src/runtime/panic.go:63 (0x429ccd)
[phabulous-58bc5857fb-2srvf] panicmem: panic(memoryError)
[phabulous-58bc5857fb-2srvf] /usr/local/go/src/runtime/signal_unix.go:388 (0x43fd49)
[phabulous-58bc5857fb-2srvf] sigpanic: panicmem()
[phabulous-58bc5857fb-2srvf] /go/src/github.com/etcinit/phabulous/app/controllers/feed.go:56 (0x9ccc79)
[phabulous-58bc5857fb-2srvf] (*FeedController).postReceive: if res.URI != "" {
[phabulous-58bc5857fb-2srvf] /go/src/github.com/etcinit/phabulous/app/controllers/feed.go:54 (0x9ccc78)
[phabulous-58bc5857fb-2srvf] (*FeedController).postReceive: storyText := c.Request.PostForm.Get("storyText")
[phabulous-58bc5857fb-2srvf] /go/src/github.com/gin-gonic/gin/context.go:107 (0x9ba7c2)
[phabulous-58bc5857fb-2srvf] (*Context).Next: c.handlers[c.index](c)
[phabulous-58bc5857fb-2srvf] /go/src/github.com/gin-gonic/gin/recovery.go:46 (0x9caaa9)
Config is
server:
hostname: ''
port: 8765
debug: true
serious: false
modules:
- core
- extension
slack:
token: xoxb-ETCETCETC
username: phabulous
enable: true
as-user: true
conduit:
api: 'https://my-url.com'
token: 'api-1231231231232'
channels:
feed: '#phab-updates'
feedTypes: ['TASK']
core:
summon:
expandProjects: true
includeSelf: true
misc:
ignore-ca: true