strapi-plugin-config-sync: [BUG] Importing configuration files gives always error in Strapi 4.3.4.

Bug report

Describe the bug

Every time we try to import the configuration for our models we get an error toast, looking on the console we get this error:

XHRPOSThttp://localhost:1337/config-sync/import
[HTTP/1.1 500 Internal Server Error 2477ms]

	
POST
	http://localhost:1337/config-sync/import
Status
500
Internal Server Error
VersionHTTP/1.1
Transferred1.11 kB (99 B size)
Referrer Policyno-referrer
Request PriorityHighest

    	
    Access-Control-Allow-Credentials
    	true
    Access-Control-Allow-Origin
    	http://localhost:1337
    Connection
    	keep-alive
    Content-Length
    	99
    Content-Security-Policy
    	connect-src 'self' https:;script-src 'self' editor.unlayer.com;frame-src 'self' editor.unlayer.com;img-src 'self' data: blob: cdn.jsdelivr.net strapi.io dl.airtable.com res.cloudinary.com;media-src 'self' data: blob: dl.airtable.com res.cloudinary.com;default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';object-src 'none';script-src-attr 'none';style-src 'self' https: 'unsafe-inline'
    Content-Type
    	application/json; charset=utf-8
    Date
    	Mon, 15 Aug 2022 15:55:44 GMT
    Expect-CT
    	max-age=0
    Keep-Alive
    	timeout=5
    Referrer-Policy
    	no-referrer
    Strict-Transport-Security
    	max-age=31536000; includeSubDomains
    Vary
    	Origin
    X-Content-Type-Options
    	nosniff
    X-DNS-Prefetch-Control
    	off
    X-Download-Options
    	noopen
    X-Frame-Options
    	SAMEORIGIN
    X-Permitted-Cross-Domain-Policies
    	none
    	
    Accept
    	*/*
    Accept-Encoding
    	gzip, deflate, br
    Accept-Language
    	en-GB,tr;q=0.8,es;q=0.5,en;q=0.3
    Authorization
    	Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwiaWF0IjoxNjYwNTc4ODgyLCJleHAiOjE2NjMxNzA4ODJ9.W6jgkZ3Ow0b3D-LynqtxQe08YpCB2-Sj9Om0mrav1IU
    Connection
    	keep-alive
    Content-Length
    	2790
    Content-Type
    	application/json
    Host
    	localhost:1337
    Origin
    	http://localhost:1337
    Sec-Fetch-Dest
    	empty
    Sec-Fetch-Mode
    	cors
    Sec-Fetch-Site
    	same-origin
    User-Agent
    	Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:103.0) Gecko/20100101 Firefox/103.0

And going to the network, we can see this. Screen Shot 2022-08-15 at 19 00 13

Moving to the content manager, we get two behaviours:

  1. The configuration settings were properly loaded.
  2. The admin user lost all the permission and cannot see anything.

Steps to reproduce the behavior

  1. Go to Content Manager.
  2. Click on Config Syng > Tools.
  3. Select all the files you want to import.
  4. Import them.
  5. See the toast error.
  6. Go to Console.
  7. Check the error.
  8. Go to Network.
  9. Check the error.

Expected behavior

It shouldn’t give an error at importing.

Screenshots

If applicable, add screenshots to help explain your problem.

Code snippets

If applicable, add code samples to help explain your problem.

System

  • Node.js version: v14.20.0
  • Strapi version: 4.3.4
  • Plugin version: 2.0.8
  • Database: PostgreSQL 13.7
  • Operating system: Alpine Linux v3.16

Additional context

It is always a clean installation with a empty database.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 35 (16 by maintainers)

Most upvoted comments

Great! Thanks for debugging. I can work with this.

OK. Then I think we can close this issue as we are not able to reproduce it and nobody reported the same issue. Thanks.