I am getting the following error when I try to register a custom widget to our Portal. I don't believe the error is a result of the widget since it's one of Robert Scheitlin, GISP custom widgets.
I can access the manifest in the browser if I go directly to https://<widget.domain>/widgets/PopupPanel/manifest.json. So I'm not sure if it's an issue with Portal or the web server hosting the widget that's causing the error.
I came across a similar problem. Your webserver must be CORS enabled (as well as some other settings) to successfully complete the request. Refer to this checklist:
CORS seems like the probable culprit, but I've gone through that checklist and applied the changes to the webserver and I still get the status 500 error. The widgets are hosted on an Apache webserver. Below are the relevant parts of the httpd.conf I've modified to try and follow that checklist.
LoadModule mime_module modules/mod_mime.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule headers_module modules/mod_headers.so
Require all granted
Allow from all
Header set Access-Control-Allow-Origin "*"
AddType application/json .json
Two additional errors in my log when I tried setting things up:
1) The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'.
2) The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'.
Thanks, Doug. Nothing like that is showing up in the server log, but the portal logs throw this error:
URL 'https://<widget.domain>/widgets/PopupPanel/manifest.json' is not accessible: Error. sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.