Skip to content

Export path selection problem on Linux desktop #14861

Closed
@realysy

Description

@realysy

Linux 桌面端导出路径选择问题

v3.1.29 无法导出:一直提示“正在导出,请稍等...”

Is there an existing issue for this?

  • I have searched the existing issues

Can the issue be reproduced with the default theme (daylight/midnight)?

  • I was able to reproduce the issue with the default theme

Could the issue be due to extensions?

  • I've ruled out the possibility that the extension is causing the problem.

Describe the problem

更新到v3.1.29之后无法导出笔记为PDF or Docx,右上角一直提示“正在导出,请稍等...”,导出时选择的文件夹~/Documents中没有生成文件。

根据日志发现导出时文件夹的选择功能有问题,

  • 当选择的文件夹内不含文件和子文件夹时,无法选择该文件夹作为导出位置
  • 当选择的文件夹内含有子文件夹,会进一步打开子文件夹
  • 当选择的文件夹内含有文件时,会选择第一个文件作为导出位置,从而报错:mkdir [/home/tom/Documents/README.md] failed: mkdir /home/tom/Documents/README.md: not a directory

未验证最新版是否修复此bug,看Changelog似乎没有。

Expected result

正确导出文件到选定的文件夹。

Screenshot or screen recording presentation

No response

Version environment

- Version: v3.1.29
- Operating System: Ubuntu 20.04 Linux, Gnome
- Browser (if used): -

Log file

siyuan.log

More information

No response

Activity

88250

88250 commented on May 24, 2025

@88250
Member

你好,我这里使用最新版在 Ubuntu 20.04.6 (Windows/WSL)上测试导出 docx 可以选择文件夹路径,下面有子文件或者文件夹时也可以正常导出:

issue.webm

我不太确定是不是原生系统上有问题,或者你先升级下思源看看。

这个问题暂时关闭了,如果有进一步信息欢迎随时跟帖,感谢反馈。

self-assigned this
on May 24, 2025
realysy

realysy commented on May 26, 2025

@realysy
Author

v3.1.30 同样有这个问题

88250

88250 commented on May 26, 2025

@88250
Member

有可能是 electron 的问题……?暂时保持打开一段时间看看其他 Linux 用户是否也遇到,谢谢。

reopened this on May 26, 2025
changed the title [-]v3.1.29 无法导出:一直提示“正在导出,请稍等...”[/-] [+]Linux 桌面端导出路径选择问题[/+] on May 26, 2025
realysy

realysy commented on May 27, 2025

@realysy
Author

随便挑了一个旧版 v3.1.22 没问题。

发现了新旧版导出时存在如下区别,供定位问题:

  • 新版在导出的时候会弹出一个独立的“门户”窗口:
    Image
  • 旧版的导出窗口和思源笔记主窗口是在一起的(下图三点中有一个为导出选择位置的窗口):
    Image
88250

88250 commented on May 27, 2025

@88250
Member

方便的话麻烦再逐个版本升级尝试下,帮我们看看最近没有问题的版本是哪个,谢谢!

realysy

realysy commented on May 27, 2025

@realysy
Author

v3.1.28 没问题,v3.1.29 开始有问题,中间的pre-release就测不了了,我安装的是.deb,pre-release没有deb包

88250

88250 commented on May 27, 2025

@88250
Member

收到,我们排查下代码,多谢!

added this to the 3.1.32 milestone on May 27, 2025
88250

88250 commented on May 28, 2025

@88250
Member

在 v3.1.29 中我们升级了 Electron v35.3.0,可能是其中的这个改动造成的问题 electron/electron#46936

下个版本我们会升级 Electron v35.4.0,可能已经修复该问题 electron/electron#47025

#14926

changed the title [-]Linux 桌面端导出路径选择问题[/-] [+]Export path selection problem on Linux desktop[/+] on May 28, 2025

6 remaining items

realysy

realysy commented on May 29, 2025

@realysy
Author

导出的时候还是无法选择文件夹,和之前现象一样:

  • 当有子文件夹或包含文件的时候,可以选择子文件夹or文件,选择子文件夹的话会打开让进一步选择;选择文件的话就导出失败了
    Image

  • 当文件夹为空时,无法选择当前路径导出
    Image

88250

88250 commented on May 29, 2025

@88250
Member

我可能搞不定这个问题,暂时只能搁置了,看看社区其他开发者能否帮助解决。

不知道和这个有没有关联 https://www.electronjs.org/docs/latest/breaking-changes#behavior-changed-dialog-apis-defaultpath-option-on-linux

removed this from the 3.1.32 milestone on May 29, 2025
realysy

realysy commented on May 29, 2025

@realysy
Author

可以降级electron到v3.1.28中使用的版本试试吗

88250

88250 commented on May 29, 2025

@88250
Member

是个好主意,稍后我降级打个包

realysy

realysy commented on May 29, 2025

@realysy
Author

这个版本没问题。

另外前面提到新旧版导出窗口不同,我看了两者导出窗口进程对应cmd的区别:

  • 没问题的旧版以及刚刚这个降electron版本的新版:
     /opt/SiYuan/siyuan \
      --type=renderer --enable-crash-reporter=29a43xxxxxxxxxxfdcb17d,no_channel \
      --user-data-dir=/home/tom/.config/SiYuan-Electron --app-path=/opt/SiYuan/resources/app \
      --no-sandbox --no-zygote --lang=zh-CN --num-raster-threads=4 \
      --enable-main-frame-before-activation --renderer-client-id=10 \
      --time-ticks-at-unix-epoch=-1748482013277017 --launch-time-ticks=13795067365 \
      --shared-files=v8_context_snapshot_data:100 \
      --field-trial-handle=3,i,9138905266147026902,16407307042467272707,262144 \
      --enable-features=PlatformHEVCDecoderSupport \
      --disable-features=SpareRendererForSitePerProcess \
      --variations-seed-version
  • 有问题的新版:
      /proc/self/exe \
      --type=renderer --enable-crash-reporter=29a43xxxxxxxxxxfdcb17d,no_channel \
      --user-data-dir=/home/tom/.config/SiYuan-Electron --app-path=/opt/SiYuan/resources/app \
      --no-sandbox --no-zygote --lang=zh-CN --num-raster-threads=4 \
      --enable-main-frame-before-activation --renderer-client-id=13 \
      --time-ticks-at-unix-epoch=-1748482013277016 --launch-time-ticks=12788788417 \
      --shared-files=v8_context_snapshot_data:100 \
      --field-trial-handle=3,i,1452639067294415992,755960606206084564,262144 \
      --enable-features=PdfUseShowSaveFilePicker,PlatformHEVCDecoderSupport \
      --disable-features=EnableOopPrintDrivers,SpareRendererForSitePerProcess \
      --variations-seed-version

主要区别应该是--enable-features--disable-features不同,希望有助于定位问题。

88250

88250 commented on May 29, 2025

@88250
Member

调整了个 electron 的参数 app.commandLine.appendSwitch("xdg-portal-required-version", "4");,麻烦再帮忙试试。

https://github.com/siyuan-note/siyuan/releases/download/v3.1.32-dev2/siyuan-v202505291728-linux-electron-35.5.0.deb

realysy

realysy commented on May 29, 2025

@realysy
Author

可以的,这个也没问题

88250

88250 commented on May 29, 2025

@88250
Member

ok,多谢,那这个问题就算解决了 🎉

added this to the 3.1.32 milestone on May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@realysy

      Issue actions

        Export path selection problem on Linux desktop · Issue #14861 · siyuan-note/siyuan