BDPluginLibrary: `0PluginLibrary.plugin.js` - error

TypeError: Cannot read properties of undefined (reading 'prototype')
    at ./src/ui/colorpicker.js (betterdiscord://plugins/0PluginLibrary.plugin.js:3845:56)
    at __webpack_require__ (betterdiscord://plugins/0PluginLibrary.plugin.js:6168:41)
    at ./src/ui/settings/types/color.js (betterdiscord://plugins/0PluginLibrary.plugin.js:5147:70)
    at __webpack_require__ (betterdiscord://plugins/0PluginLibrary.plugin.js:6168:41)
    at ./src/ui/settings/index.js (betterdiscord://plugins/0PluginLibrary.plugin.js:4792:70)
    at __webpack_require__ (betterdiscord://plugins/0PluginLibrary.plugin.js:6168:41)
    at ./src/ui/ui.js (betterdiscord://plugins/0PluginLibrary.plugin.js:6125:67)
    at __webpack_require__ (betterdiscord://plugins/0PluginLibrary.plugin.js:6168:41)
    at ./src/modules/pluginupdater.js (betterdiscord://plugins/0PluginLibrary.plugin.js:1712:60)
    at __webpack_require__ (betterdiscord://plugins/0PluginLibrary.plugin.js:6168:41)
    at ./src/structs/plugin.js (betterdiscord://plugins/0PluginLibrary.plugin.js:3585:80)
    at __webpack_require__ (betterdiscord://plugins/0PluginLibrary.plugin.js:6168:41)
    at ./src/structs/structs.js (betterdiscord://plugins/0PluginLibrary.plugin.js:3816:65)
    at __webpack_require__ (betterdiscord://plugins/0PluginLibrary.plugin.js:6168:41)
    at ./src/modules/domtools.js (betterdiscord://plugins/0PluginLibrary.plugin.js:656:65)
    at __webpack_require__ (betterdiscord://plugins/0PluginLibrary.plugin.js:6168:41)
    at ./src/modules/modules.js (betterdiscord://plugins/0PluginLibrary.plugin.js:1567:67)
    at __webpack_require__ (betterdiscord://plugins/0PluginLibrary.plugin.js:6168:41)
    at eval (betterdiscord://plugins/0PluginLibrary.plugin.js:6215:65)
    at eval (betterdiscord://plugins/0PluginLibrary.plugin.js:6322:3)
    at eval (betterdiscord://plugins/0PluginLibrary.plugin.js:6325:12)
    at N.requireAddon (betterdiscord/renderer.js:5:28792)
    at N.loadAddon (betterdiscord/renderer.js:5:6412)
    at N.loadAddon (betterdiscord/renderer.js:5:26460)
    at N.loadAllAddons (betterdiscord/renderer.js:5:9469)
    at N.initialize (betterdiscord/renderer.js:5:3284)
    at N.initialize (betterdiscord/renderer.js:5:25573)
    at Object.startup (betterdiscord/renderer.js:5:408848)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 35 (1 by maintainers)

Most upvoted comments

I found what 1Lighty changed to make it work. If you want to dig and change the code out on line 3843 within 0PluginLibrary.plugin.js, I must preface it is a bandaid workaround and not a fix. From: const Swatch = ColorPickerComponents?.CustomColorButton.prototype.render.call({props: {}}).type; To: const Swatch = ColorPickerComponents?.CustomColorButton?.prototype?.render?.call({props: {}})?.type;

Again I didn’t figure this out or know what I am talking about, but this appears to be working for me with my plugins.

INSTRUCTIONS HOW TO FIX

open in a text editor C:\Users\YOUR USER\AppData\Roaming\BetterDiscord\plugins\0PluginLibrary.plugin.js change line 3843 to const Swatch = ColorPickerComponents?.CustomColorButton?.prototype?.render?.call({props: {}})?.type; remove the second to last line of the whole file containing s;

done

Just started getting this as well, same error

same here

it works without XenoLib

hm, not only my problem

As other users above, i have same issue as them https://prnt.sc/KLYw3RB3sfHG @rauenzi

I’m getting the same thing

This has been fixed in the latest version.

I found what 1Lighty changed to make it work. If you want to dig and change the code out on line 3843 within 0PluginLibrary.plugin.js, I must preface it is a bandaid workaround and not a fix. From: const Swatch = ColorPickerComponents?.CustomColorButton.prototype.render.call({props: {}}).type; To: const Swatch = ColorPickerComponents?.CustomColorButton?.prototype?.render?.call({props: {}})?.type;

Again I didn’t figure this out or know what I am talking about, but this appears to be working for me with my plugins.

Thank you!

I found what 1Lighty changed to make it work. If you want to dig and change the code out on line 3843 within 0PluginLibrary.plugin.js, I must preface it is a bandaid workaround and not a fix. From: const Swatch = ColorPickerComponents?.CustomColorButton.prototype.render.call({props: {}}).type; To: const Swatch = ColorPickerComponents?.CustomColorButton?.prototype?.render?.call({props: {}})?.type;

Again I didn’t figure this out or know what I am talking about, but this appears to be working for me with my plugins.

ah, thank you! And thank to 1Lighty! Work for me

MessageLoggerV2 cant work witout XenoLib

yeah, it seems like problem is also in MessageLoggerV2

I found 1XenoLib.plugin.js being within the plugins folder causes a crash while the ZeresPluginLibary has an issue. Removing it should hopefully fix crashing unless you take further actions below.

With a working temp fix I found on Lighty’s Discord (MessageLoggerV2 and other plugin dev) for the ZeresPluginLibrary, the crashing stops and all of my plugins now work. I am not sure if I should be plugging this or not here.

I suppose I must suggest waiting for the official fix, but I hope this is helpful to some of you.

I found what 1Lighty changed to make it work. If you want to dig and change the code out on line 3843 within 0PluginLibrary.plugin.js, I must preface it is a bandaid workaround and not a fix. From: const Swatch = ColorPickerComponents?.CustomColorButton.prototype.render.call({props: {}}).type; To: const Swatch = ColorPickerComponents?.CustomColorButton?.prototype?.render?.call({props: {}})?.type;

Again I didn’t figure this out or know what I am talking about, but this appears to be working for me with my plugins.

Works

I don’t even have this “XenoLib” in my plugins folder, so I’m not so sure it’s that

same here, idk even which plugins need it so i can make discord work fine without it keeps crashing and restarting discord on its own