Sharable preview link does not generate

Hello,

Since recently we can no longer generate sharable links for previews.

We can still preview unpublished pages fine, but when we click on "get a sharable link", the link field stays in the loading state.

image

Here is a video that shows the issue: https://video.drift.com/v/abYtBvDLDth/


After checking the console, I found the following error

Uncaught (in promise) DOMException: Failed to execute 'addColorStop' on 'CanvasGradient': The provided value (-0.4) is outside the range (0.0, 1.0).
    at https://unpkg.com/html2canvas@1.0.0-alpha.12/dist/html2canvas.min.js:6:43527
    at Array.forEach (<anonymous>)
    at a (https://unpkg.com/html2canvas@1.0.0-alpha.12/dist/html2canvas.min.js:6:43505)
    at A.value (https://unpkg.com/html2canvas@1.0.0-alpha.12/dist/html2canvas.min.js:6:45524)
    at A.value (https://unpkg.com/html2canvas@1.0.0-alpha.12/dist/html2canvas.min.js:6:137345)
    at https://unpkg.com/html2canvas@1.0.0-alpha.12/dist/html2canvas.min.js:6:136388
    at Array.forEach (<anonymous>)
    at A.value (https://unpkg.com/html2canvas@1.0.0-alpha.12/dist/html2canvas.min.js:6:136255)
    at https://unpkg.com/html2canvas@1.0.0-alpha.12/dist/html2canvas.min.js:6:135884
    at A.value (https://unpkg.com/html2canvas@1.0.0-alpha.12/dist/html2canvas.min.js:6:44372)

And after digging a little more, I found that html2canvas was called from the prismic toolbar script (https://prismic.io/prismic-toolbar/4.0.0/toolbar.js) but I could not find anything more precise.

Please help us solve this issue.

PS: We are using Prismic alongside nuxt in full static mode.

1 Like

Hi Jeremy,

Thanks for posting this question! I'm happy to look into this with you. Could you send me your repo name and your project files (either as a Zip file or a GitHub repo)? You can send it in a DM if you like.

Thanks,
Sam

Hi Sam,

I sent you everything in a DM.

Thank you :slight_smile:

Thanks, Jeremy! I was able to recreate your issue, and I can't see any obvious problems, so I submitted an issue with our dev team. I'll let you know what I hear back :slight_smile:

Hi @samlittlefair,

Have you heard from your dev team ? It's been a couple weeks and I still haven't figured out how to solve this.

Thank you

Hi Jeremy,

Thanks for checking in. I haven't heard back, yet. I'll send a message to see if there's been any progress, and I'll let you know when I hear back.

Sam

Thank you for your help :smiley: