Davilarek / Vencord

The cutest Discord client mod + BD plugin support
GNU General Public License v3.0
18 stars 2 forks source link

[Bug] Virtual filesystem fails to load. Also no BD plugins are loaded. #8

Closed net-wayfarer closed 5 months ago

net-wayfarer commented 5 months ago

Discord Account

No response

What happens when the bug or crash occurs?

What is the expected behaviour?

Virtual filesystem to be fully operational, could see plugins and other files visible. BD plugins should also be visible whenever BD Compatibility Layer is enabled.

How do you recreate this bug or crash?

Errors

Failed to render the Virtual Filesystem tab. If this issue persists, try using the installer to reinstall!

TypeError: t.readdirSync is not a function at i (VencordRenderer:46:3926) at Object.getDirectorySize (VencordRenderer:46:4027) at VR (VencordRenderer:51:12884) at aS (WebpackModule502920:2:61101) at u (WebpackModule502920:2:116312) at sB (WebpackModule502920:2:99327) at eval (WebpackModule502920:2:99193) at sF (WebpackModule502920:2:99201) at sC (WebpackModule502920:2:95952) at sM (WebpackModule502920:2:96341)


* Inside Developer Console, related errors are provided:

Access to fetch at 'https://cors-get-proxy.sirjosh.workers.dev/https://github.com/jvilk/BrowserFS/releases/download/v1.4.3/browserfs.min.js' from origin 'https://discord.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

* * WebpackModule502920:2

TypeError: t.readdirSync is not a function at i (utils.ts:400:30) at Object.getDirectorySize (utils.ts:414:9) at VR (fileSystemViewer.tsx:168:61) at aS (WebpackModule502920:2:61101) at u (WebpackModule502920:2:116312) at sB (WebpackModule502920:2:99327) at eval (WebpackModule502920:2:99193) at sF (WebpackModule502920:2:99201) at sC (WebpackModule502920:2:95952) at sM (WebpackModule502920:2:96341) oe @ WebpackModule502920:2 a.componentDidCatch.n.callback @ WebpackModule502920:2 iW @ WebpackModule502920:2 oX @ WebpackModule502920:2 e @ WebpackModule502920:2 e @ WebpackModule502920:2 e @ WebpackModule502920:2 eval @ WebpackModule502920:2 sY @ WebpackModule502920:2 sM @ WebpackModule502920:2 r6 @ WebpackModule502920:2 eval @ WebpackModule502920:2

* * Logger.ts:35

TypeError: t.readdirSync is not a function at i (utils.ts:400:30) at Object.getDirectorySize (utils.ts:414:9) at VR (fileSystemViewer.tsx:168:61) at aS (WebpackModule502920:2:61101) at u (WebpackModule502920:2:116312) at sB (WebpackModule502920:2:99327) at eval (WebpackModule502920:2:99193) at sF (WebpackModule502920:2:99201) at sC (WebpackModule502920:2:95952) at sM (WebpackModule502920:2:96341) _log @ Logger.ts:35 error @ Logger.ts:53 componentDidCatch @ ErrorBoundary.tsx:73 a.componentDidCatch.n.callback @ WebpackModule502920:2 iW @ WebpackModule502920:2 oX @ WebpackModule502920:2 e @ WebpackModule502920:2 e @ WebpackModule502920:2 e @ WebpackModule502920:2 eval @ WebpackModule502920:2 sY @ WebpackModule502920:2 sM @ WebpackModule502920:2 r6 @ WebpackModule502920:2 eval @ WebpackModule502920:2

* * Logger.ts:35

Component Stack at VR (VencordRenderer:51:10706) at (VencordRenderer:14:12995) at r at (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:393373) at P (https://discord.com/assets/ad2c54753f28713bf39e.js:1:830) at N (https://discord.com/assets/58661.0e645890ea50d43648f6.js:12:3207272) at div at eval (WebpackModule706898:2:483) at N (https://discord.com/assets/58661.0e645890ea50d43648f6.js:12:3207272) at div at https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:7066211 at div at div at o (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:7511699) at div at https://discord.com/assets/58661.0e645890ea50d43648f6.js:1:188346 at t.default (https://discord.com/assets/ad2c54753f28713bf39e.js:1:8386) at A (https://discord.com/assets/ad2c54753f28713bf39e.js:1:4120) at (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:393373) at d (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:2562535) at https://discord.com/assets/49da5f7d58953b701b03.js:1:793 at d (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:2562535) at https://discord.com/assets/49da5f7d58953b701b03.js:1:2450 at Suspense at Suspense(UserSettings) at div at u (https://discord.com/assets/58661.0e645890ea50d43648f6.js:1:288933) at d (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:512670) at D (https://discord.com/assets/fec5de57df34e937e449.js:1:226775) at div at o (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:7511699) at b (https://discord.com/assets/fec5de57df34e937e449.js:1:227044) at U (https://discord.com/assets/fec5de57df34e937e449.js:1:228033) at div at d (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:649355) at https://discord.com/assets/fec5de57df34e937e449.js:1:211220 at t (https://discord.com/assets/58661.0e645890ea50d43648f6.js:12:1002477) at t (https://discord.com/assets/58661.0e645890ea50d43648f6.js:12:1003175) at ti (https://discord.com/assets/fec5de57df34e937e449.js:1:58502) at Suspense at at t (https://discord.com/assets/58661.0e645890ea50d43648f6.js:12:1002477) at t (https://discord.com/assets/58661.0e645890ea50d43648f6.js:12:1003175) at div at f (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:535974) at VerificationLayerProvider at (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:3316185) at u (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:3314895) at div at div at f (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:535974) at AppLayerProvider at T (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:2415322) at N (https://discord.com/assets/58661.0e645890ea50d43648f6.js:12:3207272) at D (WebpackModule628123:2:2564) at c (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:3355879) at E (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:3356334) at c (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:7119630) at l (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:523253) at I (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:2432749) at (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:702457) at d (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:5156156) at t.default (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:3349977) at J (https://discord.com/assets/web.d17559163f24cf3033c3.js:1:6466) at https://discord.com/assets/web.d17559163f24cf3033c3.js:1:11852 at c (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:7118784) at https://discord.com/assets/58661.0e645890ea50d43648f6.js:12:789801 at l (https://discord.com/assets/58661.0e645890ea50d43648f6.js:12:783973) at c (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:500486) at App at t (https://discord.com/assets/58661.0e645890ea50d43648f6.js:12:999741) at t (https://discord.com/assets/58661.0e645890ea50d43648f6.js:12:976805) at f (https://discord.com/assets/web.d17559163f24cf3033c3.js:1:37438) at (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:702457) at d (https://discord.com/assets/65573.886ca80ab9098ec249d8.js:1:5156156) _log @ Logger.ts:35 error @ Logger.ts:53 componentDidCatch @ ErrorBoundary.tsx:74 a.componentDidCatch.n.callback @ WebpackModule502920:2 iW @ WebpackModule502920:2 oX @ WebpackModule502920:2 e @ WebpackModule502920:2 e @ WebpackModule502920:2 e @ WebpackModule502920:2 eval @ WebpackModule502920:2 sY @ WebpackModule502920:2 sM @ WebpackModule502920:2 r6 @ WebpackModule502920:2 eval @ WebpackModule502920:2



### Request Agreement

- [X] I am using Discord Stable or tried on Stable and this bug happens there as well
- [X] I have read the requirements for opening an issue above

### Versions:
Discord: stable 284187 (557ee12)
BetterVencord: 4bf788e71d86fcb639f768fea4ceb0d6090a20d9
Electron: 28.2.10
Chromium: 120.0.6099.291
Host 0.0.49 x64
OpenAsar Nightly (4f264d8)
Linux 64-bit (6.8.5-arch1-1)
Davilarek commented 5 months ago

Hello, Are you using indexedDB or localStorage? (See in BD Compat Layer settings)

net-wayfarer commented 5 months ago

Thanks for the response. I am using IndexedDB

Davilarek commented 5 months ago

in console, try pasting this and please provide the output. BdCompatLayer.FSUtils.completeFileSystem()

net-wayfarer commented 5 months ago

Please find the attached output:

utils.ts:247 Uncaught TypeError: o.readdirSync is not a function
    at Object.readDirectory (utils.ts:247:26)
    at Object.completeFileSystem (utils.ts:301:45)
    at <anonymous>:1:23
readDirectory @ utils.ts:247
completeFileSystem @ utils.ts:301
(anonymous) @ VM734:1

completeFileSystem_error

Davilarek commented 5 months ago
const temp = {};
window.BrowserFS.install(temp);
window.BrowserFS.configure(
    {
        fs: "AsyncMirror",
        options: {
            sync: { fs: "InMemory" },
            async: { fs: "IndexedDB", options: { storeName: "VirtualFS" } },
        },
    },
    () => {
        console.log(window.BrowserFS.BFSRequire("fs").readdirSync("/"));
    }
);

how about this?

net-wayfarer commented 5 months ago
Uncaught TypeError: Cannot read properties of undefined (reading 'install')
    at <anonymous>:2:18
(anonymous) @ VM809:2

script_error

Davilarek commented 5 months ago

Can you post a screenshot of the BD Compat Layer settings screen?

net-wayfarer commented 5 months ago

bd_compat_layer

Davilarek commented 5 months ago

change cors proxy url to this one and reload your BetterVencord. https://cors-get-proxy.sirjosh.workers.dev/?url=

net-wayfarer commented 5 months ago

Thanks! that fixed it. fixed