Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Panic when loading lhs-content

Aperta
#970 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
go
Ambito
api, backend

Direzione di ricerca

Inizia in server/plugin/graphql/lhs_request.go, in GetLHSData e fetchLHSData, quindi segui newIssueFromAssignmentResponse fino a newGithubIssue intorno alla riga 194. Usa il percorso /api/v1/lhs-content e lo stack trace fornito per analizzare la dereferenziazione intermittente di un puntatore nil. Il lavoro è concluso quando il caricamento di lhs-content non recupera più questa panic.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Not sure what caused it, it's not happening frequently, I just noticed it while checking the Mattermost log for something else:

warn  [2026-02-26 15:20:33.614 +01:00] Recovered from a panic                        caller="app/plugin_api.go:1134" plugin_id=github url=/api/v1/lhs-content error="runtime error: invalid memory address or nil pointer dereference" stack="goroutine 6385881 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:26 +0x5e
github.com/mattermost/mattermost-plugin-github/server/plugin.(*Plugin).withRecovery-fm.(*Plugin).withRecovery.func1.1()
	github.com/mattermost/mattermost-plugin-github/server/plugin/api.go:197 +0x65
panic({0xed36e0?, 0x19b7220?})
	runtime/panic.go:792 +0x132
net/url.(*URL).String(0xe3c460?)
	net/url/url.go:833 +0x2c
github.com/mattermost/mattermost-plugin-github/server/plugin/graphql.newGithubIssue(0x0, {0x0, 0x0}, {0x0, 0x0}, {0x12143e0?}, {0xc001284450?}, {{0x0, 0x0, 0x0}}, ...)
	github.com/mattermost/mattermost-plugin-github/server/plugin/graphql/lhs_request.go:194 +0x8c
github.com/mattermost/mattermost-plugin-github/server/plugin/graphql.newIssueFromAssignmentResponse(0xf021e0?)
	github.com/mattermost/mattermost-plugin-github/server/plugin/graphql/lhs_request.go:175 +0x345
github.com/mattermost/mattermost-plugin-github/server/plugin/graphql.(*Client).fetchLHSData(0xc000e523c0, {0x121c6e8, 0xc000f077a0}, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0x0, ...}, ...)
	github.com/mattermost/mattermost-plugin-github/server/plugin/graphql/lhs_request.go:107 +0xde8
github.com/mattermost/mattermost-plugin-github/server/plugin/graphql.(*Client).GetLHSData(0xc000e523c0, {0x121c6e8, 0xc000f077a0})
	github.com/mattermost/mattermost-plugin-github/server/plugin/graphql/lhs_request.go:46 +0x350
github.com/mattermost/mattermost-plugin-github/server/plugin.(*Plugin).getLHSData(0xffffffffffffffff?, 0xc000e52380)
	github.com/mattermost/mattermost-plugin-github/server/plugin/api.go:1041 +0x2d
github.com/mattermost/mattermost-plugin-github/server/plugin.(*Plugin).getSidebarData(0xc0000e0000, 0xc000e52380)
	github.com/mattermost/mattermost-plugin-github/server/plugin/api.go:1050 +0x2c
github.com/mattermost/mattermost-plugin-github/server/plugin.(*Plugin).getSidebarContent(0xc0000e0000, 0xc000e52380, {0x121b690, 0xc0004f0e70}, 0xc000de8101?)
	github.com/mattermost/mattermost-plugin-github/server/plugin/api.go:1064 +0x2b
github.com/mattermost/mattermost-plugin-..."
warn  [2026-02-26 15:20:33.616 +01:00] Recovered from a panic                        caller="app/plugin_api.go:1134" plugin_id=github url=/api/v1/lhs-content error="runtime error: invalid memory address or nil pointer dereference" stack="goroutine 6385862 [running]:
runtime/debug.Stack()
	runtime/debug/stack.go:26 +0x5e
github.com/mattermost/mattermost-plugin-github/server/plugin.(*Plugin).withRecovery-fm.(*Plugin).withRecovery.func1.1()
	github.com/mattermost/mattermost-plugin-github/server/plugin/api.go:197 +0x65
panic({0xed36e0?, 0x19b7220?})
	runtime/panic.go:792 +0x132
net/url.(*URL).String(0xe30001?)
	net/url/url.go:833 +0x2c
github.com/mattermost/mattermost-plugin-github/server/plugin/graphql.newGithubIssue(0x0, {0x0, 0x0}, {0x0, 0x0}, {0x12143e0?}, {0xc002c84180?}, {{0x0, 0x0, 0x0}}, ...)
	github.com/mattermost/mattermost-plugin-github/server/plugin/graphql/lhs_request.go:194 +0x8c
github.com/mattermost/mattermost-plugin-github/server/plugin/graphql.newIssueFromAssignmentResponse(0xf021e0?)
	github.com/mattermost/mattermost-plugin-github/server/plugin/graphql/lhs_request.go:175 +0x345
github.com/mattermost/mattermost-plugin-github/server/plugin/graphql.(*Client).fetchLHSData(0xc000e56800, {0x121c6e8, 0xc000e62bd0}, {0x0, 0x0, 0x0}, {0x0, 0x0, 0x0}, {0x0, ...}, ...)
	github.com/mattermost/mattermost-plugin-github/server/plugin/graphql/lhs_request.go:107 +0xde8
github.com/mattermost/mattermost-plugin-github/server/plugin/graphql.(*Client).GetLHSData(0xc000e56800, {0x121c6e8, 0xc000e62bd0})
	github.com/mattermost/mattermost-plugin-github/server/plugin/graphql/lhs_request.go:46 +0x350
github.com/mattermost/mattermost-plugin-github/server/plugin.(*Plugin).getLHSData(0xffffffffffffffff?, 0xc000e567c0)
	github.com/mattermost/mattermost-plugin-github/server/plugin/api.go:1041 +0x2d
github.com/mattermost/mattermost-plugin-github/server/plugin.(*Plugin).getSidebarData(0xc0000e0000, 0xc000e567c0)
	github.com/mattermost/mattermost-plugin-github/server/plugin/api.go:1050 +0x2c
github.com/mattermost/mattermost-plugin-github/server/plugin.(*Plugin).getSidebarContent(0xc0000e0000, 0xc000e567c0, {0x121b690, 0xc000d094c0}, 0xc000a60f01?)
	github.com/mattermost/mattermost-plugin-github/server/plugin/api.go:1064 +0x2b
github.com/mattermost/mattermost-plugin-..."
Lingua principale
Go
Stelle
180
Fork
181
Merge medio
1g 8h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di mattermost/mattermost-plugin-github

Tutte le issue di mattermost/mattermost-plugin-github

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.