directus-sync icon indicating copy to clipboard operation
directus-sync copied to clipboard

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

Open DrazenMatijacic opened this issue 1 year ago • 1 comments

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 [email protected] -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 [email protected] -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/@[email protected]/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):

  • @types/node 20.14.11
  • directus-extension-sync 2.0.0
  • directus-sync 2.2.0
  • tsx 4.16.2
  • Directus 10.13
  • Directus environment Docker

Additional context N/A

DrazenMatijacic avatar Jul 20 '24 19:07 DrazenMatijacic

Hi @DrazenMatijacic Could you send the logs from Directus ?

EdouardDem avatar Sep 16 '24 02:09 EdouardDem

Hi, just encountered thiis when having multiple pulls

module.exports = {
     ...
    dumpPath: './directus-config',

Had to delete all my files under ./directus-config

danimnh avatar Feb 27 '25 09:02 danimnh