SharePoint / sp-dev-docs

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

Apps deployed to Site Collection App Catalog and Tenant App Catalog interfere with each other #2329

Closed boydcster closed 4 years ago

boydcster commented 6 years ago

We are creating updated versions of SPFx components and testing them in site collection app catalogs before we deploy them to the tenant app catalog. We find that if there is a version of the component in both catalogs that once you add the component to a page, the pabe

Category

Procedure to reproduce the issue:

  1. Create a new SPFx web part and deploy it to the tenant app catalog
  2. Create an updated version of the web part by copying the same project but changing the id and the name.
  3. Change the id of the updated component in these locations package-solution.json, .yo-rc.json, and AppManifest.xml to a valid id.
  4. Change the name of the application from the previous name.
  5. Delete all previous versions from the site collection app catalog.
  6. Remove all installed apps from the site contents
  7. Delete all versions from the recycle bin and secondary recycle bin
  8. Build the bundle and package and deploy to the site collection app catalog
  9. Add the web part to a page in either a classic or modern site
  10. Refresh the page

What I see is that the page will randomly load the new version and then the old version. Could it be that there is another location where the id is being referenced? Several of my teams are reporting this behavior and it makes testing quite difficult.

Is there any way to create a new version and ensure that it doesn't interfere with previous versions?

nikskhubani commented 6 years ago

We are facing the exact issue;

  1. We have an app with version lets say 6.0.0.1
  2. That app is added to a modern site collection
  3. App has extension registering to site collection
  4. Everything is good and working fine
  5. We released a new app version 6.0.0.2
  6. Added that new version to App catalog -> Site collection and upgraded the app to latest
  7. Now, sometime randomly it loads extension code of 6.0.0.1 instead of always loading 6.0.0.2!

This is really a serious issue and need investigation from product team.

boydcster commented 6 years ago

Hi nikskubani,

We found the issue. You have to change all the ids - the id of the solution and the ids of each web part or extension in the solution. We decided that it was too error prone to have to keep track of all the ids so we are now doing all our testing in a separate tenant. That's the best advice I've heard so far.

On Thu, Aug 9, 2018 at 11:55 PM nikskhubani notifications@github.com wrote:

We are facing the exact issue;

  1. We have an app with version lets say 6.0.0.1
  2. That app is added to a modern site collection
  3. App has extension registering to site collection
  4. Everything is good and working fine
  5. We released a new app version 6.0.0.2
  6. Added that new version to App catalog -> Site collection and upgraded the app to latest
  7. Now, sometime randomly it loads extension code of 6.0.0.1 instead of always loading 6.0.0.2!

This is really a serious issue and need investigation from product team.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SharePoint/sp-dev-docs/issues/2329#issuecomment-411975120, or mute the thread https://github.com/notifications/unsubscribe-auth/ACCdQnkLecM58kSp_I9E3jf60yAHY3Poks5uPRJYgaJpZM4VzBAY .

-- Boyd R. Collins Application Design Expert

"You can’t depend on your eyes when your imagination is out of focus." - Mark Twain

nikskhubani commented 6 years ago

Changing the ID is also not practical for us. We will have customers using this solution so for testing we can do test on different tenants but for customers we obviously cant ask our customers to change tenant :(

@VesaJuvonen @waldekmastykarz guys any workaround here please?

nikskhubani commented 6 years ago

@VesaJuvonen @waldekmastykarz any update on it please? This has become a big show stopper for us now :(

jpalo commented 6 years ago

Thanks @nikskhubani for referencing my issue. I have to agree with everybody, this is truly a major question on big tenants where web part (in our case) is used tenant wide and by global user base, and web part doing read/write operations.

We of course do development and testing on different tenant, but for QA type of verification and customer acceptance testing we would really need a way to gradually roll-out the updated .sspkg.

nikskhubani commented 5 years ago

@jpalo did you ever find solution to it?

jpalo commented 5 years ago

Apparently this has since been fixed and overriding with site collection package should work consistently. Have not tested it myself yet, though.

patmill commented 5 years ago

That is correct. Closing this bug down. If it still happens, please reopen.

msft-github-bot commented 4 years ago

This issue is being closed as part of an issue list cleanup project. Issues with no activity in the past 6 months that aren't tracked by engineering as bugs were closed as part of this inititive. If this is still an issue, please follow the steps outlined to re-open the issue.