Wopiframe.aspx failed to load PDF file
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
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
- Upload a PDF file
- Get the UniqueId of that file or the path
- Construct the wopiframe.aspx URL
Expected behavior
An error message : Sorry, something went wrong An unexpected error has occurred.
Hello @Circlet-ND, Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.
@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.
Please help with your inputs to reproduce the error.
@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,
- Right click on the document and click "Preview"
- Click "Embed" from the ... options
- Copy the UniqueId
- 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
- 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, 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
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
@Ashlesha-MSFT Thank you. Some of our clients are not affected yet. Are you able to test this in other tenants?
@Circlet-ND, I able to reproduce the issue in another tenant.
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!
Hola, just to say that we have same problem from Yesterday on our tenant.
Noticing change in behaviour in our client's tenant.
hello, we have the same problem on our tenant, and more than hundred of our customers are also affected
our client tenants are affected too and this needs to be rectified ASAP as it is quite a blocker.
We also have the issue. Thousands of people are currently affected in our company.
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.
Experiencing the same issue here. Hoping for a solution. Thanks!
@Circlet-ND, I able to reproduce the issue in another tenant.
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
Hi all Feedback from Microsoft Premier support:
Hi, i confirm that with embed.aspx it works, but isn't possible to download file. Is there some parameter to use?
Hi all Feedback from Microsoft Premier support:
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.
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
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.
Same issue in our tenant
Same issue in our tenant