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

running error ! #21

Open
Ron-zs opened this issue Nov 18, 2022 · 2 comments
Open

running error ! #21

Ron-zs opened this issue Nov 18, 2022 · 2 comments

Comments

@Ron-zs
Copy link

Ron-zs commented Nov 18, 2022

└─# ./linux-agent
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6ae669]

goroutine 1 [running]:
main.main()
/home/kali/Desktop/DiscordGo/cmd/agent/main.go:63 +0x449

I want to get the reason ,why this happend and how to resolve it.
Can you help me?

@emmaunel
Copy link
Owner

emmaunel commented Nov 19, 2022

What branch are you using? (dev is the up to date, recommend trying that)
What version of golang are you using?
@Ron-zs

@e-fin
Copy link

e-fin commented May 30, 2023

Was this ever resolved? i am having the same problem on both dev branch and main branch.

I have tried go version 1.20 and 1.18, I will try some other versions to see if that helps. I will be trying 1.17 next since thats in the go.mod file.

@emmaunel what go version are you using to compile the binary?

Its this line thats failing:

message, _ := dg.ChannelMessageSend(channelID.ID, sendMessage)

and I believe it is because the line prior to it is also failing:

channelID, _ = dg.GuildChannelCreate(util.ServerID, newAgent.IP, 0)

If changing the go version does not work, i will start troubleshooting as I noticed this part does not have much error handling, I can add some and commit it when i have some time :)

Edit:

Added some error handling and got this message

error creating Discord channel, HTTP 403 Forbidden, {"message": "Missing Permissions", "code": 50013}

re-added the bot with full Administrator permissions and it fixed it, now im solving the problem of the agents "not returning anything"

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

No branches or pull requests

3 participants