sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

SPFx app not showing up in the webpart list

Open paigeflourin opened this issue 8 years ago • 23 comments

Thank you for reporting an issue or suggesting an enhancement. We appreciate your feedback - to help the team to understand your needs, please complete the below template to ensure we have the necessary details to assist you.

Category

  • [ ] Question
  • [ ] Typo
  • [x] Bug
  • [ ] Additional article idea

If you are planning to share a new feature request (enhancement / suggestion), please use SP Dev UserVoice at http://aka.ms/sp-dev-uservoice.

Expected or Desired Behavior

Upon installation of the app, it should create a list and i can add the webpart to the pages as well

Observed Behavior

The list is being created as i install the app, but when i try to add the app to my page, the app is not showing up in the list of the available apps.

Steps to Reproduce

  1. Install the app
  2. The list provisioned
  3. add webpart to page
  4. the app is not listed

This is my package-solution.json

{
  "solution": {
    "name": "our-applications-client-side-solution",
    "id": "c23661a1-50a2-4b69-b8f2-9b7a7a5db2b1",
    "version": "1.0.2.16",
"features": [
      {
        "id": "49280240-2932-4868-b668-19361475ac9b",
        "title": "Our Applications Web part feature",
        "description": "A feature which activates the Client-Side WebPart named Our",
        "version": "1.0.2.15"
      },
      {
      "title": "our-applications-client-side-solution",
      "description": "our-applications-client-side-solution",
      "id": "523fe887-ced5-4036-b564-8dad5c6c6e24",
      "version": "1.0.2.15",
      "assets": {
        "elementManifests": [
          "elements.xml"
        ],
        "elementFiles":[
          "schema.xml"
        ]
      }
    }]
  },
  "paths": {
    "zippedPackage": "solution/our-applications.sppkg"
  }
}

paigeflourin avatar Jan 18 '18 08:01 paigeflourin

@paigeflourin - if you would like us to take a look at this we will need the entire package. Please upload it as an attachment.

GrahamMcMynn avatar Jan 18 '18 19:01 GrahamMcMynn

Hi @mcmynn83 i have my application here: https://github.com/paigeflourin/our-applications

paigeflourin avatar Jan 19 '18 03:01 paigeflourin

Hi @mcmynn83 have you looked into it? this is the project. our-applications-master.zip

paigeflourin avatar Jan 23 '18 08:01 paigeflourin

Thanks for sending that, we will take a look at this.

GrahamMcMynn avatar Jan 23 '18 17:01 GrahamMcMynn

@paigeflourin - I built your package and installed it in a test tenant. Could you clarify what exactly you are seeing as the issue? I did the following:

  1. Add the app to the app catalog
  2. Go to a site collection and install the app
  3. See in site contents that OurApplication was added
  4. Create a new page
  5. Add a webpart, and see "our-applications"

You'll have to be more specific as to what you are actually seeing wrong.

GrahamMcMynn avatar Jan 23 '18 20:01 GrahamMcMynn

Also, one other thing, you have duplicated your component ID's between your 2 webparts.

GrahamMcMynn avatar Jan 23 '18 20:01 GrahamMcMynn

Hi @mcmynn83 ,

in the package that i have upload i removed the provisioning of assets so when i put this:

{
  "solution": {
    "name": "our-applications-client-side-solution",
    "id": "c23661a1-50a2-4b69-b8f2-9b7a7a5db2b1",
    "version": "1.0.2.16",
"features": [
      {
        "id": "49280240-2932-4868-b668-19361475ac9b",
        "title": "Our Applications Web part feature",
        "description": "A feature which activates the Client-Side WebPart named Our",
        "version": "1.0.2.15"
      },
      {
      "title": "our-applications-client-side-solution",
      "description": "our-applications-client-side-solution",
      "id": "523fe887-ced5-4036-b564-8dad5c6c6e24",
      "version": "1.0.2.15",
      "assets": {
        "elementManifests": [
          "elements.xml"
        ],
        "elementFiles":[
          "schema.xml"
        ]
      }
    }]
  },
  "paths": {
    "zippedPackage": "solution/our-applications.sppkg"
  }
}

in my package-solution.json. the app would install properly and the list would be deployed. However, you wont be able to add a webpart because the "our-application" is nowhere to be seen.

paigeflourin avatar Jan 24 '18 04:01 paigeflourin

Ok, so I do not see that. Please send the exact package you are using that is having the error as building the project you sent does not repro the issue.

GrahamMcMynn avatar Jan 24 '18 17:01 GrahamMcMynn

Our Applications Angular.zip

hi @mcmynn83 apologies for that one, here is the package.

paigeflourin avatar Jan 25 '18 06:01 paigeflourin

@paigeflourin - I'm sorry, but I still don't see the error you are suggesting. I went and added the package you sent (in the zip file under sharepoint\solution folder I added the sppkg file, added the app to the site, created a new page, and then saw Our-Application. It fails to load because it Failed to load URL 'https://campress.sharepoint.com/TeamApplications/our applications angular-ourapplicationsstrings_en-us_536e65149b0acf4d52c0043073b9fc59.js... But I don't see the webpart missing when trying to add it to a page.

GrahamMcMynn avatar Jan 25 '18 18:01 GrahamMcMynn

@mcmynn83 was the list created upon adding the app? This is what happens to my app

I added the app, then the list gets created after:

list-created

then what i try to add it to my page, i do not see the application webpart:

missing-app

i have attached the latest app that i have took the screenshot from Our Applications Angular.zip

paigeflourin avatar Jan 29 '18 04:01 paigeflourin

@mcmynn83 additionally, when i try to update the existing app on a site. i get the error "manifest not found"

paigeflourin avatar Jan 29 '18 04:01 paigeflourin

@paigeflourin - that sounds like there was an issue at deploy time. There is currently a bug (which is being fixed and rolled out as we speak), which allows an app to say it is successfully deployed even when an error occurs. Could you go to your app catalog and try redeploying your app (either delete it and add it again, or undeploy and then deploy it).

GrahamMcMynn avatar Jan 29 '18 17:01 GrahamMcMynn

hi @mcmynn83 ,

not sure what happened, but that completely resolved the issue. Apologies if it took much of your time. dont know why it wasnt showing initially.

paigeflourin avatar Jan 30 '18 04:01 paigeflourin

Excellent glad to hear it is working!

GrahamMcMynn avatar Jan 30 '18 18:01 GrahamMcMynn

Hello, I encountered a similar problem. I deployed a first version of my SPFx projects with 1.0.0.0 version. I could see my web parts without any problems. After that, I wanted to upgrade my version to 1.0.0.1. I'm upload my sppkg to catalog and I can see the update of its version on sharepoint. But, when I refresh my page I don't see my webparts !!!

After some tries, I founded a solution but it's not really very good ! I changed the solution ID when I increment my version (package-solution.json), I delete the old package and I upload the new solution with new ID and new version. With this way, I can see my webparts on the page.

Do you have any idea, why upgrading solution version doesn't work ?

aminezemzemi avatar Feb 22 '18 19:02 aminezemzemi

Yes, this is a known issue. It should have been fixed with our rollout to 1.4.1. Please see issue https://github.com/SharePoint/sp-dev-docs/issues/775 for details.

GrahamMcMynn avatar Feb 22 '18 22:02 GrahamMcMynn

How can I do when we I have to upgrade sppkg with app installed in many sub-sites ? I have to delete, re-install app manually ?

aminezemzemi avatar Feb 27 '18 09:02 aminezemzemi

@mimosa803 - unfortunately that is true... you can also programatically do it using our ALM API... but it has to be done in each web that you are using the SPFX solution.

GrahamMcMynn avatar Feb 27 '18 18:02 GrahamMcMynn

#775 This issue is related.

PieterHeemeryck avatar May 24 '19 13:05 PieterHeemeryck