SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.25k stars 1.01k forks source link

Single part app pages - Uncaught (in promise) error #9322

Open lucmoco opened 1 year ago

lucmoco commented 1 year ago

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

Additional environment details

Describe the bug / error

When creating a single part app page showing a custom web part, and checking the console, an error is being logged:

image

The error occurs in the javascript file https://res-1.cdn.office.net/files/sp-client/sp-pages-assembly_en-us_681e18935de8c7c2ccb50e213a98d96e.js, Also, a warning is logged in the console:

image

The error and warning are not present if the web part is added to a normal page.

I could reproduce the problem in two different tenants, and using Edge and Chrome.

Steps to reproduce

  1. Create a web part with the Yeoman Generator with the settings:

    image
  2. Create an SPFx package with the solution (no source code changes required).

  3. Create a communication site.

  4. Add a site collection app catalog to the site.

  5. Add the solution to the app catalog.

  6. Create a single part app pages containing the web part.

  7. Open the browser's developer tools and see the messages.

Expected behavior

No error or warning messages are being logged.

ghost commented 1 year ago

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