The process of building custom applications and tools that interact with Microsoft SharePoint, including SharePoint Online in Microsoft 365.
Dear Manjunatha,
Thank you for the detailed write-up and network findings. Seeing the wrong version load depending on which site you open first is confusing, especially when both deployments look correct. As a forum moderator, I am not able to look into SharePoint Online's backend or your tenant to confirm the cause directly. My role here is limited to general guidance you can apply from your side.
To answer your questions:
- Known issue: I can't confirm a known issue from here. However, the similar thread you linked describes the same behavior. It could be reproduced with a newly created SPFx project on more than one tenant, and it started recently after the same setup had worked for years. This suggests the cause is unlikely to be your code or deployment.
- Workaround: The SPFx loader identifies web parts by their component ID and version. If DEV and PROD use the same component ID, and the component version in the manifest is the same in both packages, the browser may reuse whichever version it loaded first. You can try either of these options:
- Increase the version in package.json for the DEV build, not just the solution version in package-solution.json. Then check that the component manifests in the two packages show different versions.
- Give the DEV build its own solution ID and component ID, so the two environments don't share an ID.
- What to check: In the built package, compare the component id, the version and internalModuleBaseUrls between DEV and PROD. If the IDs and versions are identical, that most likely explains the mix-up.
- Recent changes: I can't confirm whether anything changed recently on the SharePoint Online side. Since the issue started recently across several tenants, I recommend having your Microsoft 365 administrator open a service request with Microsoft Support. Please include your network trace (HAR file), the steps for both scenarios, the times you tested and the link to the similar thread. These details will help the engineer check whether this is a service-side regression. For detailed instructions on how to get support, please refer to Get support - Microsoft 365 admin.
I hope this helps you keep DEV and PROD separate until the cause is confirmed. If increasing the component version or using separate IDs resolves it, please share your result here, as it may help others with the same issue.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.