Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question - Do SPFX extensions custom actions work in First Release tenants yet? #847

Closed
3 tasks
Brentless opened this issue Sep 11, 2017 · 21 comments
Closed
3 tasks

Comments

@Brentless
Copy link

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

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

Are spfx custom actions for extensions disabled in First Release tenants? Specifically for tenant wide deployment.

Expected or Desired Behavior

I am experimenting with SPFX extensions. I can get them to load in a Dev tenant (using both the url, and loading the app package/custom action via csom). However in a First Release tenant only the url works. I can successfully load the app, add it via custom action, but it never actually executes.

Observed Behavior

After loading the custom action, nothing happens. If I remove the dist files, it errors or in the console (can't find files), so it is loading, just not executing. There are no errors displayed.

Steps to Reproduce

Create app, load in admin center, load using custom action and app id

@VesaJuvonen
Copy link
Contributor

Hi Brent, Extensions are enabled in first release tenants. As long as you have the clientsidecomponentID for the custom action matching on the manifest ID of the extension, you should be good. There are however some nuances around this related on the scope of the user custom action and how it's being associated with the site.

If you do however follow the tutorials (https://dev.office.com/sharepoint/docs/spfx/extensions/get-started/build-a-hello-world-extension) - you should get the extension to be visible on the site if it's deployed to the CDN.

To be able to figure out what actually goes wrong, we'd need either more details on your code - what's there and how it's being deployed or you can potentially share the solution as attached (without node_modules) and we can have a quick look if we can solve the issue fast.

Have you btw tested the extension with dev tenant? - is it working there, but not in the first release? - Would give us again more details on the possible issue.

@Brentless
Copy link
Author

Brentless commented Sep 11, 2017

At this point, I am attempting just the most basic hello world type concept, with only a console.log inside the onInit.

Attached is the solution.
spfxExtTest.zip

I have tested my exact same process in the dev tenant, and it worked there. Dist files are just placed in a SP doc library at the moment. This was based of of the latest yeoman template. skipFeatureDeployment was set to Yes/True. I added an elements.xml in the sharepoint/assets folder. This ultimately will be a Google Analytics script (based on the spfx extensions sample).

There is no error message at all. Just nothing happens. When I remove the dist files, I do get a 404 error because it can't find the files, so that is how i know it is at least loading.

My CSOM for adding the extension (manifest ID is 8bf4d1a4-bb69-4a86-bdc0-1a191e98fb47)
$rootWeb = $clientContext.Web $context.ExecuteQuery() $customActions = $rootWeb.UserCustomActions $context.Load($customActions) $clientContext.ExecuteQuery() $custAction = $customActions.Add() $custAction.Name = "SampleName" $custAction.Title = "Sample title" $custAction.Description = "Sample description" $custAction.Location = "ClientSideExtension.ApplicationCustomizer" $custAction.ClientSideComponentId = "8bf4d1a4-bb69-4a86-bdc0-1a191e98fb47" $custAction.Update() $clientContext.ExecuteQuery()

@mpasarin
Copy link

Looking at manifest from the package and the /dist/ files in the solution you attached, it looks like the manifest points at some localized resource (named "buckmanconnect-spfx-ga-buckmanconnectspfxgaapplicationcustomizerstrings_en-us_1a63e9a4daf2c987b4658937de66fd3a.js") and that file is not on the /dist/ folder.
This may lead to the extension trying to load, but failing to load the localized resources.

Can you confirm whether or not you have the localized string files uploaded to your doc lib?
I see your code doesn't use any localized string. Another option would be to remove the localized resources from your config.json

If that doesn't work, could you please press Ctrl + F12 and provide us with any error message that may show up there?

@Brentless
Copy link
Author

from what I have read, those files are actually in the /temp/deploy/ folder. Those are the files that I am putting into my online directory / cdn

Loading the resources isn't the problem, the 404 error is only if I DON'T include the files in /temp/deploy/ (which appear to be the same as /DIST/ but just with a unique id appended to the end of it). My app package is looking for the files with the unique id appended to the end.

My process is:

  1. gulp --ship
  2. gulp bundle --ship
  3. gulp package-solution --ship

No error actually shows up in the Ctnl + F12 console. (If i remove my manifest and .js /dist/ or /temp/deploy/ files from the sharepoint library, then I get a 404 error). As soon as I upload them back, there are zero errors. Just the onInit never runs.

@OliverZeiser
Copy link

I am seeing the same issue. Extensions are not working, except on modern pages. But they are not working on modern site contents page, modern list/library, modern recyclebin etc. Only on modern pages.
I have tried that in a dev tenant as well as a normal tenant in first release. I have tested both options, first release for users and first release for everyone.
Also there is no difference if you deploy it to azure cdn or try to run it locally.
Same applies for trying to run it with the debug querrystring ?loadSPFX=true&debugManifestsFile..... It will not work. The onInit never runs...

@Brentless
Copy link
Author

My experience is slightly different. I can easily get the extension to work flawlessly with the debug querystring (on every type of modern page, library, list, etc). It is only when trying to physically deploy it that nothing happens.

@russgove
Copy link
Contributor

did you ever do a gulp clean? i often have problems if i don't. i do it before any deploy.

@Brentless
Copy link
Author

Brentless commented Sep 14, 2017 via email

@GrahamMcMynn
Copy link

Hi @Brentless - is your tenant setting for first release set to whole tenant (not specific users)? We only support first release for the entire tenant.

@Brentless
Copy link
Author

Brentless commented Sep 15, 2017 via email

@GrahamMcMynn
Copy link

If you send me a fiddler trace of your page loading that is giving you problems I can take a look at it from our end. GrahaMc is my Microsoft alias.

@Brentless
Copy link
Author

Email sent with attachment. Let me know if you don't receive it.

@mmsharepoint
Copy link

For me it seems pretty the same than for you, Brent.
I did not fiddle it but I tried the "2 deployment ways":

  1. Deploy to a CDN, nothing happened and I couldn't even find any 'traces' within browser dev tools
  2. Deploy leaving out the CDN PATH so it should try to get from local Gulp. Nothing happened and local Gulp did not even mark any "Request"
    @mcmynn83 If I can help for comparison reasons let me know

@OliverZeiser
Copy link

Almost the same here. I do see a request to /temp/manifest.js in my gulp console though. But only on modern pages I can then see the additional request for my customizer.js file. On lists, libraries, recycle bin etc I do not see this second request.

@OliverZeiser
Copy link

Okay I got a little further now and I am using office ui fabric recat in my application customizer. I am referencing that as externals in my config.json to keep the bundle size small. But this approach only seems to be working on pages. When bundling fabric react into the application customizer bundle, it works on most modern pages like site contents, lists, libraries. Adding it as externals, it is not working.
Also, whatever I do, on the modern recycle bin page, application customizers don't get loaded at all.

@GrahamMcMynn
Copy link

@Brentless - Sorry for not getting back to you, we are having an issue with how we rolled out to first release. We have not determined the problem but you are correct that it is not working. We are working on a solution.

@AJIXuMuK
Copy link
Collaborator

AJIXuMuK commented Sep 20, 2017

More information about First Release:
in Command Set extension this.context.listView.columns is always an empty array.

Can create separate issue if needed.

@mmsharepoint
Copy link

mmsharepoint commented Sep 26, 2017

Good news, I hope:
Since Microsoft announced GA for the extensions yesterday my solution (Application Customization placeholder, deployed on a first release tenant more than a week ago under RC0) is now working without any modification.

@Brentless
Copy link
Author

I can confirm the same! My test extensions are now working flawlessly.

@VesaJuvonen
Copy link
Contributor

Closing this one, since it was confirmed in the thread that this is no longer an issue. Thx everyone for your input.

@msft-github-bot
Copy link
Collaborator

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

@SharePoint SharePoint locked as resolved and limited conversation to collaborators Jan 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants