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

loadSystems crashes with wrong Lemmy password #18

Open
joshnb opened this issue Jun 9, 2023 · 13 comments
Open

loadSystems crashes with wrong Lemmy password #18

joshnb opened this issue Jun 9, 2023 · 13 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@joshnb
Copy link

joshnb commented Jun 9, 2023

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0x563d981d6ad1]

goroutine 1 [running]:
github.com/mrusme/neonmodem/cmd.loadSystems(0xc000456000)
github.com/mrusme/neonmodem/cmd/root.go:98 +0xf1
github.com/mrusme/neonmodem/cmd.glob..func1(0x563d98b4a1c0?, {0x563d981dbc8c?, 0x0?, 0x0?})
github.com/mrusme/neonmodem/cmd/root.go:115 +0xdc
github.com/spf13/cobra.(*Command).execute(0x563d98b4a1c0, {0xc000024240, 0x0, 0x0})
github.com/spf13/cobra@v1.6.1/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x563d98b4a1c0)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.6.1/command.go:968
github.com/mrusme/neonmodem/cmd.Execute(0xc0000061a0?)
github.com/mrusme/neonmodem/cmd/root.go:127 +0x3e
main.main()
github.com/mrusme/neonmodem/neonmodem.go:13 +0x25

can find the file to try to figure out what its not working.. Any ideas?

@joshnb joshnb changed the title Just in installed Neonmodem from ya and not luck Just installed Neonmodem from yay and no luck Jun 9, 2023
@VincentYing
Copy link

This error occurs for me too after connecting hackernews.

Running program initially with only lobsters works.

@joshnb
Copy link
Author

joshnb commented Jun 10, 2023 via email

@mrusme
Copy link
Owner

mrusme commented Jun 12, 2023

Did you run any of the connect commands upfront?

@joshnb
Copy link
Author

joshnb commented Jun 13, 2023

Did you run any of the connect commands upfront?

Yes, i ran 'neonmodem connect --type lemmy --url https://lemmy.ml' , entered my user and pass and got "Successfully added new connection!". Then neonmodem returnes
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0x55d0b9d74ad1]

goroutine 1 [running]:
github.com/mrusme/neonmodem/cmd.loadSystems(0xc0000bc000)
github.com/mrusme/neonmodem/cmd/root.go:98 +0xf1
github.com/mrusme/neonmodem/cmd.glob..func1(0x55d0ba6e81c0?, {0x55d0b9d79c8c?, 0x0?, 0x0?})
github.com/mrusme/neonmodem/cmd/root.go:115 +0xdc
github.com/spf13/cobra.(*Command).execute(0x55d0ba6e81c0, {0xc000024240, 0x0, 0x0})
github.com/spf13/cobra@v1.6.1/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x55d0ba6e81c0)
github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
github.com/spf13/cobra@v1.6.1/command.go:968
github.com/mrusme/neonmodem/cmd.Execute(0xc0000061a0?)
github.com/mrusme/neonmodem/cmd/root.go:127 +0x3e
main.main()
github.com/mrusme/neonmodem/neonmodem.go:13 +0x25

@epl692
Copy link

epl692 commented Jun 13, 2023

Same issue,

[epl692@iceland:.config] $ neonmodem
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0xd307a6]

goroutine 1 [running]:
github.com/mrusme/neonmodem/cmd.loadSystems(0xc0004040a0)
        /home/runner/work/neonmodem/neonmodem/cmd/root.go:98 +0x4e6
github.com/mrusme/neonmodem/cmd.glob..func1(0x173bec0?, {0xe7b182?, 0x0?, 0x0?})
        /home/runner/work/neonmodem/neonmodem/cmd/root.go:115 +0xdc
github.com/spf13/cobra.(*Command).execute(0x173bec0, {0xc00009e1f0, 0x0, 0x0})
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x173bec0)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
github.com/mrusme/neonmodem/cmd.Execute(0xc0000061a0?)
        /home/runner/work/neonmodem/neonmodem/cmd/root.go:127 +0x3e
main.main()
        /home/runner/work/neonmodem/neonmodem/neonmodem.go:13 +0x25

eliminating my connection to lemmy allows the program to... uselessly start.

I should note, there seems to be a non-standard go installed on the system in question (sdf.org public access unix system running NetBSD)

[epl692@ma.sdf.org:neonmodem] $ ./neonmodem
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0xd4f811]

goroutine 1 [running]:
github.com/mrusme/neonmodem/cmd.loadSystems(0xc00068e000)
        /meta/e/epl692/neonmodem/cmd/root.go:104 +0xf1
github.com/mrusme/neonmodem/cmd.glob..func1(0x17676a0?, {0xea3838?, 0x0?, 0x0?})
        /meta/e/epl692/neonmodem/cmd/root.go:121 +0xdc
github.com/spf13/cobra.(*Command).execute(0x17676a0, {0xc000024240, 0x0, 0x0})
        /meta/e/epl692/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:920 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x17676a0)
        /meta/e/epl692/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:1044 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        /meta/e/epl692/go/pkg/mod/github.com/spf13/cobra@v1.6.1/command.go:968
github.com/mrusme/neonmodem/cmd.Execute(0xc0000061a0?)
        /meta/e/epl692/neonmodem/cmd/root.go:133 +0x3e
main.main()
        /meta/e/epl692/neonmodem/neonmodem.go:13 +0x25

Also tried building from source on our linux system here.
$ uname -a
Linux ma.sdf.org 4.19.0-23-amd64 #1 SMP Debian 4.19.269-1 (2022-12-20) x86_64 GNU/Linux

mrusme added a commit that referenced this issue Jun 15, 2023
@mrusme mrusme added the bug Something isn't working label Jun 15, 2023
@mrusme
Copy link
Owner

mrusme commented Jun 15, 2023

Thanks for reporting! Could anyone of you give it a try with the latest master branch?

@joshnb
Copy link
Author

joshnb commented Jun 15, 2023

Thanks for reporting! Could anyone of you give it a try with the latest master branch?

Just downloaded the arm64 placed in user/local/bin, chmod +x neonmodem.

neonmodem connect --type lemmy --url https://lemmy.ml 02:35:43
Please enter your username or email:
Please enter your password (will not echo):
Successfully added new connection!
~|⇒ neonmodem 02:35:57
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x80 pc=0xd45616]

goroutine 1 [running]:
github.com/mrusme/neonmodem/cmd.loadSystems(0xc0000ba000)
/home/runner/work/neonmodem/neonmodem/cmd/root.go:105 +0xb6
github.com/mrusme/neonmodem/cmd.glob..func1(0x1770140?, {0xe9628b?, 0x0?, 0x0?})
/home/runner/work/neonmodem/neonmodem/cmd/root.go:122 +0xdc
github.com/spf13/cobra.(*Command).execute(0x1770140, {0xc00010a1f0, 0x0, 0x0})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0x1770140)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992
github.com/mrusme/neonmodem/cmd.Execute(0xc0000061a0?)
/home/runner/work/neonmodem/neonmodem/cmd/root.go:134 +0x3e
main.main()
/home/runner/work/neonmodem/neonmodem/neonmodem.go:13 +0x25

still not working for me.

@tedwardd
Copy link
Contributor

tedwardd commented Jun 15, 2023

@joshnb Can you provide some additional information about your environment? Specifically OS and GO version but any other details you think might be relevant to your environment would be helpful in tracking this down.

@joshnb
Copy link
Author

joshnb commented Jun 15, 2023

@joshnb Can you provide some additional information about your environment? Specifically OS and GO version but any other details you think might be relevant to your environment would be helpful in tracking this down.

go version go1.20.5 linux/amd64
EndeavourOS Linux x86_64
Plasma 5.27.5
Intel i7-6600U (4) @ 3.

error seems to be in the loadSystems function at line 105 of the root.go file in the neonmodem/cmd. I can not find this file to try to fix the nil value for memory.

@tedwardd
Copy link
Contributor

@joshnb Please run neonmodem --debug and provide the output in ~/.cache/neonmodem.log. There's some debugging calls available in loadSystems() and I'd like to see what they have to say.

@joshnb
Copy link
Author

joshnb commented Jun 15, 2023

@joshnb Please run neonmodem --debug and provide the output in ~/.cache/neonmodem.log. There's some debugging calls available in loadSystems() and I'd like to see what they have to say.

after running the --debug, I saw my mistake. and neonmodem is now working! Thanks for the help! It was just my password was incorrect. got some yolk on my face...

@mrusme
Copy link
Owner

mrusme commented Jun 15, 2023

Well well, thank you for reporting, because this shouldn't happen nevertheless! I will change the issue's title accordingly, so that it can be fixed sometime. :-)

@mrusme mrusme changed the title Just installed Neonmodem from yay and no luck loadSystems crashes with wrong Lemmy password Jun 15, 2023
@mrusme mrusme added the good first issue Good for newcomers label Jun 15, 2023
@albert-tomanek
Copy link

Just bumping to say that it might be necessary to delete ~/.config/neonmodem.toml before changing your password as currently the file is changed to contain 2 sets of credentials and I think the program only looks at the first (original) ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

6 participants