Mega-Mewthree / BetterDiscordPlugins

Plugins and Libraries for BetterDiscord
MIT License
140 stars 516 forks source link

AutoStartRichPresence An error was encountered while trying to load this plugin #177

Open NotEnderVN opened 1 year ago

randoomdude commented 1 year ago

I got the same error I think this is the error it gave me, not working at all

Error: ENOENT: no such file or directory, lstat 'C:\Users\Reiwa\AppData\Local\Discord\app-1.0.9008\zlib' at Object.j [as realpathSync] (:4:340384) at Function.getFilePath (:4:341654) at Function._load (:4:341749) at :4:344940 at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:104:18) at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:2014:6) at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:2273:5) at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:3729:3) at Object.requireAddon (:4:37112) at Object.loadAddon (:4:8234) at Object.loadAddon (:4:34784) at Object.reloadAddon (:4:9124) at AsyncFunction. (:4:6260)

ruihq commented 1 year ago

same!! Error: ENOENT: no such file or directory, lstat 'C:\Users\tabs\AppData\Local\Discord\app-1.0.9008\zlib' at Object.j [as realpathSync] (:4:340384) at Function.getFilePath (:4:341654) at Function._load (:4:341749) at :4:344940 at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:104:18) at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:2014:6) at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:2273:5) at eval (betterdiscord://plugins/AutoStartRichPresence.plugin.js:3729:3) at Object.requireAddon (:4:37112) at Object.loadAddon (:4:8234) at Object.loadAddon (:4:34784) at Object.loadAllAddons (:4:10708) at Object.initialize (:4:5130) at Object.initialize (:4:33979) at Object.startup (:4:390667)

fluffeliger commented 1 year ago

same for me

fluffeliger commented 1 year ago

temporary solution for me: https://www.customrp.xyz/

The-Anonymous-Developer commented 1 year ago

same error.

Pltrxd commented 1 year ago

samee

littlelapin commented 1 year ago

temporary solution for me: https://www.customrp.xyz/

bit old reply but does anyone know if this is safe (?)

niemogewejsc commented 1 year ago

temporary solution for me: https://www.customrp.xyz/

bit old reply but does anyone know if this is safe (?)

probably not https://www.virustotal.com/gui/file/7fc0c0298b645c7d7b1d3f6c8e48c7e988ab041d12cfb039471c59f11feb6446/behavior

Miniontoby commented 1 year ago

The error says zlib folder doesn't exist.

I have found the cause: It is because it is not being seen as package but just as folder/file. I will try to find solution

Update: Adding zlib doesn't work!

UPDATE: I think because of the way how discord works and not has all the nodejs packages this one needs, we can NOT use this plugin at all!

So for now, it will stay unuseable

Update: See my last comment

yumsha commented 1 year ago

The error tells you whats wrong!

It says zlib folder doesn't exist.

I have found the cause: It is because it is not being seen as package but just as folder/file. I will try to find solution

UPDATE: I think because of the way how discord works and not has all the nodejs packages this one needs, we can NOT use this plugin at all!

( i added the "zlib" files, and stills error occured.)

Miniontoby commented 1 year ago

( i added the "zlib" files, and stills error occured.)

You don't have to/you cannot 'add' zlib, cause it just doesnt work.

And to the owner of this plugin: Please delete the plugin from the Plugin Repo, until you have fixed this!

Update: I made a fix, see my last comment

AJXD2 commented 1 year ago

temporary solution for me: https://www.customrp.xyz/

bit old reply but does anyone know if this is safe (?)

probably not https://www.virustotal.com/gui/file/7fc0c0298b645c7d7b1d3f6c8e48c7e988ab041d12cfb039471c59f11feb6446/behavior

its fine https://github.com/maximmax42/Discord-CustomRP

f1zzyl1zzy commented 1 year ago

You don't have to/you cannot 'add' zlib, cause it just doesnt work. But what I recommend is installing "CustomRP" (#177 (comment)), it does the same and it auto reconnects when discord is not yet found/running

Yeah no, I wouldn't. Virustotal shows a whoooole bunch of behaviors that just raise too many red flags for me. Things that raised those red flags: Large memory allocation (Heap Spray attack), Checks for VMs, Geographical Location requests, Shutdown system (Why would you need that for just rich presence modification? Wouldn't you just need a bit of client modification to discordapp?), It deleted a few things from chrome userdata. The person who created the CustomRP thing has been accused of making malware before Theres a whole bunch of reg keys opened that I looked through and I just don't see the risk outweighing the benefit. Hell, I'm not computer expert but maybe someone else can drop in for me? My apologies if i am wrong, though.

Miniontoby commented 1 year ago

Oke for everyone who doesn't trust him,

Use my fix (just copy paste the code into the AutoStartRichPresence.plugin.js file in your plugins folder): https://raw.githubusercontent.com/Miniontoby/MinionBDStuff/main/Plugins/AutoStartRichPresence/AutoStartRichPresence.plugin.js

And then you can use the plugin settings to modify what it should say

AJXD2 commented 1 year ago

its fine https://github.com/maximmax42/Discord-CustomRP

ah shit i didnt see that part of it. Just uninstalled it. dont download it.

thanks @f1zzyl1zzy

Miniontoby commented 1 year ago

@AJXD2 Just use my patch/fix for this BD Plugin! It works like a charm!

fau-zi commented 11 months ago

Oke for everyone who doesn't trust him,

Use my fix (just copy paste the code into the AutoStartRichPresence.plugin.js file in your plugins folder): https://gist.githubusercontent.com/Miniontoby/9a7c77538cd3d5a3cdc7324d0e23b351/raw/AutoStartRichPresence.plugin.js

And then you can use the plugin settings to modify what it should say

it works guys!! thanks btw!!!

Miniontoby commented 6 months ago

Since I am now uploading my version to the BD plugins list, the link to the download has changed: https://raw.githubusercontent.com/Miniontoby/MinionBDStuff/main/Plugins/AutoStartRichPresence/AutoStartRichPresence.plugin.js

woolloo24 commented 4 months ago

Since I am now uploading my version to the BD plugins list, the link to the download has changed: https://raw.githubusercontent.com/Miniontoby/MinionBDStuff/main/Plugins/AutoStartRichPresence/AutoStartRichPresence.plugin.js

i have downloaded this and tried it but it doesnt work either. first off, all the setting fields are just white, but that could be a design issue, that's not that important. more important is that this doesnt even work, it does not start a rich presence status, atleast not in my test. it just shows up as nothing in my status (it says "playing a game" and nothing else in my RP status), although the errors and stuff is gone and i can access the settings atleast. at this point im not too eager to make this work, to be honest, theres other plugins in the DB that can do similar things so ill be using those, just wanted to say that the fix above did not work for me. Maybe at some point the dev will hopefully fix this plugin instead of letting it get obsolete.. Edit: from Discord's side, Discord-RPC has been deprecated anyway so i would just settle on not using this plugin, since it seems Discord will discard it for a newer SDK anyway.

Miniontoby commented 4 months ago

Have you checked that your "Share activities with others" is enabled?

At least I am still running my plugin and it is still working. You said white setting fields, that would mean you have an older version than the one you in the mention in your message. I had made some changes to the settings pane for the betterdiscord release, so just make sure you have version 2.0.11.

Btw, my plugin doesn't make use of the IPC (which might get removed), it directly sets the RPC in discord by using discord's functions, so I would think it might not get to be obsolete, but we never know.

woolloo24 commented 4 months ago

Have you checked that your "Share activities with others" is enabled?

At least I am still running my plugin and it is still working. You said white setting fields, that would mean you have an older version than the one you in the mention in your message. I had made some changes to the settings pane for the betterdiscord release, so just make sure you have version 2.0.11.

Btw, my plugin doesn't make use of the IPC (which might get removed), it directly sets the RPC in discord by using discord's functions, so I would think it might not get to be obsolete, but we never know.

yeah that's enabled. honestly im fairly new to all this so maybe im wrong, idk. also i just tested it again, it works fine, i just didnt notice that it doesnt actually reload the status after ive changed something unless i restart the plugin. the fields are still white but i am using version 2.0.11, it says so in the script too. thats fine though, i dont mind it too much to be honest.

woolloo24 commented 4 months ago

one thing i have noticed is that you cant rename the profiles which would be handy to be honest. the plugin seems to add information to the config file but it doesnt seem to fetch that information from the config file. so it would be great if it did that, its a bit bothersome to have to click on each "New Profile" to find out which one is the correct one. also the "active profile" thing doesnt work, it doesnt actually change profiles unless you use the "editing profile" thing, which isnt that bad but then the active profile field becomes unnecessary, yknow.

not sure how open you are to testing and i dont know if you knew all this but i thought id drop it in.

Miniontoby commented 4 months ago

The "Select Active Profile" is supposed to be used to select the profile that should show up.

The "Select Editing Profile" is ONLY to edit any profile's information not to change profiles.

And I do not have to restart the plugin in order to get it to work, tho.

I could try to add renaming function, yeah. But for now you must STOP the plugin, then edit the json file and then start the plugin again (unless BD just saved the json file in it's cache... but I do not remember...)

Still that it is white is really strange, since I do not see it being white! Only the text is white, but not anything else... Update: Oh wait, I use Discord11 and then there is no white stuff...

I am going to make an update on it, that will fix the problems, this week!

woolloo24 commented 4 months ago

yes but that's what i did. the plugin doesnt fetch the information from the config.json file, it only adds to it. because i type in a name, save the file, then turn on the plugin and the plugin reloads the config file in notepad++ but it doesnt actually use the information that i put into the file, same if i do it while the plugin is running. atleast thats what happens for me. i did restart and all that but the plugin doesnt seem to read the config file, because if i change anything (literally anything, even other settings than pname), then that doesnt show up in the fields on discord, and after reloading, the plugin just reloads the config file with its own information instead of reading what i wrote into it. or atleast it seems that way for me.

thanks for wanting to fix this stuff though!

Miniontoby commented 4 months ago

@woolloo24

That is sadly enough how BetterDiscord's api works... The only solution I can think of right now is to close discord, then edit the settings file and then open discord again...

For the settings menu, I have just released an update on my github. Please install it and try it out.

woolloo24 commented 4 months ago

thank you very much! closing discord completely, changing the names in the file and then opening discord again seems to do the trick. the settings fields are also no longer white, thank you very much! ^^

UltimateBoi commented 4 months ago

temporary solution for me: https://www.customrp.xyz/

bit old reply but does anyone know if this is safe (?)

probably not https://www.virustotal.com/gui/file/7fc0c0298b645c7d7b1d3f6c8e48c7e988ab041d12cfb039471c59f11feb6446/behavior

it is safe

UltimateBoi commented 4 months ago

@woolloo24

That is sadly enough how BetterDiscord's api works... The only solution I can think of right now is to close discord, then edit the settings file and then open discord again...

For the settings menu, I have just released an update on my github. Please install it and try it out.

it works for me. But also btw, could you add an option in the timestamp on and off dropdown for a custom start timestamp (where you can input the epoch time you want it to have started at) thank you.

Miniontoby commented 4 months ago

it works for me. But also btw, could you add an option in the timestamp on and off dropdown for a custom start timestamp (where you can input the epoch time you want it to have started at) thank you.

You should put that in an issue over at MY plugin, not here tho... And I am not planning to do that, since that isn't that easy to make.

However, you can edit the plugin's code and set the timestamp manually: Line 51:

-        this.startPlaying = Date.now();
+        this.startPlaying = new Date("August 3, 2023, 08:57:19 PM");
UltimateBoi commented 4 months ago

Of course yes but the edits I make are removed upon the update of the plugin. And sorry I couldn't find yours at that moment so I just did it here.

moonofblues commented 4 weeks ago

hi! i used your @Miniontoby patch/fix but when i open settings for autostartrichpresence, there are no input fields visible, hence i couldn't edit anything, i only see the labels (see attached image). hope you could help me on this, thank you so much! :_) and idk if the change did anything, but my discord kept crashing, but stopped when i disabled the plugins image

Miniontoby commented 4 weeks ago

Thanks for letting me know. But since it is my version of the addon, please try to use my repo for issues...

I will look at the issue when I have time in about 8 hours from now...

If you have the time to make an issue on my repo, please do it.

This repo for the old version of the plugin isnt even on the pluginrepo anymore afaik...

Op donderdag 15 augustus 2024 schreef quin @.***>:

hi! i used your @Miniontoby https://github.com/Miniontoby patch/fix but when i open settings for autostartrichpresence, there are no input fields visible, hence i couldn't edit anything, i only see the labels (see attached image). hope you could help me on this, thank you so much! :_) image.png (view on web) https://github.com/user-attachments/assets/d4f2995a-ef8f-4310-a513-30bab99b222b

— Reply to this email directly, view it on GitHub https://github.com/Mega-Mewthree/BetterDiscordPlugins/issues/177#issuecomment-2290442971, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNYDYFGXSDWMSYZINFSMPTZRQJ4TAVCNFSM6AAAAAAS2XWYN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJQGQ2DEOJXGE . You are receiving this because you were mentioned.Message ID: @.***>

Miniontoby commented 4 weeks ago

@moonofblues I fixed the plugin. Please update and make sure it works (I did test myself, but yeah)

For everyone: Please note that Discord now made it so that YOU CANNOT SEE your own buttons! But they do show up on other people their devices!