Custom Webparts Randomly Fail to Load, Giving "n._internalInitialize is not a function" Error - sharepoint

I have created a number of webparts using React that I have deployed to the app catalog of a SharePoint Online site. When loading a page containing various webparts, I am randomly experiencing an issue when loading a modern page containing them. Sometimes all of the content loads fine, but other times, 1 or more of the webparts will fail to load. When they fail to load, I get the standard "Something went wrong" error with the following error and stack trace:
Something went wrong If the problem persists, contact the site
administrator and give them the information in Technical Details.
ERROR: n._internalInitialize is not a function
CALL STACK:
mwqp/ie</e.prototype._initializeWebPart#https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_699158f7fea868eb081b869967788f85.js:1:1713443
mwqp/ie</e.prototype.loadWebPart/<#https://spoprod-a.akamaihd.net/files/sp-client/sp-pages-assembly_en-us_699158f7fea868eb081b869967788f85.js:1:1705013
I am not sure how to resolve this issue and would appreciate help. There is nothing in the developer tools console that provides any additional information about this error. The only errors present are errors that are also present when all of the webparts do load successfully. These errors are:
Content Security Policy: The page’s settings blocked the loading of a
resource at inline (“script-src”). onloadwff.js:71:799505 Uncaught
ReferenceError: exports is not defined
/_layouts/15/activitymonitor.js:25
I have a git repo containing the code for one of the simplest webparts that this occurs with: https://github.com/kbroskie/spfx-welcome-message
Edit to add more information:
This occurs regardless of whether or not my cache has just been cleared. It occurs irrespective of browser, but I do tend to encounter this error more often on browsers other than Chrome. There are no 404's in the network logs.
This doesn't occur just after deploying an sppkg. It occurs with sppkgs that haven't been updated recently, as well as those that have.

Related

Sharepoint Online every SPFx web parts get this error : Something went wrong -> Mismatched anonymous define() module

I have SharePoint online sites and some spfx web parts. These sites are created with publishing site templates and web parts have been working for months. I rarely got this error "something went wrong". When I refresh the pages then the error goes away. Every web part gets the same error. Even if I use an empty web part it gives the same error. But in last two weeks, that error increased a lot. Is there any update for publishing sites? How can I remove this error?
Something went wrong
If the problem persists, contact the site administrator and give them the information in Technical Details. TECHNİCAL DETAİLS ERROR: Mismatched anonymous define() module: function(e,f,d){"use strict"; function i(e,t)...
I redeployed the packages but nothing change.
Finally I found the cause.
I use a publishing portal site template with a custom master page. There are some javascript references in the header. When I removed references, the error has gone. The final solution is to add this code
<!--SPM:<SharePoint:Scriptlink language="javscript"
name="https://....js"
runat="server" Localizable="false"/>-->

PDFjs ERR_TOO_MANY_REDIRECTS Request.Cookies

We have some users that are using PDFjs that are getting Failed to fetch error message. In the console the error is Failed to load resource: net::ERR_TOO_MANY_REDIRECTS. I am not sure why this error is happening. The user need to be authentication to view the pdf file so I am not sure if that is related to PDF.js being in a VM Runtime and can't access the cookies. When I do context.Request.Cookies["customerid"] the cookie is found and can validate. But when I do HttpContext.Current.Session["customerid"] the data is missing and I get into the loop?
PDF.js v2.3.164 (build: 12ff2527)
Message: Failed to fetch
Network
You can try to use the following four methods to solve this error:
Test with other browsers
You can try visiting the same URL using other browsers. If the error still persists, the issue may come from the server side. You may need to log on the website at another time. If the error doesn’t appear on a new browser, try the methods below to fix issues on your original browser.
Clear your browser data
Browser data like browsing history, cache, cookies, etc can contain faulty files that cause the ERR_TOO_MANY_REDIRECTS error. Once the browser data are cleared, you can try logging in the website and see if the error is gone.
Check your browser extensions
You can open the extension manager in your browser to check the extensions you have installed on your browser and disable all the extensions to see if this fix the problem. If it does, you can enable one extension at a time to identify the one that causes the trouble.
Correct your system date and time
Usually you meet the ERR_TOO_MANY_REDIRECTS error due to the incorrect or outdated date and time settings on your system. To correct your system date and time.
More information about this error you can refer to this link: ERR_TOO_MANY_REDIRECTS

error 500 http web server: command not handled exception

I think this topic a lot of ppl post it already. I also look for lot of thread in stack overflow and some ibm page. They do give some comment of how to solve this problem. But i still facing the same problem, it still give this error.
Case start :
Actually one of my customer, they have facing this error during running on webpages and also notes ~
error 500 http web server: command not handled exception
Action taken but not solve:
The user id signing/creating the XPages allowed to run XPages in the
server document?
Do project clean, build automatically on designer
Do testing on creating new xpages page with simple lable " hello world" , this one can run successfully only.
Try to reload the http server by
tell http quit
load http
After do this the problem still same give the same error. May i know got any other way to solve it?
"Unresolved compilation errors: java.lang.String" points to a failed install as here. A class in java.lang or java.util should always be resolved. Ensure all services and any processes for Notes / Domino are stopped before the relevant install, jar files can get locked once used. Xpages can't load, Error 500; java.util cannot be resolved
Switch on "Display XPage runtime error page" in application's XSP Properties then you'll see a detailed error message which probably will lead you to the issue:
I frequently get this error when there is a mismatch/problem with access rights or the user login has expired and the app/database doesn't redirect to the login page. I suggest you double check the security basics first. (Might also explain why the app works locally, but not on the server).

Getting 409 error on form submit

So am getting a 409 Conflict with Failed to load resource error. Happens when i click on a form submit of a generic Java web application.
On click of the button there is no application log shows up, just the following error shows up and the process ends. This log is from browser console.
What are the possibilities for such an issue? Any help/suggestion will be really helpful.Help on internet was not much helpful.
Interestingly this is very intermediate i.e. it happens for a device and the next time you won't see it, comes back from grave again in few hrs or so.
Let me start by saying that I have not received this error, but based on your problem statement, it seems you could be having trouble with a file lock on your server. If you are attempting to call a resource that is loaded in another tool like an IDE, then it is possible the file is locked and the server is raising this error.
You may only receive this error if your server is in development mode vs production mode. Production mode will cache the file and not result in a conflict.
Here is a link that partially explains the problem.
HTTP Error 409 Conflict
Hope this helps!!

Sharepoint 2010 sends error 404 once per user after deployment or application pool restart

We have a big SharePoint-Project we installed on different servers. Whenever we deploy any feature/webpart the first access of ANY page (including Backend Pages like "ManageFeatures.aspx") throws a 404 Error.
This happens once for every user
I included a httphandler (IHttpModule) to catch those errors to get more information. In that handler I found out that while this error is thrown SPContext.Current is null.
When I call that page a second time the 404 is gone and the page is shown correctly. This is not a sporadic error but happens every time we deploy something.
Any clue what causes this behavior and how to avoid this?
(We got the error on all of our 10 machines)
Try to represent this error with default master-page.

Resources