forscht / ddrive

Discord as a filesystem.
https://ddrive.forscht.dev
MIT License
490 stars 98 forks source link

Keep getting a unknown error #41

Closed snipernubz closed 1 year ago

snipernubz commented 1 year ago

Keep getting this error

discordFS >>> booting discordFS +0ms

  app === APP CRASHED :: UNKNOWN ERROR ===
  app  TypeError: Cannot read properties of undefined (reading 'type')
    at /data/data/com.termux/files/usr/lib/node_modules/@forscht/ddrive/src/discordFS/index.js:78:94                                                at arrayAggregator (/data/data/com.termux/files/usr/lib/node_modules/@forscht/ddrive/node_modules/lodash/lodash.js:511:34)
    at Function.groupBy (/data/data/com.termux/files/usr/lib/node_modules/@forscht/ddrive/node_modules/lodash/lodash.js:4885:16)                    at DiscordFS.load (/data/data/com.termux/files/usr/lib/node_modules/@forscht/ddrive/src/discordFS/index.js:78:39)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async startApp (/data/data/com.termux/files/usr/lib/node_modules/@forscht/ddrive/bin/ddrive:62:5) +0ms

Running it in termux

Node version: v16.18.1
NPM version: 8.19.2

It worked before, I had ~16 gb stored. I had this issue before but it somehow fixed it self by me uninstalling and switching back and forth between the 2 versions of node that termux provides, reinstalling ddrive each time

forscht commented 1 year ago

Hi @snipernubz Delete all the messages from channel which is not sent by the bot and it will work.

snipernubz commented 1 year ago

Yea that fixed it, shame I'm gonna have to reupload everything, be nice if there was a way to know what the offending file/message was

NoNameLmao commented 1 year ago

Yea that fixed it, shame I'm gonna have to reupload everything, be nice if there was a way to know what the offending file/message was

you can edit ddrive's code to console.log the message that is causing the error, so that you can find it and delete it without nuking the entire channel and all your uploaded files. this is how i fixed my issue (#40)

forscht commented 1 year ago

Fixed in version 3.7.1 #56