dom-to-image
dom-to-image copied to clipboard
cannot fetch resource
Use case: description, code
domtoimage.toSvg(document.getElementById('content-statistics'))
.then(function (dataURL) {
/* do something */
let fileTransfer: FileTransferObject = this.transfer.create();
fileTransfer.download(dataURL, filename).then((entry) => {
console.log('download complete: ' + entry.toURL());
this.loading.dismiss();
this.socialSharing.shareWithOptions(options).then(onSuccess, onError);
}, (error) => {
// handle error
console.log(error);
});
});
Expected behavior
can generate svg
Actual behavior (stack traces, console logs etc)
2017-07-29 15:25:26.943356+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/fonts/noto-sans-regular.ttf, status: 0
2017-07-29 15:25:26.943468+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/fonts/noto-sans-regular.ttf, status: 0
2017-07-29 15:25:26.944005+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/fonts/noto-sans-bold.ttf, status: 0
2017-07-29 15:25:26.944144+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/fonts/noto-sans-bold.ttf, status: 0
2017-07-29 15:25:26.944868+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/font/iconfont.woff?t=1496067976169, status: 0
2017-07-29 15:25:26.945047+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/fonts/ionicons.ttf?v=3.0.0-alpha.3, status: 0
2017-07-29 15:25:26.945178+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/fonts/roboto-light.ttf, status: 0
2017-07-29 15:25:26.945473+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/fonts/roboto-regular.ttf, status: 0
2017-07-29 15:25:26.946100+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/fonts/roboto-medium.ttf, status: 0
2017-07-29 15:25:26.946286+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/fonts/roboto-bold.ttf, status: 0
2017-07-29 15:25:26.946593+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/font/iconfont.ttf?t=1496067976169, status: 0
2017-07-29 15:25:26.946764+0800 CodeTracker[16531:4751160] ERROR: cannot fetch resource: file:///var/containers/Bundle/Application/E4072D74-A376-471D-B7C4-E7EB3209F4EF/CodeTracker.app/www/assets/font/iconfont.svg?t=1496067976169#iconfont, status: 0
2017-07-29 15:25:52.742426+0800 CodeTracker[16531:4751325] [] nw_endpoint_handler_add_write_request [1.1 192.0.73.2:443 failed socket-flow (satisfied)] cannot accept write requests
2017-07-29 15:25:52.743083+0800 CodeTracker[16531:4751224] [] tcp_connection_write_eof_block_invoke Write close callback received error: [22] Invalid argument
Library version
"dom-to-image": "^2.5.2"
Browsers
I use it in an ionic app. chrome is ok. but iPhone report this error.
Hello, Have you solved this issue? I'm having the exact same problem. Thanks,
Hi, have you found a solution? Thanks! Davide
I have this issue as well but also in Chrome. It seems to only happen when fetching font files
@ikarus-balsero Unfortunately, there is no solution at present. The current mature solution is to use the backend to generate charts and send them to the front end.
Hi, I have the same issue in Chrome, and I may have a hint : the resources trying to be fetch has tghis kind of url :
blob:http://localhost:3000/
blob:http://localhost:3000/50b4cc9a-1ebc-46a6-9ec8-07f88d25a45e
whereas it should be
blob:http://localhost:3000/50b4cc9a-1ebc-46a6-9ec8-07f88d25a45e
Still an issue at this present time. Each time it will try to fetch roboto fonts. in /fonts/roboto/...
Still no solution for this issue?