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

Logging - typst-preview process exited with code 101 #133

Closed
stellarpower opened this issue Sep 28, 2023 · 5 comments · Fixed by #147
Closed

Logging - typst-preview process exited with code 101 #133

stellarpower opened this issue Sep 28, 2023 · 5 comments · Fixed by #147
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@stellarpower
Copy link

stellarpower commented Sep 28, 2023

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior (Library test):

  1. I open a folder in VS Code container my Typst file.
  2. Open a document in the editor.
  3. Select F1 -> Typst Preview from the menu
  4. I get a toast-style popup telling me the process didn't complete. There are no logs I can click to view

Form looking online, I just learned I can find a folder where VS Code keeps extension logs. Turns out to be an iwatchnotify problem. But, it would be easier overall if I can click to see some details if and when the process crashes, in the popup message that appears.

Thanks

Package/Software version:

VSCode version(Help -> About):

Version: 1.81.1
Commit: 6c3e3dba23e8fadc360aed75ce363ba185c49794
Date: 2023-08-09T22:18:39.991Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 6.2.0-27-generic

typst-preview extension version: v0.8.1

Logs:
N/A

@Enter-tainer
Copy link
Owner

I remember clangd and rust analyzer can do that. It provides a link to output when the lsp crashes. We may see how it is implemented

@Enter-tainer Enter-tainer added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Sep 30, 2023
@ntjess
Copy link

ntjess commented Oct 15, 2023

The crash is also visible in the Output pane if you select the logs from typst-preview. Here is mine:

[2023-10-15T10:15:29Z ERROR typst_preview::actor::typst] TypstActor: failed to create filesystem watcher: Too many open files (os error 24)
thread 'main' panicked at 'explicit panic', src/actor/typst.rs:98:17
stack backtrace:
   0: rust_begin_unwind
             at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/std/src/panicking.rs:593:5
   1: core::panicking::panic_fmt
             at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/panicking.rs:67:14
   2: core::panicking::panic
             at /rustc/d5c2e9c342b358556da91d61ed4133f6f50fc0c3/library/core/src/panicking.rs:117:5
   3: typst_preview::actor::typst::TypstActor::new
   4: tokio::runtime::park::CachedParkThread::block_on
   5: tokio::runtime::context::runtime::enter_runtime
   6: tokio::runtime::runtime::Runtime::block_on
   7: typst_preview::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[2023-10-15T17:25:40Z INFO  typst_preview] Arguments: CliArguments {
        font_paths: [],
        root: Some(
            "<project-root>",
        ),
        data_plane_host: "127.0.0.1:0",
        control_plane_host: "127.0.0.1:0",
        static_file_host: "127.0.0.1:0",
        dont_open_in_browser: true,
        enable_partial_rendering: true,
        input: "<project-root>/main.typ",
    }

@stellarpower
Copy link
Author

Oh, in the Output pane. I had never seen that you could use the drop-down there, thank you.

Currently (0.8.2) I get the error message back from the typst CLI, but, not what was calling it:

error: unexpected argument '--data-plane-host' found

Usage: typst [OPTIONS] <COMMAND>

For more information, try '--help'.

Would be good to see the full command being invoked I think.

@Enter-tainer
Copy link
Owner

Usage: typst [OPTIONS]

this is strange. why it calls typst? did you manually changes some config?

@stellarpower
Copy link
Author

I think I glossed over the settings and didn't realise typst-preview is a separate binary. I think having the command that was called as well as the output would still be good though :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants