contentful / contentful-cli

The official Contentful command line interface. Use Contentful features straight from the command line!
https://www.contentful.com/developers/docs/tutorials/cli/
MIT License
326 stars 61 forks source link

Using merge show command outputs an error #2680

Open tth-nine opened 3 days ago

tth-nine commented 3 days ago

Trying to show migration difference between my TOBIAS environment and dev environment and using the CLI outputs an error. I can make the migration file and see the difference via the merge app in the contentful web app.

I have my .contenfulrc.json configured with all the correct values for spaceId and CMA token and i am an admin in the my active space.


When i run: contentful merge show --source-environment-id TOBIAS --target-environment-id dev-2024-06-21 --yes

I get this error in my terminal

Error: The resource could not be found.
{                                                                                                                                                                                                                                                                                                                   
   "status": 404,                                                                                                                                                                                                                                                                                                    
   "statusText": "Not Found",                                                                                                                                                                                                                                                                                        
   "message": "The resource could not be found.",                                                                                                                                                                                                                                                                    
   "details": "AppDefinition does not exist.",                                                                                                                                                                                                                                                                       
   "request": {                                                                                                                                                                                                                                                                                                      
     "url": "/spaces/<spaceId>/environments/TOBIAS/app_installations/undefined",                                                                                                                                                                                                                                  
     "headers": {                                                                                                                                                                
       "Accept": "application/json, text/plain, */*",
       "Content-Type": "application/vnd.contentful.management.v1+json",
       "X-Contentful-User-Agent": "app contentful.cli/3.3.3; sdk contentful-management-plain.js/11.27.4; platform node.js/v20.13.1; os macOS/v20.13.1;",
       "Authorization": "Bearer ...<token>",
       "User-Agent": "axios/1.6.8",
       "Content-Length": "17",
       "Accept-Encoding": "gzip, compress, deflate, br"
     },
     "method": "put",
     "payloadData": "{\"parameters\":{}}"
  }                                                                                                                                                                                                                                                    }

I can see in the web app that when using the merge app it uses this URL: https://app.eu.contentful.com/spaces/<spaceId>/environments/TOBIAS/apps/app_installations/merge


Node version: 20.13.1 Contentful CLI version: 3.3.3 Contentful url: https://app.eu.contentful.com PC: Apple M1 Pro OS: MacOs Sononma Version 14.5