marcelja / facebook-delete

Fast facebook activity deletion
MIT License
1.28k stars 48 forks source link

How to solve error- panic: runtime error: invalid memory address or nil pointer dereference ? #59

Closed DeltaEpsilon19498 closed 1 month ago

DeltaEpsilon19498 commented 1 year ago

Hello. I have an issue that is interfering with my ability to use this script, and I am hoping that someone would be so kind to help me. To demonstrate that I have done my best to resolve this issue without help, I will first explain what I have done and have been trying to do. Then, I will show you the error and ask for help in resolving it. If you do not care about the first part, please skip to the second part.

First Part

As a non-technically-skilled user, I am using Windows to run this program instead of Linux. Your .exe for Windows users works, but as far as I can tell, I cannot select flags like rateLimit though it, and Facebook rate-limited me very quickly when I tried to do this. I considered installing Linux for the first time, in part in order to run this program. But I also do not want Facebook to log me as a Linux user, in the event that they keep copies of everything where we cannot delete it. If I become more technically-skilled and switch to Linux, I do not want to log into Facebook and let Facebook know that I use Linux.

So I followed your instructions on how to get the program from source, installing Go and Python and following your instructions. I struggled to log in this way, so I used your suggestion regarding cookies in order to make the program work. The EditThisCookie extension that you recommended appears a bit suspicious, due to what it discloses it collects in the Chrome extension store. So I decided to use the Cookie-Editor extension instead, and I used Github to load it unpacked as an extension in my browser, so I would not have to trust the Chrome web store. Regardless, this worked, and I was able to log in.

Second Part

At this point, I ran the program, set the rateLimit to 1000 ms, and it worked well. Eventually I got ratelimited at that, so I increased the rateLimit to 10000 ms later on. I have not encountered problems with ratelimiting at that rate. I was able to delete things from 2015 to the present year. However, I encountered a problem, and it has not been solved by restarting the script. I get the "panic: runtime error: invalid memory address or nil pointer dereference" error. I do not know why this error happened, since the program was working perfectly fine earlier. And since I am not technically-skilled, I do not know how to modify the program to fix this error.

Here is my command line output if I try to run the script now. Please note that I removed portions of it that might be a privacy risk. In those cases, I replaced the output with "personal information" in a text editor. Please let me know if I missed something that I should not show, since I am a low-IQ and low-skill user.

C:\personal information>go run deleter.go -rateLimit 10000 Waiting 10000 ms before search and delete requests. Logged in with user: personal information ? Which years 2023, 2022, 2021, 2020, 2019, 2018, 2017, 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, 2007, 2006 ? Which months Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec ? Which categories All App Activity, Comments, Event Invitations, Event Responses, Group Posts and Comments, Group Reactions, Instagram Photos and Videos, Likes and Reactions, Others' Posts To Your Timeline, Photos and Videos, Posts, Posts You're Tagged In, Search History, Spotify, Your Events

Searching elements from 2023: Jan Feb Mar Elements found: 0 panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x10 pc=0xdf6545]

goroutine 1 [running]: main.(requester).Request(0xc00004d130, {0xc0004ac2d0?, 0xc0002db380?}) C:/personal information/deleter.go:72 +0x65 main.(activityReader).ReadItems(0xc000022640, 0x3?, 0x2?, {0xe98543, 0x11}) C:/personal information/deleter.go:215 +0x8f main.(*deleter).Delete(0xc000359dd0, {0xc000150400, 0x12, 0xf?}, {0xc000176600, 0xf, 0x1?}) C:/personal information/deleter.go:354 +0x3b5 main.main() C:/personal information/deleter.go:633 +0x1045 exit status 2

How do I fix this runtime error? I am afraid that the limits of my problem-solving abilities ends here.

Thank you very much for this program and this help. I appreciate it.

EDIT: Also, I do not use pi-hole and probably do not have the technical expertise to do so. I do use a VPN, but I do not have an adblock filter on it. I would prefer that Facebook not know my current IP address when I am running a script like this, if possible. Regardless, since I had the VPN on when the program was working, I do not understand why it would not have caused this error back then.

Again, thank you for your help.

DeltaEpsilon19498 commented 1 year ago

For some reason, certain vpn connections can interfere with this script and cause this error. Changing vpn servers can fix this issue.