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

[Bug]: 通过相册菜单删除图片会闪退 #111

Closed
3 tasks done
vaxl029 opened this issue Nov 1, 2023 · 3 comments
Closed
3 tasks done

[Bug]: 通过相册菜单删除图片会闪退 #111

vaxl029 opened this issue Nov 1, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@vaxl029
Copy link

vaxl029 commented Nov 1, 2023

前置阅读 | Pre-reading

PicList的版本 | PicList Version

v2.6.6

系统信息 | System Information

Windows

问题重现 | Bug reproduce

前置条件
win10 x64,lankong 1.1.3插件,开源版lskypro

复现流程
随意上传一张图片,然后通过相册菜单点击图片下面的删除按钮,然后二次确认弹窗点击确认,程序闪退

重新打开程序,相册菜单里面对应的图片已经删除,不管是否开启 删除云端 都会闪退,开启后 lskypro 后台对应图片会被删除,所以综合来看 删除功能是正常的

相关日志 | Logs

2023-11-01 16:16:40 [PicList INFO] Compress or convert image
2023-11-01 16:16:40 [PicList INFO] Before transform
2023-11-01 16:16:40 [PicList INFO] Transforming... Current transformer is [path]
2023-11-01 16:16:40 [PicList INFO] Before upload
2023-11-01 16:16:40 [PicList INFO] beforeUploadPlugins: renameFn running
2023-11-01 16:16:40 [PicList INFO] Uploading... Current uploader is [lankong]
2023-11-01 16:16:41 [PicList SUCCESS]
https://XXXXX/XXX.webp
2023-11-01 16:20:25 [PicList INFO] [PicList Server] is listening at 36677 of 0.0.0.0
2023-11-01 16:20:25 [PicList INFO] File server is running, http://localhost:36699
2023-11-01 16:22:12 [PicList INFO] [PicList Server] is listening at 36677 of 0.0.0.0
2023-11-01 16:22:12 [PicList INFO] File server is running, http://localhost:36699

@vaxl029 vaxl029 added the bug Something isn't working label Nov 1, 2023
@Kuingsmile
Copy link
Owner

@vaxl029

问题定位

问题来自于兰空插件自带的同步删除功能
image

在PicGo或者PicList里,使用这个插件都可以得到相同的错误日志记录:

image
image

问题定位在插件的index.js文件中的第40行:
image

这里返回的body已经是对象了,所以不能去做JSON.parse(),导致报错,由于PicList里没有捕获这个异常,所以表现为PicList自动退出

解决方案

这个文件的路径是%APPDATA%\piclist\node_modules\picgo-plugin-lankong\dist\index.js, 注释掉这一句就ok了,如下
image

或者直接用我修改后的文件替换掉原文件,然后重启piclist就可以了

index.zip

@vaxl029
Copy link
Author

vaxl029 commented Nov 2, 2023

经测试可行,感谢

@Kuingsmile Kuingsmile pinned this issue Dec 28, 2023
@jixintangen
Copy link

刚装完lsky,也遇到了这个问题,来翻issues,感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants