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

toPng() throw error. #455

Open
tech-zjf opened this issue Mar 17, 2023 · 8 comments
Open

toPng() throw error. #455

tech-zjf opened this issue Mar 17, 2023 · 8 comments

Comments

@tech-zjf
Copy link

Event {
"isTrusted": true,
"bubbles": false,
"cancelBubble": false,
"cancelable": false,
"composed": false,
"currentTarget": null,
"defaultPrevented": false,
"eventPhase": 0,
"returnValue": true,
"srcElement": null,
"target": null,
"timeStamp": 16799.799999952316,
"type": "error"
}
image

@divyachauhanJio
Copy link

Any solution found for the above ?

@forever0714yuan
Copy link

forever0714yuan commented Apr 3, 2023 via email

@guirip
Copy link

guirip commented Apr 6, 2023

Same error here (using html-to-image, forked from dom-to-image)

I noticed the error was occurring because of an img tag with empty src attribute.

e.g <img class="layer" id="film" src="" />

@Frederic-DEBOS
Copy link

From my experience, the error rised from bootstrap 4.5 :

image

Copy works when I delete the svg background url.
Css code :
.custom-select { display: inline-block; width: 100%; height: calc(1.5em + .75rem + 2px); padding: .375rem 1.75rem .375rem .75rem; font-size: 1rem; font-weight: 400; line-height: 1.5; color: #495057; vertical-align: middle; background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23343a40' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") no-repeat right .75rem center/8px 10px; border: 1px solid #ced4da; border-radius: .25rem; -webkit-appearance: none; -moz-appearance: none; appearance: none }

@shiwenzheng-alt
Copy link

I have also encountered this problem. Has it been solved?

@sujiangyin
Copy link

had the same issue,how did you solve it?

@sujiangyin
Copy link

Event { "isTrusted": true, "bubbles": false, "cancelBubble": false, "cancelable": false, "composed": false, "currentTarget": null, "defaultPrevented": false, "eventPhase": 0, "returnValue": true, "srcElement": null, "target": null, "timeStamp": 16799.799999952316, "type": "error" } image

had the same issue,how did you solve it?

@jianxchen
Copy link

It is normal when there is an external network, but in the absence of an external network environment, the wrong content is reported:
Event {isTrusted: true, type: 'error', target: img, currentTarget: img, eventPhase: 2, …}isTrusted: truebubbles: falsecancelBubble: falsecancelable: falsecomposed: falsecurrentTarget: nulldefaultPrevented: falseeventPhase: 0path: Array(1)0: imgaccessKey: ""align: ""alt: ""ariaAtomic: nullariaAutoComplete: nullariaBusy: nullariaChecked: nullariaColCount: nullariaColIndex: nullariaColSpan: nullariaCurrent: nullariaDescription: nullariaDisabled: nullariaExpanded: nullariaHasPopup: nullariaHidden: nullariaInvalid: nullariaKeyShortcuts: nullariaLabel: nullariaLevel: nullariaLive: nullariaModal: nullariaMultiLine: nullariaMultiSelectable: nullariaOrientation: nullariaPlaceholder: nullariaPosInSet: nullariaPressed: nullariaReadOnly: nullariaRelevant: nullariaRequired: nullariaRoleDescription: nullariaRowCount: nullariaRowIndex: nullariaRowSpan: nullariaSelected: nullariaSetSize: nullariaSort: nullariaValueMax: nullariaValueMin: nullariaValueNow: nullariaValueText: nullassignedSlot: nullattributeStyleMap: StylePropertyMap {size: 0}attributes: NamedNodeMap {0: src, src: src, length: 1}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants