Skip to content

浏览器端不使用内核伺服设备的剪贴板 #7206

Closed
@HowcanoeWang

Description

@HowcanoeWang

该问题是否已经被报告过了? Is there an existing issue for this?

  • 我已经搜索了 Issues,没有发现类似问题
    I have searched the existing issues

该问题是否能够在默认主题(daylight/midnight)下重现? Can the issue be reproduced with the default theme (daylight/midnight)?

  • 我能够在默认主题下重现该问题
    I was able to reproduce the issue with the default theme

描述问题 Describe the problem

感觉是2.6版本更新之后开始出现的

windows上开伺服(用了内网穿透之后)在实验室的mac上面用Edge远程访问使用思源。

当且仅当,Windows伺服主机的剪贴板中存放的是文件或图片时:

使用Edge进行远程访问,使用snapaste截屏之后,ctrl+v粘贴,出现的是windows上之前复制的图片,或者是windows之前复制过的文件。(文本类和带图片链接的markdown类,正常)

在windows上复制一段代码或者文本,替换掉剪贴板中的图片或文件,就没有这个bug了,Edge的远程端粘贴图片正常了

期待的结果 Expected result

恢复正常的伺服剪贴板粘贴功能

截屏或者录屏演示 Screenshot or screen recording presentation

image

在另一台windows上粘贴,也一样

image

版本环境 Version environment

- Version: 2.7.1
- Operating System: Win11 + MacOS
- Browser (if used): Edge

日志文件 Log file

    ___                                   ___           ___           ___
    /  /\        ___           ___        /__/\         /  /\         /__/\
   /  /:/_      /  /\         /__/|       \  \:\       /  /::\        \  \:\
  /  /:/ /\    /  /:/        |  |:|        \  \:\     /  /:/\:\        \  \:\
 /  /:/ /::\  /__/::\        |  |:|    ___  \  \:\   /  /:/~/::\   _____\__\:\
/__/:/ /:/\:\ \__\/\:\__   __|__|:|   /__/\  \__\:\ /__/:/ /:/\:\ /__/::::::::\
\  \:\/:/~/:/    \  \:\/\ /__/::::\   \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\~~\/
 \  \::/ /:/      \__\::/    ~\~~\:\   \  \:\  /:/   \  \::/       \  \:\  ~~~
  \__\/ /:/       /__/:/       \  \:\   \  \:\/:/     \  \:\        \  \:\
    /__/:/        \__\/         \__\/    \  \::/       \  \:\        \  \:\
    \__\/                                 \__\/         \__\/         \__\/
I 2023/01/30 10:15:29 runtime.go:49: kernel is booting:
   * ver [2.7.1]
   * arch [amd64]
   * pid [29772]
   * runtime mode [prod]
   * working directory [C:\Program Files\SiYuan\resources]
   * read only [false]
   * container [std]
   * database [ver=20220501]
   * workspace directory [C:\Users\hwang\Documents\SiYuan]
I 2023/01/30 10:15:29 runtime.go:94: use network proxy [system]
I 2023/01/30 10:15:29 serve.go:108: kernel [pid=29772] http server [0.0.0.0:56532] is booting
I 2023/01/30 10:15:30 sync.go:69: sync before boot
I 2023/01/30 10:15:30 working.go:396: built-in pandoc [ver=2.19.2, bin=C:\Users\hwang\Documents\SiYuan\temp\pandoc\bin\pandoc.exe]
I 2023/01/30 10:15:30 tesseract.go:123: tesseract-ocr enabled [ver=v5.0.1.20220118, langs=chi_sim+chi_sim_vert+chi_tra+chi_tra_vert+eng+jpn+jpn_vert+osd+script/HanS+script/HanS_vert+script/HanT+script/HanT_vert+script/Japanese+script/Japanese_vert]
I 2023/01/30 10:15:31 serve.go:121: reverse proxy server [0.0.0.0:6806] is booting
I 2023/01/30 10:15:36 repository.go:834: boot get sync cloud files elapsed [6.96s]
I 2023/01/30 10:15:37 blocktree.go:468: read block tree [13 MB] to [C:\Users\hwang\Documents\SiYuan\temp\blocktree], elapsed [0.12s]
I 2023/01/30 10:15:37 conf.go:615: database size [188 MB], tree/block count [794/41235]
I 2023/01/30 10:15:37 working.go:157: kernel booted
I 2023/01/30 10:15:37 box.go:74: auto stat [trees=794, blocks=41235, dataSize=70 MB, assetsSize=16 MB]
I 2023/01/30 10:15:37 disk.go:33: disk usage [total=2.0 TB, used=786 GB, free=1.2 TB]
I 2023/01/30 10:20:34 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=80 kB, db=151 kB] in [1.99s]
I 2023/01/30 10:28:37 repository.go:935: synced data repo [provider=0, ufc=1, dfc=0, ucc=0, dcc=0, ub=80 kB, db=151 kB] in [1.86s]
I 2023/01/30 10:36:40 repository.go:935: synced data repo [provider=0, ufc=1, dfc=0, ucc=0, dcc=0, ub=80 kB, db=151 kB] in [1.91s]
I 2023/01/30 10:44:43 repository.go:935: synced data repo [provider=0, ufc=1, dfc=0, ucc=0, dcc=0, ub=79 kB, db=151 kB] in [2.21s]
I 2023/01/30 11:00:46 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=80 kB, db=151 kB] in [2.03s]
I 2023/01/30 11:32:52 repository.go:935: synced data repo [provider=0, ufc=1, dfc=0, ucc=0, dcc=0, ub=80 kB, db=151 kB] in [3.13s]
I 2023/01/30 12:15:37 box.go:74: auto stat [trees=794, blocks=41235, dataSize=70 MB, assetsSize=16 MB]
I 2023/01/30 12:15:37 disk.go:33: disk usage [total=2.0 TB, used=787 GB, free=1.2 TB]
I 2023/01/30 12:36:55 repository.go:935: synced data repo [provider=0, ufc=1, dfc=0, ucc=0, dcc=0, ub=80 kB, db=151 kB] in [1.84s]
I 2023/01/30 14:15:37 box.go:74: auto stat [trees=794, blocks=41235, dataSize=70 MB, assetsSize=16 MB]
I 2023/01/30 14:15:37 disk.go:33: disk usage [total=2.0 TB, used=787 GB, free=1.2 TB]
I 2023/01/30 14:45:00 repository.go:935: synced data repo [provider=0, ufc=1, dfc=0, ucc=0, dcc=0, ub=80 kB, db=151 kB] in [2.02s]
I 2023/01/30 15:03:07 repository.go:935: synced data repo [provider=0, ufc=3, dfc=0, ucc=2, dcc=0, ub=106 kB, db=151 kB] in [4.88s]
I 2023/01/30 15:04:41 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=105 kB, db=151 kB] in [3.01s]
I 2023/01/30 15:12:09 repository.go:935: synced data repo [provider=0, ufc=3, dfc=0, ucc=1, dcc=0, ub=107 kB, db=151 kB] in [2.41s]
I 2023/01/30 15:14:38 repository.go:935: synced data repo [provider=0, ufc=3, dfc=0, ucc=2, dcc=0, ub=107 kB, db=151 kB] in [2.81s]
I 2023/01/30 15:15:46 repository.go:935: synced data repo [provider=0, ufc=3, dfc=0, ucc=2, dcc=0, ub=106 kB, db=151 kB] in [2.64s]
I 2023/01/30 15:17:01 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=105 kB, db=151 kB] in [5.15s]
I 2023/01/30 15:18:18 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=107 kB, db=151 kB] in [1.85s]
I 2023/01/30 15:19:57 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=107 kB, db=151 kB] in [2.89s]
E 2023/01/30 15:20:24 serve.go:342: handle command failed: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
I 2023/01/30 15:20:44 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=107 kB, db=151 kB] in [1.93s]
I 2023/01/30 15:21:57 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=107 kB, db=151 kB] in [3.23s]
I 2023/01/30 15:24:07 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=107 kB, db=151 kB] in [4.61s]
I 2023/01/30 15:30:07 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=108 kB, db=151 kB] in [3.75s]
I 2023/01/30 15:32:45 repository.go:935: synced data repo [provider=0, ufc=3, dfc=0, ucc=2, dcc=0, ub=117 kB, db=151 kB] in [2.67s]
I 2023/01/30 15:38:08 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=108 kB, db=151 kB] in [2.76s]
I 2023/01/30 15:41:21 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=108 kB, db=151 kB] in [2.33s]
I 2023/01/30 15:42:29 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=107 kB, db=151 kB] in [2.19s]
I 2023/01/30 15:48:33 repository.go:935: synced data repo [provider=0, ufc=3, dfc=0, ucc=2, dcc=0, ub=88 kB, db=151 kB] in [2.99s]
I 2023/01/30 15:56:36 repository.go:935: synced data repo [provider=0, ufc=1, dfc=0, ucc=0, dcc=0, ub=80 kB, db=151 kB] in [2.00s]
E 2023/01/30 15:56:57 serve.go:342: handle command failed: websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header
I 2023/01/30 16:03:16 repository.go:935: synced data repo [provider=0, ufc=3, dfc=0, ucc=2, dcc=0, ub=84 kB, db=151 kB] in [3.79s]
I 2023/01/30 16:11:21 repository.go:935: synced data repo [provider=0, ufc=2, dfc=0, ucc=1, dcc=0, ub=80 kB, db=151 kB] in [3.66s]
I 2023/01/30 16:15:37 box.go:74: auto stat [trees=794, blocks=41300, dataSize=70 MB, assetsSize=16 MB]
I 2023/01/30 16:15:37 disk.go:33: disk usage [total=2.0 TB, used=786 GB, free=1.2 TB]
I 2023/01/30 16:19:24 repository.go:935: synced data repo [provider=0, ufc=1, dfc=0, ucc=0, dcc=0, ub=78 kB, db=151 kB] in [2.20s]
I 2023/01/30 16:26:32 repository.go:935: synced data repo [provider=0, ufc=3, dfc=0, ucc=1, dcc=0, ub=80 kB, db=151 kB] in [2.18s]

更多信息 More information

No response

Activity

changed the title [-]思源伺服,偶发ctrl+v粘贴时,使用主机的剪贴板而非远程端的剪贴板[/-] [+]思源伺服,偶发ctrl+v粘贴图片时,使用主机的剪贴板而非远程端的剪贴板[/+] on Jan 30, 2023
changed the title [-]思源伺服,偶发ctrl+v粘贴图片时,使用主机的剪贴板而非远程端的剪贴板[/-] [+]浏览器端不使用伺服器的剪贴板[/+] on Jan 31, 2023
changed the title [-]浏览器端不使用伺服器的剪贴板[/-] [+]浏览器端不使用内核伺服设备的剪贴板[/+] on Jan 31, 2023
added this to the 2.7.2 milestone on Jan 31, 2023
88250

88250 commented on Jan 31, 2023

@88250
Member

浏览器端不使用内核伺服设备的剪贴板,换句话说就是有可能无法得到(即使是自己本地的剪切板文件路径,因为有可能需要申请浏览器的文件 API 权限,在 IP 访问或者非 HTTPS 上可能还不工作,但是有的系统可能可以正常工作)直接复制的文件,只能通过拖拽或者菜单插入资源文件。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @88250@Vanessa219@HowcanoeWang

      Issue actions

        浏览器端不使用内核伺服设备的剪贴板 · Issue #7206 · siyuan-note/siyuan