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:

Hi @samlittlefair, :slight_smile:

I still haven't found the cause of this issue but I found another problem that might be linked to this one.

Previewing unpublished pages works great, but as soon as we publish, the page content does not update with the previewed content.

I wouldn't be surprised if both problems had the same origin so I added this message here, but let me know if you prefer that I create another topic separately.

Thanks

1 Like

Hi @samlittlefair, this bug is super annoying for our team as it means we can't preview any changes on page that are already published. It forces us to find a workaround to review iterations with our various stakeholders. Big loss of time :confused:
Not sure if this is happening with another team in the community

Hey @josselin.milon, I'll check in with our dev team and let you know what they say.

Hey @josselin.milon, I confirmed that the team is actively working on this and hoping to push a fix soon! Sorry I can't give more detail, but work is underway :slightly_smiling_face:

much appreciated @samlittlefair! Thanks a lot!

Hey @jeremy.benzakein and @josselin.milon,

Josselin, I understand you were in contact with Andrea about this issue. As she said, the issue with "get shareable link" should now be fixed. Could you let me know if it's working for you now?

If that's working, are you still having the same issue with previews not updating? If so, can you send me your latest project files, so I can look at your preview configuration?

Thanks,
Sam

1 Like
  • Yes, it works fine now thanks :+1:

If that's working, are you still having the same issue with previews not updating?

  • The preview still doesn't update pages that have already been deployed (statically on Netlify).
  • The preview works fine when a document is not published, the problem only occures for published pages

I'll send you a zip with our project in a private message

Thank you for your help

1 Like

Thanks, Jeremy! I'll take a look and get back to you on Monday.

Hey @jeremy.benzakein ,

Just an update: I'm still working on this. It appears to be an issue with previews on statically-generated pages, as the previews are working fine with client-side routing. An easy fix would be to switch to server-side generation.

In any case, I'm going to keep digging to figure out the issue with static generation, and I'll report back :slight_smile:

Best,
Sam

Hi @samlittlefair,

Thanks for the update.

I figured the same on my end, unfortunately, server-side generation is not an option as our website is deployed on Netlify.

Jeremy

Hey @jeremy.benzakein ,

No solution yet, but I've asked for help from our development team. I'll let you know what they find out.

Sam

Hey @jeremy.benzakein ,

I just wanted to follow up to let you know that one of our Vue developers is looking at this now. I'll let you know what he says.

Sam

great, thank you very much :+1: