Mikhail2k15 / viva-connections-company-communicator

Adaptive Card Extensions for Viva Connections Dashboard shows the latest org-wide communications from Company Communicator to prioritize their visibility and increase readership across your organization.
1 stars 2 forks source link

Messages not displayed. Card has "Loading" text #6

Open aidab98 opened 1 year ago

aidab98 commented 1 year ago

I have tried deploying this card but facing a problem. I have generated the sppkg package and uploaded it in the app catalog. However, when I add the card on the dashboard and fill in the URI and endpoint fields, the card is not displaying the messages and is just showing loading. Also note that after I uploaded the package, no API access were shown in the SharePoint admin center.

Appreciate your help.

Mikhail2k15 commented 1 year ago

@aidab98 did you provide the correct settings for your CC? image

Mikhail2k15 commented 1 year ago

Try to use the latest version updated today and check this simple guide https://github.com/Mikhail2k15/viva-connections-company-communicator/wiki/Deployment-Guide

aidab98 commented 1 year ago

@Mikhail2k15 thank you for sharing the file and deployment guide. I've have uploaded now the latest version of the sppkg file. However, when I go to the API access to approve, it is returning this error. Please advise. image

Mikhail2k15 commented 1 year ago

Check your name for app registration It should be the same Company Communicator App. Did you deploy the CC with that app registration?

aidab98 commented 1 year ago

I have company communicator deployed, but it doesn't have the same name set up. What should be done in this case?

Mikhail2k15 commented 1 year ago

In that case try to change the resource name in config and rebuild the solution "webApiPermissionRequests": [ { "resource": "Company Communicator App", "scope": "access_as_user" }

Mikhail2k15 commented 1 year ago

config/package-solution.json

aidab98 commented 1 year ago

Thanks for your help. Can you please provide guidance on rebuild the solution and create the sppkg file?

Mikhail2k15 commented 1 year ago

It is on the home page

How to build solution

Clone this repository Ensure that you are at the solution folder In the command-line run: npm install gulp serve --nobrowser gulp bundle --ship gulp package-solution --ship

aidab98 commented 1 year ago

Thanks for sharing. I followed those steps and the build fails when I run the gulp serve --nobrowser command. It either takes a lot of time to run and never ends or gives this error. Error - [webpack] 'dist': No localized files found under the root directory ("C:\Users\aidabayoumi\Downloads\viva-connections-company-communicator-main (1)\viva-connections-company-communicator-main") matching pattern "lib/adaptiveCardExtensions/companyCommunicator/loc/{locale}.js"

Mikhail2k15 commented 1 year ago

Try to update your environment to the latest version npm install @microsoft/generator-sharepoint@latest --global

Mikhail2k15 commented 1 year ago

Make sure that you are in the right folder when you are running gulp commands image

aidab98 commented 1 year ago

Thanks for clarifying, but the build is still not working. Its stuck at gulp serve. Please advise and if there are additional prerequisites that need to be installed.

Mikhail2k15 commented 1 year ago

Nothing special.... in order to verify that you sfpx dev environment is working correctly try to generate a simple project and build run this command yo @microsoft/sharepoint than select Adaptive Card Extension and other options by default

Mikhail2k15 commented 1 year ago

Or I have created a better way to do it. Just fork this repo and run GitHub Action workflow to build your own sppkg without setup an environment locally.

Mikhail2k15 commented 1 year ago

https://github.com/Mikhail2k15/viva-connections-company-communicator/wiki/How-to-build-solution