Unable to generate demographics report in V 7.0.1 - Fatal Error

Situation
Trying to generate report>blank froms>core>dempographics, i get a pop window appearing to be a raw PDF content representation. Suggesting that the PDF file is being served directly as plain text instead of being rendered as a PDF document.

Now i tried to check the files whitelist but i get this instead…

OpenEMR Version
I’m using OpenEMR version 7.0.1

Browser:
I’m using: Chrome/Edge

Operating System
I’m using: Win 10

Search
Did you search the forum for similar questions? Yes

Logs
Fatal error : Uncaught GuzzleHttp\Exception\ConnectException: cURL error 35: OpenSSL SSL_connect: Connection was reset in connection to cdn.jsdelivr.net:443 (see libcurl - Error Codes) for https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json in X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:210 Stack trace: #0 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(158): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\Handler\EasyHandle), Array) #1 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php(110): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #2 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\Handler\CurlHandler.php(47): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\CurlFactory)) #3 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php(28): GuzzleHttp\Handler\CurlHandler->__invoke(Object(GuzzleHttp\Psr7\Request), Array) #4 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\Handler\Proxy.php(48): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler{closure}(Object(GuzzleHttp\Psr7\Request), Array) #5 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\PrepareBodyMiddleware.php(35): GuzzleHttp\Handler\Proxy::GuzzleHttp\Handler{closure}(Object(GuzzleHttp\Psr7\Request), Array) #6 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\Middleware.php(31): GuzzleHttp\PrepareBodyMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array) #7 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\RedirectMiddleware.php(71): GuzzleHttp\Middleware::GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Request), Array) #8 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\RedirectMiddleware.php(107): GuzzleHttp\RedirectMiddleware->__invoke(Object(GuzzleHttp\Psr7\Request), Array) #9 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\RedirectMiddleware.php(73): GuzzleHttp\RedirectMiddleware->checkRedirect(Object(GuzzleHttp\Psr7\Request), Array, Object(GuzzleHttp\Psr7\Response)) #10 X:\xampp\htdocs\openemr\vendor\guzzlehttp\promises\src\FulfilledPromise.php(41): GuzzleHttp\RedirectMiddleware->GuzzleHttp{closure}(Object(GuzzleHttp\Psr7\Response)) #11 X:\xampp\htdocs\openemr\vendor\guzzlehttp\promises\src\TaskQueue.php(48): GuzzleHttp\Promise\FulfilledPromise::GuzzleHttp\Promise{closure}() #12 X:\xampp\htdocs\openemr\vendor\guzzlehttp\promises\src\Promise.php(248): GuzzleHttp\Promise\TaskQueue->run(true) #13 X:\xampp\htdocs\openemr\vendor\guzzlehttp\promises\src\Promise.php(224): GuzzleHttp\Promise\Promise->invokeWaitFn() #14 X:\xampp\htdocs\openemr\vendor\guzzlehttp\promises\src\Promise.php(269): GuzzleHttp\Promise\Promise->waitIfPending() #15 X:\xampp\htdocs\openemr\vendor\guzzlehttp\promises\src\Promise.php(226): GuzzleHttp\Promise\Promise->invokeWaitList() #16 X:\xampp\htdocs\openemr\vendor\guzzlehttp\promises\src\Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending() #17 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\Client.php(187): GuzzleHttp\Promise\Promise->wait() #18 X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\ClientTrait.php(44): GuzzleHttp\Client->request(‘GET’, ‘https://cdn.raw…’, Array) #19 X:\xampp\htdocs\openemr\interface\super\manage_site_files.php(106): GuzzleHttp\Client->get(‘https://cdn.raw…’, Array) #20 {main} thrown in X:\xampp\htdocs\openemr\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php on line 210

ChatGPT response:
"The error message you provided indicates that there was an issue with connecting to the “cdn.jsdelivr.net” server while trying to retrieve a JSON file. This JSON file seems to be related to MIME types for HTTP requests.

Here’s the relevant part of the error message:
Fatal error: Uncaught GuzzleHttp\Exception\ConnectException: cURL error 35: OpenSSL SSL_connect: Connection was reset in connection to cdn.jsdelivr.net:443 (see libcurl - Error Codes) for https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json

The error you are encountering appears to be related to external data fetching, and it might not be directly related to the reports issue you mentioned earlier. Nonetheless, resolving this connectivity problem with “cdn.jsdelivr.net” could potentially fix other issues in the OpenEMR application".

Are you still getting this error? It looks like that error occurs because the CDN was down when OpenEMR attempted to retrieve the list of valid mimetypes here:

It looks like if its still giving you problems you can temporarily turn off secure_upload in globals to skip fetching that file.

@adunsulag
Yes, still the same error!

disabling secure upload manages to do this:

I’d recommend trying to go to that file directly from the machine. Use curl, wget, or some other program from the server and see if its reachable, if its not then its likely a networking issue you’ll need to investigate as I can load up that file just fine.

1 Like

@adunsulag

Like I said this appears to be a networking issue as you’ve confirmed by that curl request. Has someone updated any firewall rules for outbound connections. Can you get outbound requests to other websites such as google.com or some other site?

Since its a networking issue you’ll need to explain how your OpenEMR is installed / setup (docker, network topology, etc) for people in the community who have networking / server admin experience to assist you.

@adunsulag
Windows 10 and Xampp

So you need to figure out why your windows firewall or your WIFI router all of a sudden is blocking the request:

4-My LAN has a WIFI router with AES strong passwords, MAC filtering, and no port forwarding. No physical access to router.

Nothing in the logs, i even turned off the firewall completely on both the router and internet security as well as default windows firewall. Same error.

Is this running on docker? Are you able to navigate to that db.json url from your browser in your local area network?

Not using docker. And no, I can’t reach using chrome browser “ERR_CONNECTION_RESET”.

If you are ok with disclosing this, what country / region of the world are you in? That url resolves just fine for me. I’m wondering if there is something happening further upstream to you. To be clear you are using chrome to go to to this URL: https://cdn.jsdelivr.net/gh/jshttp/mime-db@master/db.json

I am from around :sweat_smile:. Is there another way to handle the MIME, offline may be?! I am used to thinking of Openemr as a self-hosted, offline Electronic Health Records (EHR) and Medical Practice Management system. Utilizing the core functionality and features designed to operate entirely offline without the need for external online resources, or I thought so!

1 Like

If you have some dev experience, you can go in and modify the the function to remove the external white list check or add a globals flag to turn it off and only use the one that is locally installed. Or contract a developer to do that piece., or open an issue on github and when someone has free time they can implement the functionality. Otherwise the only other workaround is to turn off secure upload.

Even if i turn off secure upload i still get no way to change the white/black file list

No dev experience obviously on my end :sweat_smile:. I might use ChatGPT.

Good luck, or file an issue for it on GitHub - openemr/openemr: The most popular open source electronic health records and medical practice management solution.. There are some features in OpenEMR that reaches out externally over a network. Most of it can be used offline.

1 Like