Closed dcadenas closed 3 months ago
This is just a test to explore if the cause of the crash is a problem with prometheus.
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xad0d5f] goroutine 961 [running]: github.com/planetary-social/go-notification-service/service/adapters/apns.(*APNS).SendNotification(_, {{{{0xc0031fc640, 0x40}}, {{0xc0031fc700, 0x40}}, {0x0, 0xede34fa1f, 0x0}, {0x1}, {0xc0023ede00, ...}, ...}, . ..}) /usr/src/app/service/adapters/apns/apns.go:62 +0x25f github.com/planetary-social/go-notification-service/service/app.(*ProcessSavedEventHandler).generateSendAndSaveNotifications.func2({0x30?, 0x30?}, {{0xf61240, 0xc00296c4e0}, {0xf65760, 0xc0040c4b80}, {0xf61200, 0 xc0040c4b90}, {0xf6c318, 0xc00296c500}, ...}) /usr/src/app/service/app/handler_process_saved_event.go:171 +0x27a github.com/planetary-social/go-notification-service/service/adapters/firestore.(*TransactionProvider).Transact.func1({0xf6a2e8, 0xc002130780}, 0xc57d40?) /usr/src/app/service/adapters/firestore/firestore.go:44 +0x1a5 cloud.google.com/go/firestore.(*Client).RunTransaction(0xc000439530, {0xf6a240?, 0xc0004bc960?}, 0xc001093738, {0x0, 0x0, 0x7f3b9d82a108?}) /go/pkg/mod/cloud.google.com/go/firestore@v1.10.0/transaction.go:132 +0x5e3 github.com/planetary-social/go-notification-service/service/adapters/firestore.(*TransactionProvider).Transact(0x0?, {0xf6a240?, 0xc0004bc960?}, 0xc0bd00?) /usr/src/app/service/adapters/firestore/firestore.go:38 +0x71 github.com/planetary-social/go-notification-service/service/app.(*ProcessSavedEventHandler).generateSendAndSaveNotifications(0xc0000f8480, {_, _}, {{{0xc0031fc640, 0x40}}, {{0xc0031fc700, 0x40}}, {0x0, 0xede34fa1 f, 0x0}, ...}, ...) /usr/src/app/service/app/handler_process_saved_event.go:163 +0x79d github.com/planetary-social/go-notification-service/service/app.(*ProcessSavedEventHandler).Handle(0xc0000f8480, {0xf6a240, 0xc0004bc960}, {{{0xc001106c40?, 0xc0010f9360?}}}) /usr/src/app/service/app/handler_process_saved_event.go:74 +0x5a5 github.com/planetary-social/go-notification-service/service/ports/firestorepubsub.(*EventSavedSubscriber).runHandler(0xc0004a07c0, {0xf6a240, 0xc0004bc960}, 0xc0010f1c80) /usr/src/app/service/ports/firestorepubsub/event_saved.go:114 +0x1e6 github.com/planetary-social/go-notification-service/service/ports/firestorepubsub.(*EventSavedSubscriber).handleMessage(0xc0004a07c0, {0xf6a240?, 0xc0004bc960?}, 0xc000de001c?) /usr/src/app/service/ports/firestorepubsub/event_saved.go:94 +0x31 created by github.com/planetary-social/go-notification-service/service/ports/firestorepubsub.(*EventSavedSubscriber).Run /usr/src/app/service/ports/firestorepubsub/event_saved.go:63 +0x185
The service is down so it's safe to me to merge this myself and I can always revert
This is just a test to explore if the cause of the crash is a problem with prometheus.