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

在部分图标未正常加载的情况下无法导出时间轴分享图片 #877

Closed
luyiming opened this issue Aug 21, 2021 · 9 comments
Closed
Labels
bug Something isn't working Confirmed 问题已确认

Comments

@luyiming
Copy link

  • PT 助手版本: v1.5.2.f2e4f20

  • PT 助手安装方式:crx

  • 浏览器名称及版本:Chrome 92.0.4515.159

  • 浏览器是否安装了其他插件:无

  • 停用其他插件后是否正常工作:否

  • 问题描述:
    无法导出时间轴分享图片,

  • 相关截图:

console 显示如下异常:

index.html#/user-data-timeline:1 Uncaught (in promise) Event {isTrusted: true, type: "error", target: null, currentTarget: null, eventPhase: 0, …}
Promise.then (async)
(anonymous) @ chunk-6e26f474.d165d716.js:1
setTimeout (async)
share @ chunk-6e26f474.d165d716.js:1
ie @ chunk-vendors.03fd6f84.js:7
n @ chunk-vendors.03fd6f84.js:7
ie @ chunk-vendors.03fd6f84.js:7
In.t.$emit @ chunk-vendors.03fd6f84.js:7
click @ chunk-vendors.03fd6f84.js:122
ie @ chunk-vendors.03fd6f84.js:7
n @ chunk-vendors.03fd6f84.js:7
Qs.r._wrapper @ chunk-vendors.03fd6f84.js:7
@luyiming luyiming added the bug Something isn't working label Aug 21, 2021
@ted423
Copy link
Collaborator

ted423 commented Aug 21, 2021

我这导出倒是正常,但是本身就没数据

@ted423
Copy link
Collaborator

ted423 commented Aug 21, 2021

目测属于浏览器兼容问题

@ted423
Copy link
Collaborator

ted423 commented Aug 21, 2021

又试了下,官方商店的正常
确认下权限啥的是不是都给了,不过这块我不知道有没有影响

@ted423 ted423 added the need more information 需要更多的信息 label Aug 21, 2021
@tkfanswind
Copy link

我也导出失败,一直转圈

@fenghengzhi
Copy link

我这边也是导出时会无线转圈(windows edge,官方商店版插件),简单调试了下,问题是出在domtoimage.toBlob里面
image

@Rhilip
Copy link
Collaborator

Rhilip commented Sep 18, 2021

我这边也是导出时会无线转圈(windows edge,官方商店版插件),简单调试了下,问题是出在domtoimage.toBlob里面
image

因为我这边无法复现,所以希望 关于 “无法导出时间轴分享图片” 希望能给予更详细的 debug信息:

  1. 哪个站点加入进时间轴会导致无法导出截图,还是所有站点都会导致无法到处截图?
  2. domtoimage.toBlob 内部有没有报错或者问题?
  3. 其他可能和导出分享过程有关的网络请求以及页面js问题?

domtoimage.toBlob 这个完全没有用,因为这就是转换截图的最顶层方法 :-)

@fenghengzhi
Copy link

fenghengzhi commented Sep 22, 2021

我这边也是导出时会无线转圈(windows edge,官方商店版插件),简单调试了下,问题是出在domtoimage.toBlob里面
image

因为我这边无法复现,所以希望 关于 “无法导出时间轴分享图片” 希望能给予更详细的 debug信息:

  1. 哪个站点加入进时间轴会导致无法导出截图,还是所有站点都会导致无法到处截图?
  2. domtoimage.toBlob 内部有没有报错或者问题?
  3. 其他可能和导出分享过程有关的网络请求以及页面js问题?

domtoimage.toBlob 这个完全没有用,因为这就是转换截图的最顶层方法 :-)

  1. 试了一下,我这边是soulvoice站进时间轴会导致无法导出截图(去掉就能正常导出)。然后就是我这边不知道为什么这个站点图标没出来(图标那边是个空的Img标签,什么属性都没有),应该是这个原因导致dom-to-image库报错。尝试把soulvoice站删了重新添加,图标就能正常展示出来了,这时候也能正常导出截图了
  2. 就是domtoimage.toBlob 内部报错

可以在检测到没有图标数据时不渲染img,应该就能绕过dom-to-img的问题

@ted423 ted423 added Confirmed 问题已确认 and removed need more information 需要更多的信息 labels Oct 24, 2021
@ted423 ted423 changed the title 无法导出时间轴分享图片 在部分图标未正常加载的情况下无法导出时间轴分享图片 Oct 24, 2021
@ted423
Copy link
Collaborator

ted423 commented Apr 21, 2022

error之后无法进入 then

Event {isTrusted: true, type: 'error', target: img, currentTarget: img, eventPhase: 2, …}
isTrusted: true
bubbles: false
cancelBubble: false
cancelable: false
composed: false
currentTarget: null
defaultPrevented: false
eventPhase: 0
path: (9) [img, div.v-avatar, div.v-timeline-item__inner-dot.transparent, div.v-timeline-item__dot.v-timeline-item__dot--large, div.v-timeline-item.theme--light, div.v-timeline.my-2.theme--light.uz6tg2, div.v-card__text, div.white--text.v-card.v-sheet.theme--light.blue-grey.darken-2, div.card]
returnValue: true
srcElement: null
target: null
timeStamp: 47599.5
type: "error"
[[Prototype]]: Event

@ted423
Copy link
Collaborator

ted423 commented Apr 21, 2022

感觉可以考虑 replaceImageToBase64 的时候塞个空白图标进去
感觉这个讨论相关 https://github.com/ronggang/PT-Plugin-Plus/issues/1034

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Confirmed 问题已确认
Projects
None yet
Development

No branches or pull requests

6 participants