Zettlr: Cannot open directory

Created on 27 Oct 2020  Â·  18Comments  Â·  Source: Zettlr/Zettlr

Reproducing

Click "Open existing directory" button. Nothing happens.

Expected behaviour

Should open a dialog box to pick directory?

Platform

Zettlr Version: 1.8.0-beta
System: win32 10.0.19041 (architecture: x64)

Additional information

At first, I "upgraded" from 1.7.5 to 1.8.0-beta, then uninstalled and removed the AppData\Roaming\zettlr directory and reinstalled. Still the same issue.

Also, I enabled developer mode, but nothing happens when I click "Toggle developer tools" or "Open logs".

bug [critical] develop v1.8.x

All 18 comments

Are any log entries logged to disk? These should contain some useful information.

Here's how you find the logs:

After you quit the app, Zettlr will save the collected logs to disk. You can find them …

  • On Windows: C:\Users\<your username>\AppData\Roaming\zettlr\logs
  • On macOS: /Users/<your username>/Library/Application Support/zettlr/logs
  • On Linux: /home/<your username>/.config/zettlr/logs

They are named after the day where they were created in the format yyyy-mm-dd.log

This was logged when trying to open a directory:

[11:36:48] [Error] [Citeproc Provider] Could not load main CSL library: ENOENT: no such file or directory, open '' | Details: {"errno":-4058,"code":"ENOENT","syscall":"open","path":""}

And this when trying to open developer tools:

[11:38:03] [Error] [Menu Provider] Could not provide submenu: Menu Item debug-menu not found.

[11:38:03] [Error] [Menu Provider] Could not provide submenu: Menu Item debug-menu not found.

Okay, this is not good o.O

Does a re-start help?

[11:36:48] [Error] [Citeproc Provider] Could not load main CSL library: ENOENT: no such file or directory, open '' | Details: {"errno":-4058,"code":"ENOENT","syscall":"open","path":""}

Whoops, I forgot a security check, sorry!

Does a re-start help?

No, I have even uninstalled and reinstalled at least twice today. Doesn't help.

I'm also having this issue in 1.8.0-beta (installed from Zettlr-1.8.0-beta-amd64.deb) on Ubuntu 18.04. I don't see anything in the logs about trying to open a directory.

Aaaaaaah! I think I might have an idea where this comes from: would you mind activating debug mode in your preferences, save, and try this again? Because for me it works perfectly, BUT I also have debug mode enabled. This would explain the bug, if it works with debug mode enabled!

So, I just pushed some fixes to the menu, so the current develop-branch should work much better.

(However, I'm still stuck enabling the role-menuItems in non-native menus ...)

Debug mode didn't make a difference for me (I already had it on, and switching it off and then again on didn't help). I also tried the latest in the develop branch (with yarn test-gui) and opening directories didn't work there either and I saw nothing related in the cli logging (zettlr.log) after trying to open a directory.

Okay, next attempt: if you switch to use the native appearance (advanced preferences), does this solve the issue?

No, that doesn't help in either the 1.8.0.beta or the develop version.

So the menu is basically _kaput_?

I don't know what you mean with kaput. In the File menu, other things seem to work, except Open directory and Import dictionary (just noticed).

Oh okay, then apologies. I unfortunately don't know what causes this, because on my MacBook it works. However, I'm right now in the midst of cleaning up the whole menu logic, so possibly it's being fixed in one of the next commits. I'll tell you here once I finished rewriting that thing, so that you can see if it works somehow, or not!

I tracked the problem down for you. You have updated menu.darwin.json but not menu.win32.json.

E.g. the menu item "menu.open" runs command "dir-open" in Windows, but that command doesn't even exist anymore!

In the Windows code, "toggleDevTools" is an "id" (which doesn't work), but on Mac it's a "zettlrRole" (which works).

@cdaven Oh my God, I'm so sorry! But thank you so much for tracking it down! Fixing it right now in the source …

It's now all fixed, I just tested it out force-loading the win32-menu on macOS, and it works now. Thank you again for tracking it down, it helped extremely in finding the issue and fixing it! Very appreciated :)

You missed command: dir-open in toolbar.json:

"toolbar": [
        {
            "role": "button",
            "class": "dir-open",
            "command": "dir-open",
            "content": "{}",
            "title": "toolbar.dir_open",
            "icon": "folder-open"
        },

I'm not sure if you want to change the title to "menu.open_workspace"?

Ouh, thank you for reminding me, and yes tp your question!

Was this page helpful?
0 / 5 - 0 ratings