Thursday, June 13, 2019

One trick to resolve SPFx extension ListView Commands loading manifests script error

As a SharePoint framework (SPFx) developer, three is continues challenge on daily development. There is a common error after run the SPFx extension ListView Commands project locally. The issue is after you have run "gulp serve" once against one site collection and then stopped the local gulp serve, there is always a error message when you browse the site. Here is the error message and the screenshot.

"Error loading debug script. Ensure the server is running and the “debugManifestsFile” parameter URL is correct."

Error: Script error for "https://localhost:4321/temp/manifests.js" 
https://requirejs.org/docs/errors.html#scripterror


Even you have the solution deployed and the SPFx command added to the site, after this message, the commands will NOT appear on the list or library.

After frustration debugging this issue, here is the procedure to resolve this issue.

1. Logout from SharePoint online.
2. Clear browse cache.
3. Login to SharePoint again

You might need to do this few time until cache is cleaned. You could also open another private browser to avoid this issue.



1 comment:

  1. https://sharepoint.stackexchange.com/questions/262856/unable-to-load-temp-manifests-js-on-https


    Finally figured out what was the problem.

    Before doing gulp serve run the command set NODE_NO_HTTP2=1. This will allow the manifestes.js file to be served over https.
    Before opening the SharePoint Online workbench, access the URL https://localhost:4321/temp/manifests.js from your browser. It may give you warning that it is not really secure, continue anyway. Now open the SharePoint Online workbench.

    ReplyDelete