Closed ThomasContini closed 4 months ago
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
@ThomasContini if you look closely to the console logs you will see that your custom service is failing due to CORS configuration.
I assume, you're making a request in onInit
-> request is failing -> web part is not rendering.
Hi @AJIXuMuK,
Thanks for your feedback!
Unfortunately this CORS issue is not issued from my component code. Moreover, this issue appears everytime we use PnP controls because of their telemetry but should not stop code execution, as we see this in every single component we developed using PnP controls, and they are still loading...
In order to prove that, I just made a new attempt, bug still reproduces, this time no error about CORS policy and still the component is not showing:
I also made a new attempt by opting out PnP telemetry, issue is still here.
IMHO, If my onInit
method was crashing, I would get a different error such as the famous Something went wrong
, because it would not reach my renderer.
@ThomasContini - sorry for the delay.
IMHO, If my onInit method was crashing, I would get a different error such as the famous Something went wrong, because it would not reach my renderer.
It depends. If you are throwing the error from onInit
or rejecting the promise then yes. But if you just "swallow" the exception - it will not be displayed.
Could you please check if the same issue occurs on some dummy/simple web part on the same page/tenant? Could you share your solution or test tenant with me?
You can use aterentiev@microsoft.com to share it.
Thanks!
Hi @AJIXuMuK,
I just invite you on the tenant, and sent you URL to connect by email. I also shared you the source code through a private Github repo.
Hope you have everything that could be useful to understand the issue.
Thanks!
Could I ask what the resolution to this was? I'm running into a similar issue.
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
We developed a custom webpart in order to make a kind of advanced toolbar. This webpart has been deployed to all SharePoint sites from a specific hub (through site collection app catalogs), and installed on every sites' home pages.
The component is placed at the very top of a vertical section.
Most of the time, the component is perfectly working, and shows correctly. However, while navigating between pages through hub navigation, and completely randomly, it get not loaded correctly.
Logs
No issues in console from the component itself. Only SP issues that we already saw on other tenants or pages... I still let you the complete log:
DOM
It seems like the component is not even loaded by SharePoint Framework! DOM is empty at component location:
Site sources
I decided to look at the loaded sources thanks to the developer console in Edge. The client side assets are not even present in sources when this bug is appearing:
When component does not correctly:
When component shows correctly:
We have other components deployed on the same pages, but they show correctly. However, the same bug has already been seen on other custom SPFx components, still randomly, but less time than this one I would say.
Recurrence
This bug happens for all end users and developers working on this specific tenant. It still seems more redundant as end user, without admin rights.
My own thinking
Hope I provided enough information :)
Steps to reproduce
This one is quite tricky to reproduce. We are currently not able to reproduce it on other tenants with the same component in the same configuration. It seems only happening on a specific tenant.
Here is how we reproduce it on this specific tenant:
Sorry to not be able to provide more infos about how you can reproduce this issue...
Expected behavior
The component should always show itself correctly.