Hello everyone, I’ve had an issue with discord on Arch Linux for a long time, but only now had the time to document the error (had to photograph it with phone and transcribe it).
Its a weird one, buckle up.
At random times, discord crashes which causes my polybar to crash, as well as my sxhkd, which obviously means my computer is practically useless until I hard shutdown using the power button on my case. Whats weird is that sometimes it will go weeks without crashing, and other times it will crash frequently in a short time span (e.g. it crashed a couple times yesterday, and once today).
Here is the error as I photographed it:

And here it is after I manually copied it into a text editor (keep in mind I might have missed a character here or there because of this).
A JavaScript Error occurred in the main process
Uncaught exception:
Error: EROFS: read-only file system, write
at writeSync (node:fs:923:3)
at SyncWriteStream._write (node:internal/fs/sync._write_stream:275)
at writeOrBuffer (node:internal/streams/writable:572:12)
at _write (node:internal/streams/writable:501:10)
at Writeable.write (node:internal/streams/writable:510:10)
at console.value (node:internal/console/constructor:298:16)
at console.warn (node:internal/console/constructor:405:26)
at transport.writeFn (/opt/discord/resources/app.asar/node_modules/electron-log/src/node/transports/console.js:45:7)
at transport (/opt/discord/resources/app.asar/node_modules/electron-log/src/node/transports/console.js:51:15)
at Logger.processMessage (/opt/discord/resources/app.asar/node_modules/electron-log/src/core/Logger.js:175:11)
Anyone have any idea how I can troubleshoot this?
I also tried checking the following directory but it doesn’t exist on my PC:
/opt/discord/resources/app.asar/node_modules/electron-log/src/core/
I only have the file /opt/discord/resources/app.asar So obviously something is going on there that shouldn’t be happening.
I’ve got no idea how to troubleshoot node apps, so would appreciate any help from those of you who have those skills.
Thanks in advance! Please let me know if you need more info or need me to run commands and show you the output, and Ill do so.
This sounds to me like something else is killing all your shit and it causes discord to crash first.
How would I try to track the issue down given I don’t exactly know when the issue will appear? Is there a way to set something like a listener on the discord process and just wait for it to happen and see what else happens around that time?
error is right here:
EROFS: read-only file systemthis line is concerning:
At random times
this sounds like a drive failure. Discord’s logger can’t write to the filesystem; it’s reporting as read-only.
what’s the drive like where
/optlives?As I mentioned replying to @just_another_person@lemmy.world, my root partition is on an NVME which is not even 3 years old yet, and I have not had any other problems with it apart from discord, so I don’t think its a drive failure issue, but better safe rather than sorry, so if you’d be so kind as to let me know how you’d like me to test/verify its health I’d appreciate it :)
Is it possible that the read-only error occurs because the directory its trying to write to doesn’t exist (
/opt/discord/resources/app.asar/node_modules/electron-log/src/core/doesnt exist)? It may be a stupid question but as I said I’ve no idea how node works so consider me as having the intelligence of a rock when it comes to itweird. i’d probably good around for drive checks personally, any test should be pretty definitive. how did you install Discord? the AUR? maybe a reinstall is in order.
i don’t think this is Node specific. if i were writing logs, i’d want to be pretty sure they get written, either by creating the directories necessary, putting them in a place i was pretty dang sure existed, and/or crashing as early as possible if the location didn’t exist, which makes me think it’s a weird Discord config error.
It seems Ive installed it through the official repositories:
$ pacman -Qm | grep "discord\|Discord" // EMPTY OUTPUTIll get back to you about the drive checks, either tomorrow evening or the day after. Ive got a technical assessment for a job position tomorrow so I’ll have to look into that issue after that. :)
I just replied to someone else below with regards to the drive checks. I could also go ask on the arch forums, or maybe in some irc chats if theres people actually in there
Could be drive failure, or maybe your package for discord is broken? I’d try discord flatpak even just as a troubleshooting step, but honestly that’s the preferred way to install these kinds of applications anyway
I dont believe its a drive failure after checking. Its a pretty new NVMe drive:
$ sudo smartctl -t short /dev/nvme0n1p3 smartctl 7.5 2025-04-30 r5714 [x86_64-linux-6.17.8-arch1-1] (local build) Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org Self-test has begun (NSID 0x1) Use smartctl -X to abort test $ sudo smartctl -H /dev/nvme0n1p3 smartctl 7.5 2025-04-30 r5714 [x86_64-linux-6.17.8-arch1-1] (local build) Copyright (C) 2002-25, Bruce Allen, Christian Franke, www.smartmontools.org === START OF SMART DATA SECTION === SMART overall-health self-assessment test result: PASSEDAlso with nvme-cli:
$ sudo nvme smart-log /dev/nvme0n1 Smart Log for NVME device:nvme0n1 namespace-id:ffffffff critical_warning : 0 <<<<======================= Seems good! temperature : 45 °C (318 K, 113 °F) available_spare : 100% available_spare_threshold : 10% percentage_used : 1% endurance group critical warning summary: 0 Data Units Read : 8034527 (4.11 TB) Data Units Written : 70423529 (36.06 TB) host_read_commands : 58265590 host_write_commands : 901798802 controller_busy_time : 10039 power_cycles : 340 power_on_hours : 1500 unsafe_shutdowns : 63 media_errors : 0 num_err_log_entries : 0 Warning Temperature Time : 0 Critical Composite Temperature Time : 0 Temperature Sensor 1 : 45 °C (318 K, 113 °F) Temperature Sensor 2 : 48 °C (321 K, 118 °F) Thermal Management T1 Trans Count : 0 Thermal Management T2 Trans Count : 0 Thermal Management T1 Total Time : 0 Thermal Management T2 Total Time : 0As for flatpacks, I’d like to avoid such install methods if possible, at least for now. Whats weird is I don’t think I’ve come across anyone else with this issue, so I doubt its something wrong in general with the packagement process.


