question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Uncaught (in promise) cancelled

See original GitHub issue

image Seems if I destroy a worker after scheduling a render task, something in rendering promise triggers a cancelled error which I can’t catch. (I’ve tried to intercept render(...).promise.catch, so I get cancelled, but error still occurs).

cc @yurydelendik

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
yurydelendikcommented, Oct 30, 2015

I see that when using your document, but it’s expected. The render promise must be resolved to something (and it shall not be a success)

To avoid breaking in the debugger tools or console message, please use catch e.g.:

       page.render({
          canvasContext: canvas.getContext('2d'),
          viewport: page.getViewport(scale),
        }).promise.then(function() {
          console.log('finished');
        }, function (reason) {
          console.log('stopped ' + reason);
        });

or

       page.render({
          canvasContext: canvas.getContext('2d'),
          viewport: page.getViewport(scale),
        }).promise.catch(function (reason) {
          console.log('stopped ' + reason);
        });

I hope this helps.

0reactions
Kureevcommented, Oct 30, 2015

Thanks a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught (in promise) cancel using SweetAlert2
Update (Jan 2017): This issue has been fixed in v7: v7 upgrade guide ↗. You need to add a rejection handler to the...
Read more >
Error: Uncaught (in promise): Cancel - sorry-app/status-bar
When I open a random modal on my website and cancel it by using the ESC button I get the following message presented...
Read more >
jQuery : Uncaught (in promise) cancel using SweetAlert2
jQuery : Uncaught (in promise ) cancel using SweetAlert2 [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] jQuery ...
Read more >
[Elment] Uncaught (in promise) cancel 解决办法 - CSDN博客
使用confirm时,报如下错误:Uncaught (in promise) cancel效果如下:原因:因为confirm省略了.catch(),从而无法捕获confirm取消的操作。
Read more >
Uncaught (in promise) cancel Code Example
Uncaught (in promise ) cancel. Parviz. swal({ … }).then(function(json_data) { … }, function(dismiss) { if (dismiss === 'cancel') { // you ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found