Skip to content
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

Can't restart obsidian #90

Open
Anthony-Jhoiro opened this issue Jan 16, 2024 · 5 comments
Open

Can't restart obsidian #90

Anthony-Jhoiro opened this issue Jan 16, 2024 · 5 comments

Comments

@Anthony-Jhoiro
Copy link

Anthony-Jhoiro commented Jan 16, 2024

Describe the bug
When running the latest version of obsidian, obsidian crashes when it re-starts without error logs.

I set obsidian-remote with the config and vaults as volumes like in the example docker-compose. It worked fine for a time, but in the past weeks, I have been unable to restart obsidian. It seems to be due to the obsidian config since it works when I remove it.

This is blocking for me since I can't synchronize the sync settings.

To restart obsidian, I used the method described at the bottom of the README and tried restarting the container. Both give the same result.

Edit:
This seems to be due to the updated version. When removing the downloaded .asar file, it works fine again, but when it re-downloads, it breaks again.

To Reproduce
Steps to reproduce the behavior:

  1. Start this docker-compose
version: "3"

services:
  obsidian:
    image: 'ghcr.io/sytone/obsidian-remote:latest'
    container_name: obsidian-remote
    restart: unless-stopped
    pull_policy: always
    ports:
      - 80:8080
      - 443:8443
    volumes:
      - /home/anthony/obsidian/vaults:/vaults
      - /home/anthony/obsidian/config:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Paris
      - KEYBOARD=fr-fr-azerty
      - DOCKER_MODS=linuxserver/mods:universal-git
  1. Connect the right host and port in your browser, obsidian should open as normal
  2. Stop obsidian using the top-right icon
  3. right click and relaunch Obsidian
  4. Obsidian opens with a blank screen and no logs

Expected behavior
Obsidian should restart without errors

Desktop (please complete the following information):

  • OS: Debian 11
  • Browser Brave / Chrome
  • Version latest, obsidian 1.5.3

Additional context

After restart screenshot:
image

Docker compose logs:

obsidian-remote  | xrdp-chansrv [0293284360]: sound_init:
obsidian-remote  | xrdp-chansrv [0293284361]: audin_init:
obsidian-remote  | xrdp-chansrv [0293284363]: sound_process_output_format:
obsidian-remote  | xrdp-chansrv [0293284363]:       wFormatTag      1
obsidian-remote  | xrdp-chansrv [0293284363]:       nChannels       2
obsidian-remote  | xrdp-chansrv [0293284363]:       nSamplesPerSec  44100
obsidian-remote  | xrdp-chansrv [0293284363]:       nAvgBytesPerSec 176400
obsidian-remote  | xrdp-chansrv [0293284363]:       nBlockAlign     4
obsidian-remote  | xrdp-chansrv [0293284363]:       wBitsPerSample  16
obsidian-remote  | xrdp-chansrv [0293284363]:       cbSize          0
obsidian-remote  | xrdp-chansrv [0293284363]: sound_process_output_format:
obsidian-remote  | xrdp-chansrv [0293284363]:       wFormatTag      1
obsidian-remote  | xrdp-chansrv [0293284363]:       nChannels       2
obsidian-remote  | xrdp-chansrv [0293284363]:       nSamplesPerSec  22050
obsidian-remote  | xrdp-chansrv [0293284363]:       nAvgBytesPerSec 88200
obsidian-remote  | xrdp-chansrv [0293284363]:       nBlockAlign     4
obsidian-remote  | xrdp-chansrv [0293284363]:       wBitsPerSample  16
obsidian-remote  | xrdp-chansrv [0293284363]:       cbSize          0
obsidian-remote  | xrdp-chansrv [0293284489]: sound_process_training: round trip time 126
obsidian-remote  | guacd[481]: INFO:	RDPDR user logged on
obsidian-remote  | [20240116-09:07:19] [INFO ] channel_thread_loop: trans_check_wait_objs error resetting
obsidian-remote  | xrdp-chansrv [0294023474]: scard_deinit:
obsidian-remote  | chansrv:smartcard_pcsc [0294023474]: scard_pcsc_deinit:
obsidian-remote  | [20240116-09:07:21] [INFO ] Socket 13: AF_UNIX connection received
obsidian-remote  | process_message_channel_setup: chan name 'cliprdr' id 0 flags 00000000
obsidian-remote  | process_message_channel_setup: chan name 'rdpdr' id 1 flags 00000000
obsidian-remote  | process_message_channel_setup: chan name 'rdpsnd' id 2 flags 00000000
obsidian-remote  | xrdp-chansrv [0294025245]: sound_init:
obsidian-remote  | xrdp-chansrv [0294025246]: audin_init:
obsidian-remote  | xrdp-chansrv [0294025251]: sound_process_output_format:
obsidian-remote  | xrdp-chansrv [0294025251]:       wFormatTag      1
obsidian-remote  | xrdp-chansrv [0294025251]:       nChannels       2
obsidian-remote  | xrdp-chansrv [0294025251]:       nSamplesPerSec  44100
obsidian-remote  | xrdp-chansrv [0294025251]:       nAvgBytesPerSec 176400
obsidian-remote  | xrdp-chansrv [0294025251]:       nBlockAlign     4
obsidian-remote  | xrdp-chansrv [0294025251]:       wBitsPerSample  16
obsidian-remote  | xrdp-chansrv [0294025251]:       cbSize          0
obsidian-remote  | xrdp-chansrv [029402525rdpInDeferredRepeatCallback:
obsidian-remote  | rdpkeybChangeKeyboardControl:
obsidian-remote  | rdpkeybChangeKeyboardControl: autoRepeat off
obsidian-remote  | rdpInDeferredRepeatCallback:
obsidian-remote  | rdpkeybChangeKeyboardControl:
obsidian-remote  | rdpkeybChangeKeyboardControl: autoRepeat off

Obsidian logs:

2024-01-16 08:53:26 Loading main app package /squashfs-root/resources/obsidian.asar
2024-01-16 08:53:27 Checking for update using Github
2024-01-16 08:53:27 Success.
2024-01-16 08:53:27 Latest version is 1.5.3
2024-01-16 08:53:27 Downloading update from https://github.com/obsidianmd/obsidian-releases/releases/download/v1.5.3/obsidian-1.5.3.asar.gz
2024-01-16 08:53:27 Verifying hash & signature. Size= 8515395
2024-01-16 08:53:28 Saving file
2024-01-16 08:53:28 Update complete.
2024-01-16 08:56:45 Loading updated app package /config/.config/obsidian/obsidian-1.5.3.asar
2024-01-16 08:56:46 Checking for update using Github
2024-01-16 08:56:46 Success.
2024-01-16 08:56:46 Latest version is 1.5.3
2024-01-16 08:56:46 App is up to date.
@EyeOfIllu
Copy link

Hi.

I had a same issue. First I thought the issue was by old version of Docker on my Synology server or lack of git was a problem. Next I used a LXC container using same methodology and Docker Compose file like others, but nothing work. Only white window.

Finally, I found a solution. I used a docker hub repo instead of Github Container Repository (ghcr.io).
A few days ago, author push new release to this repository (Mar 18, 2024). This release doesn't have a new version of installer, but Obsidian will be updated to the newest version without any issue.

@jtwhitlow
Copy link

When I closed out the obsidian app, I now just get a blank screen. I have restarted the container and also even tried to point to a different obsidian repo with no luck. Any way to get it back up?

@ironon
Copy link

ironon commented Jun 21, 2024

Still having this problem.

I believe, similarly to the original post here, that the obsidian.asar in the obsidian config directory is somehow related to the issue. By making sure this file does not exist prior to starting the docker container, everything will work perfectly fine. However, if it does exist, this error will be thrown.

(node:308) electron: Failed to load URL: app://obsidian.md/starter.html with error: ERR_BLOCKED_BY_CLIENT
(Use `obsidian --trace-warnings ...` to show where the warning was created)

This is accompanied by a white screen in the web interface, where the terminal and all other Guacamole actions work perfectly fine, it's just that Obsidian refuses to display anything under any circumstance. The error above suggests that the white screen is caused by Obsidian being unable to load a certain html file. I'm not skilled enough yet at Docker to figure out where the obsidian executable is being called, so that I can add the --trace-warnings flag, so I'm not entirely sure what already having Obsidian downloaded has to do with Obsidian refusing to load a certain html file.

See comment below for better solution than this.

As a jank, who-gave-me-this-much-power hacky solution, I've modified my container start command to delete that specific file whenever I boot up my container, and this fixes the problem whenever you reboot the container. This does not fix it when you close Obsidian and reopen it in the same instance of the container.

 rm /root/config/.config/obsidian/obsidian-1.6.3.asar ; docker run --rm -it -v /root/vaults:/vaults -v /root/config:/config -p 8080:8080 ghcr.io/sytone/obsidian-remote:latest

If you follow my terrible path and choose to do this, change /root/config/.config/obsidian/obsidian-1.6.3.asar for the actual file path of your .asar file, as the obsidian version and the place you have chosen to put it may be different.

@ironon
Copy link

ironon commented Jun 21, 2024

@ironon
Copy link

ironon commented Jun 21, 2024

Found a better workaround.

This issue was mentioned in the original README.md of obsidian-remote, where the screen goes all white, and you're supposed to be able to right click and click Obsidian when that happens, to fix it. That wasn't working for me, and would create a new white screen. I fixed this by overriding the /config/.config/openbox/menu.xml with a new Obsidian launch command that deletes the .asar file before every launch. Same principle as my workaround above, but now it works without having to restart the container.

My launch command for the container:

mkdir /root/config
mkdir /root/config/.config
mkdir /root/config/.config/openbox
cat patch.xml > /root/config/.config/openbox/menu.xml
rm /root/config/.config/obsidian/obsidian-1.6.3.asar ; docker run --rm -it -v /root/vaults:/vaults -v /root/config:/config -e PASSWORD="password" -e TITLE="best vault ever" -p 8080:8080 ghcr.io/sytone/obsidian-remote:latest

patch.xml (must be in same folder as start.sh)

<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
    <menu id="root-menu" label="MENU">
        <item label="NEW Obsidian" icon="/squashfs-root/usr/share/icons/hicolor/48x48/apps/obsidian.png">
            <action name="Execute">
                <command>/usr/bin/xterm -e "rm /config/.config/obsidian/obsidian-1.6.3.asar ; /squashfs-root/obsidian --no-sandbox --trace-warnings --disable-dev-shm-usage --disable-gpu --disable-software-rasterizer"</command>
            </action>
        </item>
        <item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm">
            <action name="Execute">
                <command>/usr/bin/xterm</command>
            </action>
        </item>
        <item label="Reload OB">
            <action name="Reconfigure" />
        </item>
    </menu>
</openbox_menu>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants