sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Wopiframe.aspx failed to load PDF file

Open Circlet-ND opened this issue 1 year ago β€’ 26 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

πŸ’₯ SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested

  • [ ] πŸ’₯ Internet Explorer
  • [ ] πŸ’₯ Microsoft Edge
  • [ ] πŸ’₯ Google Chrome
  • [ ] πŸ’₯ FireFox
  • [ ] πŸ’₯ Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

  • happened in most of our client tenants and our tenant, some tenants are not affected
Image

Describe the bug / error

We’re using wopiframe.aspx to generate previews for PDF files in our webparts. Until yesterday, everything was functioning as expected. However, today we received several client reports indicating that PDF previews are not displaying properly. We suspect that the gradual rollout across tenants may soon impact more users. Could someone please investigate this issue? Thank you!

The URL format is below : Using UniqueId: https://tenant.sharepoint.com/sites/Operations/_layouts/WopiFrame.aspx?sourcedoc={9af85718-3c5a-4fec-9777-bbe609e610ec}&action=interactivepreview OR using relative Path https://tenant.sharepoint.com/sites/Operations/_layouts/WopiFrame.aspx?sourcedoc=%2Fsites%2FOperations%2FShared%20Documents%2FRefunds.pdf&action=interactivepreview

Steps to reproduce

  1. Upload a PDF file
  2. Get the UniqueId of that file or the path
  3. Construct the wopiframe.aspx URL

Expected behavior

An error message : Sorry, something went wrong An unexpected error has occurred.

Circlet-ND avatar Apr 02 '25 04:04 Circlet-ND

Hello @Circlet-ND, Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.

Ashlesha-MSFT avatar Apr 02 '25 04:04 Ashlesha-MSFT

@Circlet-ND, I uploaded PDF to document library, copied its URL then Iin ASPX page I added link web parts and added that copied URL there. After republishing I am not able to see any error while opening the pdf file.

Image

Please help with your inputs to reproduce the error.

Ashlesha-MSFT avatar Apr 02 '25 05:04 Ashlesha-MSFT

@Ashlesha-MSFT Thanks for the prompt reply. Can you try both the uniqueID and the path from below methods please? The issue is with the WopiFrame.aspx page

Unique ID

To get the uniqueId of the document,

  1. Right click on the document and click "Preview" Image
  2. Click "Embed" from the ... options
Image
  1. Copy the UniqueId
Image
  1. Construct the URL https://YourTenant.sharepoint.com/sites/YourSite/_layouts/WopiFrame.aspx?sourcedoc={(UniqueIdHere)}&action=interactivepreview

Sample (please ensure that it includes the curly brackets) : https://contoso.sharepoint.com/sites/HR/_layouts/WopiFrame.aspx?sourcedoc={962d2457-ccff-4043-8f7d-767872076a71}&action=interactivepreview

  1. Copy and paste that URL in a new tab

Using Relative Path

You can also use the relative path of that file as the sourcedoc parameter Relative path format: /sites/SiteName/DocumentLibraryName/test.pdf Relative path sample: /sites/HR/Shared%20Documents/test.pdf

https://YourTenant.sharepoint.com/sites/YourSite/_layouts/WopiFrame.aspx?sourcedoc=/sites/HR/Shared%20Documents/test.pdf&action=interactivepreview

Sample: https://contoso.sharepoint.com/sites/HR/_layouts/WopiFrame.aspx?sourcedoc=/sites/HR/Shared%20Documents/test.pdf&action=interactivepreview

Copy and paste that URL in a new tab

Circlet-ND avatar Apr 02 '25 05:04 Circlet-ND

@Circlet-ND, Thank you for detailed explanation. For my tenant getting expected behavior. created sample link like this - https://{{TENANT}}/sites/first/_layouts/WopiFrame.aspx?sourcedoc={009e933c-95f6-4e10-9713-698625c4a7fb}&action=interactivepreview

Image

Also tried with this, below relative path URL this is also working. https://{{TENANT}}/sites/first/_layouts/WopiFrame.aspx?sourcedoc=/sites/first/pdf/test.pdf&action=interactivepreview

Image

Ashlesha-MSFT avatar Apr 02 '25 06:04 Ashlesha-MSFT

@Ashlesha-MSFT Thank you. Some of our clients are not affected yet. Are you able to test this in other tenants?

Circlet-ND avatar Apr 02 '25 06:04 Circlet-ND

@Circlet-ND, I able to reproduce the issue in another tenant.

Image

As it works differently, we can confirm that this is the bug. We have logged this as a bug, and our engineering team will look into it. Thank you for your patience!

Ashlesha-MSFT avatar Apr 02 '25 06:04 Ashlesha-MSFT

Hola, just to say that we have same problem from Yesterday on our tenant.

adidos87 avatar Apr 03 '25 09:04 adidos87

Noticing change in behaviour in our client's tenant.

PieterVandendriessche avatar Apr 03 '25 11:04 PieterVandendriessche

hello, we have the same problem on our tenant, and more than hundred of our customers are also affected

asechko avatar Apr 03 '25 16:04 asechko

our client tenants are affected too and this needs to be rectified ASAP as it is quite a blocker.

jonathanhotono avatar Apr 04 '25 07:04 jonathanhotono

We also have the issue. Thousands of people are currently affected in our company.

lamacoding avatar Apr 07 '25 05:04 lamacoding

We have the same issue with some of our customers. Been looking a the issue for a while before I found this issue... Please fix ASAP; we get loads of customer complaints.

benderke avatar Apr 08 '25 12:04 benderke

Experiencing the same issue here. Hoping for a solution. Thanks!

DKnudsen-VB avatar Apr 08 '25 19:04 DKnudsen-VB

@Circlet-ND, I able to reproduce the issue in another tenant.

Image

As it works differently, we can confirm that this is the bug. We have logged this as a bug, and our engineering team will look into it. Thank you for your patience!

Hi, could you share with us if you have any idea of how many time you need to solve this bug? our customer are locked , thanka a lot

adidos87 avatar Apr 09 '25 08:04 adidos87

Hi all Feedback from Microsoft Premier support:

Image

PieterVandendriessche avatar Apr 09 '25 10:04 PieterVandendriessche

Hi, i confirm that with embed.aspx it works, but isn't possible to download file. Is there some parameter to use?

adidos87 avatar Apr 09 '25 13:04 adidos87

Hi all Feedback from Microsoft Premier support:

Image

The Wopiframe.aspx will eventually redirect to doc.aspx with the same format. The Doc.aspx URL is in the ServerRedirectedEmbedUrl property returned from Sharepoint directly and I am not sure why the engineering team called it not the correct way. Image

In addition, the Embed.aspx will not work with excel, csv, and similar tabular data as noted here: https://github.com/SharePoint/sp-dev-docs/issues/9925

Circlet-ND avatar Apr 09 '25 23:04 Circlet-ND

Hello,

We are experiencing the same issue in our tenant. Thousands of files are now difficult to consult.

Any e.t.a. on resolving the issue?

Thank you.

Vansyork avatar Apr 11 '25 08:04 Vansyork

Same issue in our tenant

smrmbrk avatar Apr 11 '25 09:04 smrmbrk

Same issue in our tenant

MikeBELLEM avatar Apr 15 '25 11:04 MikeBELLEM