tractr / directus-sync

A CLI tool for synchronizing the schema and configuration of Directus across various environments.
GNU General Public License v3.0
209 stars 8 forks source link

running directus-sync pull twice in a row fails with fetch failed: other side closed #91

Open DrazenMatijacic opened 1 month ago

DrazenMatijacic commented 1 month ago

Describe the bug When run twice in a row pull, second pull fails with: /directus $ rm -rf directus-config/* /directus $ npx directus-sync -u "http://directus-10:8055" -e admin@test.com -p "test" pull [19:00:26.553] INFO (1736): Create dump folder for collections [19:00:26.565] INFO (1736): Create dump folder for snapshot [19:00:33.847] INFO (1736): ✅ Done! /directus $ npx directus-sync -u "http://directus-10:8055" -e admin@test.com -p "test" pull [19:00:46.260] ERROR (1827): fetch failed err: { "type": "TypeError", "message": "fetch failed: other side closed", "stack": TypeError: fetch failed at node:internal/deps/undici/undici:12618:11 at async Object.request (/directus/node_modules/.pnpm/@directus+sdk@16.1.1/node_modules/@directus/sdk/dist/index.cjs:1:39798) caused by: SocketError: other side closed at Socket.onSocketEnd (node:internal/deps/undici/undici:9169:26) at Socket.emit (node:events:529:35) at endReadableNT (node:internal/streams/readable:1400:12) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) }

To Reproduce Steps to reproduce the behavior:

  1. Create this in Directus '...'
  2. Run directus-sync pull '....'
  3. Run directus-sync pull '....'

Expected behavior I would expect it should update collection or even version it. Minimal expectation is to report error with real problem like destination full.

Versions (please complete the following information):

Additional context N/A