Obsidian freezing with popup "javascript error occured in the main process"

Hello,

Regularly when using obsidian, the software crashes opening this popup:

Do you have any idea what could be causing this problem?
thank you

I’m getting the same thing when running on Ubuntu.

Did you get anywhere with this?

I am also having this issue on ubuntu 22.10 , it is very annoying, as it happens frequently.

I’m experimenting with clearing local and session storage to see if that helps.

In developer tools (ctrl + shift + i), I went to the ‘Application’ tab and cleared these. If things look better, I’ll report back.

That didn’t help; I left my computer and when I came back, Obsidian had frozen and the error message was present.

However, there was an error in the console log as I’d left the developer tools open. It may or may not be related, but posting here just in case - auto-note-mover is trying to do something and throwing an error.

Same here. Using the AppImage on bullseye.

 lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

Screenshot 2023-08-14 11.50.23

I got the same error, but only when using Ulauncher, or the Ubuntu app launcher. When i go to Applications/ and double-click the AppImage, Obsidian launches without the error.

Obsidian version: 1.4.14
Ubuntu version: 22.04.3 LTS

I just reinstalled Obsidian using Flatpak, and the error went away. I can launch Obsidian using Ulauncher and the Ubuntu app launcher with no problems.

I used to get this error on ubuntu 22.04 once or twice a day with the AppImage. I switched to the snap install and it has been tock solid since.

Kubuntu 22.04 here, was working fine, but now every app package I’ve tried fails in this way. Although I haven’t tried flatpak since that install fails with a TLS error.

Guess I need to find a new notetaking app, again.

I get this problem every time I open up my obsidian from the launcher, but it runs in the terminal without any issues. does anyone have any more fixes

I fixed it (for me). It was a hardware driver issue; my laptop runs Intel Iris Xe but was only doing software rendering; when I pulled my configuration from Sync Vault, I had the hardware acceleration enabled. I assume Obsidian then tries to search for hardware, finding nothing and crashing. I believe it runs from the terminal because it has a fallback condition.

Hey folks,

I’m having the exact same problem here when I launch Obsidian from the KDE Menu:

image

I’m running the following:

Kubuntu 22.04.3:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy

I’m running the Debian Package:
$ dpkg -l | grep -i obsidian
ii obsidian 1.5.3 amd64

I’m running KDE Plasma 5.27.10 from the Kubuntu Backports PPA Repo

What do we need to do to get this resolved?
What do I need to provide to help the dev’s debug and fix it?

Thanks!

I am getting the same EPIPE error.

System:

Fedora 39 Workstation Gnome
6.7.4-200.fc39.x86_64
Installed with Flatpak through software centre
Obsidian version 1.5.3
Reinstalled many times.
Manually removed folder stored in /home/username/.var/app/md.obsidian.Obsidian/
This remained after removing Obsidian.

Unable to fix issue.
It appeared randomly.

I tried basically all the toggles in Flatseal to see if that would fix anything, it did not.

flatpak run md.obsidian.Obsidian 
Deleting cache directory: /home/paige/.var/app/md.obsidian.Obsidian/config/obsidian/GPUCache
Debug: Will run Obsidian with the following arguments: 
Debug: Additionally, user gave: 
[13:0218/204726.528608:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Error: ENOENT: no such file or directory, open '/home/paige/.var/app/md.obsidian.Obsidian/config/obsidian/obsidian.json'
    at Object.openSync (node:fs:601:3)
    at Object.func [as openSync] (node:electron/js2c/asar_bundle:2:1869)
    at Object.readFileSync (node:fs:469:35)
    at t.readFileSync (node:electron/js2c/asar_bundle:2:9212)
    at /app/resources/obsidian.asar/main.js:3:801
    at U (/app/resources/obsidian.asar/main.js:2:3373)
    at z (/app/resources/obsidian.asar/main.js:3:782)
    at module.exports (/app/resources/obsidian.asar/main.js:8:3756)
    at loadApp (/app/resources/app.asar/main.js:294:3)
    at Object.<anonymous> (/app/resources/app.asar/main.js:446:12) {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/paige/.var/app/md.obsidian.Obsidian/config/obsidian/obsidian.json'
}
LaunchProcess: failed to execvp:
xdg-settings
Uncaught Exception Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:930:11)
    at Socket._write (node:net:942:8)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at Writable.write (node:internal/streams/writable:337:10)
    at fn (/app/resources/app.asar/main.js:57:10)
    at Object.<anonymous> (/app/resources/app.asar/main.js:445:2)
    at Module._compile (node:internal/modules/cjs/loader:1269:14) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}
Uncaught Exception Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:930:11)
    at Socket._write (node:net:942:8)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at Writable.write (node:internal/streams/writable:337:10)
    at fn (/app/resources/app.asar/main.js:57:10)
    at Object.<anonymous> (/app/resources/app.asar/main.js:445:2)
    at Module._compile (node:internal/modules/cjs/loader:1269:14) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}
A JavaScript error occurred in the main process
Uncaught Exception:
Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:930:11)
    at Socket._write (node:net:942:8)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at Writable.write (node:internal/streams/writable:337:10)
    at fn (/app/resources/app.asar/main.js:57:10)
    at Object.<anonymous> (/app/resources/app.asar/main.js:445:2)
    at Module._compile (node:internal/modules/cjs/loader:1269:14)
Gtk-Message: 20:47:26.653: Failed to load module "pk-gtk-module"
Gtk-Message: 20:47:26.654: Failed to load module "pk-gtk-module"
[13:0218/204726.667505:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[13:0218/204726.667577:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
Uncaught Exception Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:930:11)
    at Socket._write (node:net:942:8)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at Writable.write (node:internal/streams/writable:337:10)
    at fn (/app/resources/app.asar/main.js:57:10)
    at runUpdate (/app/resources/app.asar/main.js:151:3)
    at update (/app/resources/app.asar/main.js:139:9) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}
Uncaught Exception Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:930:11)
    at Socket._write (node:net:942:8)
    at writeOrBuffer (node:internal/streams/writable:392:12)
    at _write (node:internal/streams/writable:333:10)
    at Writable.write (node:internal/streams/writable:337:10)
    at fn (/app/resources/app.asar/main.js:57:10)
    at runUpdate (/app/resources/app.asar/main.js:151:3)
    at update (/app/resources/app.asar/main.js:139:9) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}

This is the output from running flatpak run md.obsidian.Obsidian

Same thing in a fresh Fedora 39 install. Quite annoying.

image

Same problem for me on Fedora 39.

The appimage works fine.

Schermata del 2024-02-18 10-53-45

Same here, on Arch Linux, flatpak. This started after a flatpak update. I’m on Obsidian 1.5.3.
Screenshot from 2024-02-18 10-26-52

Found a fix, for flatpak: Multiple Errors when opening the App (app still opens) · Issue #297 · flathub/md.obsidian.Obsidian · GitHub

2 Likes