Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"assignment to entry in nil map" #193

Closed
xescugc opened this issue May 29, 2019 · 8 comments
Closed

"assignment to entry in nil map" #193

xescugc opened this issue May 29, 2019 · 8 comments
Assignees

Comments

@xescugc
Copy link

xescugc commented May 29, 2019

Some times I get this error:

panic: assignment to entry in nil map

goroutine 31 [running]:
github.com/erroneousboat/slack-term/components.(*Chat).AddReply(...)
	/go/src/github.com/erroneousboat/slack-term/components/chat.go:189
github.com/erroneousboat/slack-term/handlers.messageHandler.func1(0xc0003f40e0)
	/go/src/github.com/erroneousboat/slack-term/handlers/event.go:136 +0x469
created by github.com/erroneousboat/slack-term/handlers.messageHandler
	/go/src/github.com/erroneousboat/slack-term/handlers/event.go:117 +0x3f

It's somewhat declarative hehe

@jpbruinsslot jpbruinsslot self-assigned this May 30, 2019
@jpbruinsslot jpbruinsslot added this to the v0.4.2 milestone May 30, 2019
@jpbruinsslot
Copy link
Owner

jpbruinsslot commented May 30, 2019

This is on master, trying to reply to a thread, right? I'll have a look.

@xescugc
Copy link
Author

xescugc commented May 30, 2019

It's on master, and it's not actually on reply, It "randomly" fails so I would assume that it's when a reply on a thread is received and tries to find the parent to show the message. But I can not reproduce it with clarity sorry :(.

I see why it fails in code and those are my assumptions, what I can say is that there was no action taken by me :).

@jpbruinsslot
Copy link
Owner

Cool thanks for the context!

@xescugc
Copy link
Author

xescugc commented Jun 14, 2019

Just to give ideas, could be related that a thread is fetch on the history but not the parent message? as it's out of the "page history"?

@jpbruinsslot
Copy link
Owner

Yeah I also expect this to be the case

jpbruinsslot added a commit that referenced this issue Jun 15, 2019
@jpbruinsslot
Copy link
Owner

The last commit should help with getting the fatal error. When a parent id isn't present in the chat view it will just add the message. This is for now a workaround, because it doesn't relay that it is a reply to a thread, which might get confusing.

@xescugc
Copy link
Author

xescugc commented Jun 17, 2019

Also, this would potentially be fixed also with the v2 on threads 😄 .

@jpbruinsslot
Copy link
Owner

Closing this for now to clean up issues. Reopen when it continues to be a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants