[GOWS] - Channel info / preview by @newsletter id crashes with nil pointer (500) for channels the session does not follow
Maintainers usually reply within 5 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go, typescript
Research direction
Start with the GOWS channel info and preview handlers, then trace how they call gows-plus src/server/newsletter.go and its GetNewsletterInfo function. Reproduce with an unfollowed channel’s @newsletter id and compare with an invite code or followed channel. Done means both endpoints return channel data or a useful 4xx error instead of HTTP 500; the implementation is in the external gows-plus dependency.
Written by the indexing model from the issue text.
Description
Describe the bug
On GOWS, GET /api/{session}/channels/{id} and GET /api/{session}/channels/{id}/messages/preview crash with a nil pointer (HTTP 500) when {id} is a ...@newsletter id of a channel the session does not follow. The same calls work with the channel's invite code, and work by @newsletter id for channels the session follows.
Version
{
"version": "2026.10.1",
"engine": "GOWS",
"tier": "CORE"
}
Image devlikeapro/waha:gows-2026.10.1 (linux/amd64), also seen on arm-2026.10.1. GOWS gows-plus v1.0.49.
Steps
- A
WORKINGGOWS session (default) that does not follow the official WhatsApp channel. GET /api/default/channels/120363144038483540@newsletterGET /api/default/channels/120363144038483540@newsletter/messages/preview?limit=3&downloadMedia=false
Expected behavior
The channel info and its latest posts (as with the invite code), or a 4xx with the reason if WhatsApp refuses the lookup by id.
Requests - Responses
Both calls return HTTP 500:
13 INTERNAL: Internal server error: runtime error: invalid memory address or nil pointer dereference.
The decoded stack in the message points to github.com/devlikeapro/gows/server.toNewsletter. The session stays WORKING.
GET /api/default/channels/0029Va4K0PZ5a245NkngBA2M(invite code of the same channel): 200, correct data.GET /api/default/channels/<id of a followed channel>@newsletterand its/messages/preview: 200.
Additional context
Likely cause, in gows-plus src/server/newsletter.go, GetNewsletterInfo: jid, err := types.ParseJID(id) inside the if block declares a new err, so the error returned by cli.GetNewsletterInfo(ctx, jid) is assigned to that inner variable. The outer err stays nil and toNewsletter(nil) dereferences a nil resp:
var resp *types.NewsletterMetadata
if gows.HasNewsletterSuffix(id) {
jid, err := types.ParseJID(id) // shadows the outer err
if err != nil {
return nil, err
}
resp, err = cli.GetNewsletterInfo(ctx, jid) // error lost
} else {
resp, err = cli.GetNewsletterInfoWithInvite(ctx, id)
}
if err != nil { // outer err, still nil
return nil, err
}
return toNewsletter(resp), nil // resp == nil
Possible fix: declare var jid types.JID and assign with jid, err = types.ParseJID(id), and return an error when resp == nil. That would surface WhatsApp's actual refusal for unfollowed channels instead of a crash. Happy to open a PR on gows-plus if that helps.
- Dominant language
- TypeScript
- Stars
- 7.6k
- Forks
- 1.8k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from devlikeapro/waha
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
devlikeapro/waha#2369 ·
Maintainers usually reply within 5 days
-
patron:PLUS
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
devlikeapro/waha#2167 · 1 comment ·
Maintainers usually reply within 5 days
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
devlikeapro/waha#2366 ·
Maintainers usually reply within 5 days
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
devlikeapro/waha#2365 ·
Maintainers usually reply within 5 days
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 42/100
devlikeapro/waha#2364 · 1 reaction ·
Maintainers usually reply within 5 days
All issues in devlikeapro/waha
Similar issues
-
inference/go type/feature
Difficulty 1/5 1-3 hours Newbie friendliness 72/100
anomalyco/opencode#65148 · 1 comment ·
Maintainers usually reply within 1 day
-
truapi-release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
paritytech/product-sdk#529 ·
Maintainers usually reply within 1 day
-
Add: Mansudae TVOpenapproved check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
[Perf] Canvas layer composition is quadratic: splitRenderLayers re-copies the node array per nodeOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
bigbluebutton/bigbluebutton#26638 · 1 comment ·
Maintainers usually reply within 1 day