Strapi keeps throwing 'error occurred' after creating collection-type, unable to create component

Describe the bug

So it was a long time I’ve been struggling with some ‘error occurred’ on save, in strapi. But It worked until I needed to do some more customization.
My problem is that whenever i create a new collection type with some fields and press save, the window starts loading and throws multiple ‘error occurred’ at the top of the window, and sometimes it will load just endlessly until manual refresh. After reloading manually they do appear on the screen.

What can cause this behavior?

Steps to reproduce the behavior

I tried multiple times and multiple resources, from strapi docs to random people, and every project I’m deploying has the same issue.
This is the video I’ve been following last time : Deploying Strapi on Heroku with MongoDB Atlas - YouTube

  1. Go to ‘strapi development’
  2. Click on ‘create new collection type’
  3. Add fields
  4. Press save
  5. See error

Expected behavior

To save new items inside strapi without errors.

System

  • Node.js version: v14.15.3
  • NPM version: 6.14.10
  • Strapi version: 3.1.0-alpha.5
  • Database: MongoDB
  • Operating system: Windows

Additional context

After a few saves my console gets really red with this error: Failed to load resource: net::ERR_CONNECTION_REFUSED

I can confirm this 100% always happens. I have the same setup with Mongo + Strapi. Anytime I make a change to the models, the little error notification on the top center says “error occurred” but if you just give it 10-15seconds or refresh sometimes, you’ll notice it still succeeds. It’s giving a false negative, there is no actual error, at least in my case. Would be nice if it were fixed, but its not preventing me from doing anything :slight_smile:

Update: I have updated my strapi version to 3.4.1 and created a new project from scratch. I still do get some ‘error occurred’ time to time, but much less and ‘models config fetch’ fortunately disappeared.

Hi @Galvotas, you mentioned you have made some customization to solve this issue, may I know what have you did to prevent this error ?

Hi

I want to leave a comment for whoever is suffering with this error.

I had same error before a couple of hours.
I found what was cousing the error.

Component has a field “bed_count” as captured below;
But it does not appear in admin area!
So, we cant see indicator to be noticed that required field (is empty).
Anyway removed the field from source code (json) then fixed.

hope helpfull

1 Like

Thanks for the reply. I know the original post was using Strapi 3 but I am sure if someone has similar issue in 4 they can use as reference.

:))
Hi Paul.
i left comment for wrong topic.
just now i realized :))

in this way i wanna correct now.
My previous comment was for this error:

‘The component(s) contains error’