-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
[Issue] AccountSwitcher could not be constructed #79
Comments
I don't have token encryption and I still have the same bug. This is a problem with the discord update. |
Hi, this is a bug with account switcher itself, everyone has the same error, lets hope it gets fixed, ill take look and try to fix it, |
tnx |
I have made my own plugin to allow account switching using keydown and keyup event handlers. Maybe this code will be useful for this plugin and someone else can port over the changes. |
Hello, thank you very much. |
I also have the same issue with the latest version of plugin. Having the same issue, i got these logs if they would be useful to the dev. I think there is something wrong with the Libraries this plugin is using, WebpackModules esp. AccountSwitcher.plugin.js:119 Uncaught TypeError: Class extends value undefined is not a constructor or null
at plugin (AccountSwitcher.plugin.js:119)
at AccountSwitcher.plugin.js:579
at AccountSwitcher.plugin.js:580
at AccountSwitcher.plugin.js:581
at AccountSwitcher.plugin.js:586
at Object.getFileModification (<anonymous>:4:307707)
at Object..js (<anonymous>:4:267851)
at Function.o._load (<anonymous>:4:370475)
at Object.loadAddon (<anonymous>:4:268008)
at Object.loadAddon (<anonymous>:4:305956)
at Object.loadAllAddons (<anonymous>:4:270683)
at Object.initialize (<anonymous>:4:265130)
at Object.initialize (<anonymous>:4:305166)
at Object.startup (<anonymous>:4:367245) LineNo 119 corresponds to, const KeyRecorder def, }
);
}
const KeyRecorder = class KeyRecorder extends WebpackModules.getByDisplayName("KeyRecorder") {
render() {
const ButtonOptions = WebpackModules.getByProps("ButtonLink");
const Button = ButtonOptions.default;
const ret = super.render();
ret.props.children.props.children.props.children.push(
React.createElement(
DiscordModules.FlexChild, |
It's not worth it anymore, just wait until discord provides it |
Your fix fixes nothing. |
|
This worked for me, thanks |
None of the above solutions seem to work whether it is the current Localhost version or the Omen one. It appears to me that anyone installing this for the first time is going to encounter the same issue that I did that a fresh install disables the setup button and there appears to be no easy/simple way to set up accounts to continue using this plugin. This is on top of the current issue continuing to pop up. Moving the plugin out of and back into the plugin folder does not resolve the inability to set up new accounts. Any chance this can be fixed or a proper/official solution can be updated on the read me to confirm what users should do doing going forward? This might save other users the frustrations that I had. |
It totally works mate, just need to comment out lines 118 --> 170 ty |
The current fix is to config the plugin as you want, and once you configured it just comment the lines mentionned and you good |
The setup button is grayed out for me so I am unable to get a box to add/remove accounts or adjust the keybindings. This is after reloading the plugin with or without the 118=>170 lines commented out. I would use the built in account switcher if it wasn't for the fact that it limits you to five accounts. Perhaps if this is implemented as is then this mod can use that same menu but allow more accounts to be added after the first 5. |
{ |
You can try to do your config by hand with this template I sent |
Tried this and now I get the same issue as earlier reported where the Discord account switcher interferes. |
Changes Keybind classes to be defined on settings page opening. aarondoet#79
This issue was first pointed out in #78.
Steps to reproduce the behavior:
Additional Information:
The root of this issue is that Discord is moving towards lazy loading (see doc from mozilla).
The module you are depending on in line 118, KeyRecorder, does not get loaded until after you are in the main interface of Discord.
I suggest moving towards adding a keydown event listener as seen being used in other BD plugins I've seen. I would've opened a PR today but due to my handicap of never touching JavaScript before in my entire life, that didn't happen lmfao
The text was updated successfully, but these errors were encountered: