Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPFX Application Customizer breaks Anonymous Links for PDF Files #8146

Closed
3 of 9 tasks
Anonimiss opened this issue Jun 10, 2022 · 5 comments
Closed
3 of 9 tasks

SPFX Application Customizer breaks Anonymous Links for PDF Files #8146

Anonimiss opened this issue Jun 10, 2022 · 5 comments
Assignees
Labels
area:spfx Category: SharePoint Framework (not extensions related) status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Milestone

Comments

@Anonimiss
Copy link

Target SharePoint environment

SharePoint Online

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

💥 SharePoint Framework

Developer environment

Windows

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

  • browser version:
    • Firefox 101.0 (64-Bit)
    • Edge 102.0.1245.33 (64-Bit)
    • Chrome 102.0.5005.63 (64-Bit)
  • SPFx version: 1.12.1
  • Node.js version: v14.18.1

Describe the bug / error

I saw someone raised the same issue here, but it was marked closed.

Following the steps from Build your first SPFX Framework extension, I successfully packaged and deployed the hello world dialog popup example. After, creating an anonymous link for a PDF file breaks for users who are not signed into SharePoint.

This behavior does not happen every time and with enough attempts, I can successfully view the PDF. On average, it would fail 6-8 times out of 10 attempts. This experience is not intuitive for end users who will normally stop attempting to access the PDF after the first or second try.

Steps to reproduce

  1. Follow the steps from Build your first SPFX Framework extension
  2. Ensure skipFeatureDeployment is set to true in the package-solution.json file
  3. gulp build/bundle/package-solution --ship and then deploy to SharePoint Apps repository
  4. Verify the Hello World Dialog Popup Appears on SharePoint pages
  5. Upload a PDF file preferably with 20+ pages
  6. Create an Anonymous link for the PDF file
  7. Launch browser in incognito mode and attempt to access the PDF with the anonymous link
  8. The PDF viewer is a blank white screen, with dots running along the top to represent its loading (never finishes). Sometimes the PDF will successfully load, I am guessing its based on what asynchronous calls come first.

extensionError

Expected behavior

If the extension detects the user does not have adequate permission, it should be disabled and allow the page to continue loading the resources the anonymous user has access to view.

@Anonimiss Anonimiss added the type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs. label Jun 10, 2022
@ghost
Copy link

ghost commented Jun 10, 2022

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 Awaiting categorization and initial review. label Jun 10, 2022
@AJIXuMuK AJIXuMuK added area:spfx Category: SharePoint Framework (not extensions related) and removed Needs: Triage 🔍 Awaiting categorization and initial review. labels Jun 10, 2022
@AJIXuMuK AJIXuMuK self-assigned this Jun 10, 2022
@AJIXuMuK AJIXuMuK added the status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. label Jun 17, 2022
@AJIXuMuK
Copy link
Collaborator

Thank you @Anonimiss for reporting this one!
We're actively investigating the issue.
In a meanwhile there are few workarounds I can think of:

  • use the public CDN feature, and have the script on the public CDN that doesn't require authentication
  • grant access to the folders for this solution in the App Catalog site collection similar to this one: https://www.crowcanyon.help/article/431/

@Anonimiss
Copy link
Author

Thank you for your workarounds, @AJIXuMuK.

I first tried granting access to the folders in the App Catalog. Most pages I found referenced using the everyone group for doing this. Even with the everyone group, and all users group having read permissions, I was still facing the same issue.

Enabling the Microsoft 365 Public CDN looks to have solved my issue. I will continue to mess around with it, but the results are very promising!

Thanks again for the workaround.

@AJIXuMuK AJIXuMuK added this to the 07-15 milestone Aug 23, 2022
@AJIXuMuK
Copy link
Collaborator

This should be fixed on our side too and rolled out WW

@ghost
Copy link

ghost commented Aug 30, 2022

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

@ghost ghost locked as resolved and limited conversation to collaborators Aug 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area:spfx Category: SharePoint Framework (not extensions related) status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

2 participants