Question: After I ran the update from Magento 2.2.8 to Magento 2.3.2, I am getting this error whenever I run a CLI command like upgrade or cache,

> 
> main.CRITICAL: Type Error occurred when creating object: Magento\Framework\Interception\Config\Config, Return value of Magento\Framework\Interception\Config\CacheManager::load() must be of the type array or null, string returned [] []
> 
> 
> 

Any idea how to solve that?

Thanks!

Answer: 
I was having the same issue and I did everything to work this out, but with no success.

It's showing me this error:
gallery.js:298 Uncaught TypeError: settings.$elementF.fotorama is not a function
at UiClass.initGallery (gallery.js:298)
at UiClass.initialize (gallery.js:139)
at UiClass.initialize (wrapper.js:109)
at UiClass (class.js:49)

I found out there was an external script that I used to add the WhatsApp chat that was conflicting. I just took off the script and guess what?

This is the damn script:

```
<script async data-id="68933" src="https://cdn.widgetwhats.com/script.min.js"></script>

```

I would suggest you check if you have any external scripts on your Magento 2 Design Configuration admin or you can try to check on your page whether one or more jquery with different versions are loaded.

It may be different jquery versions are conflicting with fotorama.
I had an external script that was causing this. I'm still not sure why, but in my case it was a script from Constant Contact (yours may be different).

Instead of including it in the header scripts, I moved it into a block (not sure if that did anything) and then I added an async tag to that script. That seems to have done it.

To troubleshoot, remove all of your third party scripts and see if that makes $fotorama run consistently. If it does, add the scripts back slowly until you figure out which one is breaking $fotorama.

Add an async tag to that script, and it should work.

Example

```
<script async> var _ctct_m = "<my cc id>"; </script>

```