laurent22 / joplin

Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.
https://joplinapp.org
Other
45.02k stars 4.9k forks source link

Joplin does not sync with S3 compatible Minio bucket on desktop client #9027

Closed umedcollegeru closed 9 months ago

umedcollegeru commented 11 months ago

The syncronisation does not work on windows client but does work on Android client, using the same credentials and server.

Environment

Joplin version: 2.12.18 Platform: Windows OS specifics: Windows 11 Pro

Steps to reproduce

  1. Delete dirs: .config\joplin-desktop\, AppData\Roaming\Joplin\
  2. Install Joplin
  3. Setup S3 (BETA) sync
  4. Delete local data and redownload from target

Logfile

2023-10-08 12:12:42: "Scheduling sync operation...", "0"
2023-10-08 12:12:42: "Preparing scheduled sync"
2023-10-08 12:12:42: "Starting scheduled sync"
2023-10-08 12:12:42: Synchronizer: "Sync: starting: Starting synchronisation to target 8... supportsAccurateTimestamp = false; supportsMultiPut = false [1696749162253]"
2023-10-08 12:12:42: Synchronizer: "Indexing resources..."
2023-10-08 12:12:42: "ResourceService::indexNoteResources: Start"
2023-10-08 12:12:42: "ResourceService::indexNoteResources: Completed"
2023-10-08 12:12:42: models/Folder: "updateFolderShareIds:", "{"shareUpdateCount":0,"unshareUpdateCount":0}"
2023-10-08 12:12:42: models/Folder: "updateNoteShareIds: notes to update:", "0"
2023-10-08 12:12:42: FileApi: "get info.json"
2023-10-08 12:12:42: Synchronizer: "Sync target remote info:", "{"version_":3,"masterKeys_":[{"checksum":"","encryption_method":4,"content":"{\"iv\":\"SbHD6xko3PwhUTRPmbrq0A==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"NvqNHnprPmo=\",\"ct\":\"REDACTED\"}","created_time":1683527443487,"updated_time":1696603354614,"source_application":"net.cozic.joplin-desktop","hasBeenUsed":true,"id":"7304e3bad3c04005a8011b7f7dbb9054"}],"e2ee_":{"value":false,"updatedTime":1684049404880},"activeMasterKeyId_":{"value":"7304e3bad3c04005a8011b7f7dbb9054","updatedTime":1683527443528},"ppk_":{"value":{"id":"968mwbKPilhTTV4MtxJ1G4","keySize":2048,"privateKey":{"encryptionMethod":4,"ciphertext":"{\"iv\":\"oU24iUCpdZlKiYvIvBvvoQ==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"NvqNHnprPmo=\",\"ct\":\"REDACTED\"}"},"publicKey":"REDACTED","createdTime":1683527454559},"updatedTime":1683527454559}}"
2023-10-08 12:12:42: Synchronizer: "Sync target is already setup - checking it..."
2023-10-08 12:12:42: Synchronizer: "Sync target local info:", "{"version_":3,"masterKeys_":[{"checksum":"","encryption_method":4,"content":"{\"iv\":\"SbHD6xko3PwhUTRPmbrq0A==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"NvqNHnprPmo=\",\"ct\":\"REDACTED\"}","created_time":1683527443487,"updated_time":1696749105150,"source_application":"net.cozic.joplin-desktop","hasBeenUsed":true,"id":"7304e3bad3c04005a8011b7f7dbb9054"}],"e2ee_":{"value":false,"updatedTime":1684049404880},"activeMasterKeyId_":{"value":"7304e3bad3c04005a8011b7f7dbb9054","updatedTime":1683527443528},"ppk_":{"value":{"id":"968mwbKPilhTTV4MtxJ1G4","keySize":2048,"privateKey":{"encryptionMethod":4,"ciphertext":"{\"iv\":\"oU24iUCpdZlKiYvIvBvvoQ==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"NvqNHnprPmo=\",\"ct\":\"REDACTED\"}"},"publicKey":"REDACTED","createdTime":1683527454559},"updatedTime":1683527454559}}"
2023-10-08 12:12:42: Synchronizer: "Sync target info differs between local and remote - merging infos: ", "{"version":3,"e2ee":{"value":false,"updatedTime":1684049404880},"activeMasterKeyId":{"value":"7304e3bad3c04005a8011b7f7dbb9054","updatedTime":1683527443528},"masterKeys":[{"checksum":"","encryption_method":4,"content":"{\"iv\":\"SbHD6xko3PwhUTRPmbrq0A==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"NvqNHnprPmo=\",\"ct\":\"REDACTED"}","created_time":1683527443487,"updated_time":1696749162423,"source_application":"net.cozic.joplin-desktop","hasBeenUsed":true,"id":"7304e3bad3c04005a8011b7f7dbb9054"}],"ppk":{"value":{"id":"968mwbKPilhTTV4MtxJ1G4","keySize":2048,"privateKey":{"encryptionMethod":4,"ciphertext":"{\"iv\":\"oU24iUCpdZlKiYvIvBvvoQ==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"NvqNHnprPmo=\",\"ct\":\"REDACTED"}"},"publicKey":"REDACTED","createdTime":1683527454559},"updatedTime":1683527454559}}"
2023-10-08 12:12:42: FileApi: "list "
2023-10-08 12:12:42: App: ""syncInfoCache" was changed - setting up encryption related code"
2023-10-08 12:12:42: e2ee/utils: "activeMasterKeySanityCheck: Active key is an enabled key - nothing to do"
2023-10-08 12:12:42: e2ee/utils: "Trying to load 1 master keys..."
2023-10-08 12:12:42: e2ee/utils: "findMasterKeyPassword: Using master password"
2023-10-08 12:12:42: EncryptionService: "Loading master key: REDACTED. Make active:", "true"
2023-10-08 12:12:42: e2ee/utils: "Loaded master keys: 1"
2023-10-08 12:12:42: "Scheduling sync operation...", "10000"
2023-10-08 12:12:42: models/Setting: "Saving settings..."
2023-10-08 12:12:42: models/Setting: "Settings have been saved."
2023-10-08 12:12:43: "DecryptionWorker: starting decryption..."
2023-10-08 12:12:43: FileApi: "put locks/2_1_46a082423a9541f99cf01d86f868d986.json", "null"
2023-10-08 12:12:43: "DecryptionWorker: completed decryption."
2023-10-08 12:12:52: "Preparing scheduled sync"
2023-10-08 12:12:52: "Starting scheduled sync"
2023-10-08 12:12:52: "Synchronisation is already in progress. State: in_progress"
2023-10-08 12:12:52: "Setting up recurrent sync with interval 300"
2023-10-08 12:13:04: FileApi: "delete locks/2_1_46a082423a9541f99cf01d86f868d986.json"
2023-10-08 12:13:04: Synchronizer: "Error [ERR_STREAM_WRITE_AFTER_END]: write after end
Code: ERR_STREAM_WRITE_AFTER_END
Error: write after end
    at __node_internal_captureLargerStackTrace (node:internal/errors:490:5)
    at new NodeError (node:internal/errors:399:5)
    at ClientRequest.end (node:_http_outgoing:1007:15)
    at writeBody (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\node_modules\@aws-sdk\node-http-handler\dist-cjs\write-request-body.js:22:21)
    at ClientRequest.<anonymous> (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\node_modules\@aws-sdk\node-http-handler\dist-cjs\write-request-body.js:9:13)
    at ClientRequest.emit (node:events:513:28)
    at HTTPParser.parserOnIncomingClient (node:_http_client:643:11)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
    at TLSSocket.socketOnData (node:_http_client:542:22)
    at TLSSocket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)"
2023-10-08 12:13:04: Synchronizer: "Sync: finished: Synchronisation finished [1696749162253]"
2023-10-08 12:13:04: Synchronizer: "Operations completed: "
2023-10-08 12:13:04: Synchronizer: "Total folders: 0"
2023-10-08 12:13:04: Synchronizer: "Total notes: 0"
2023-10-08 12:13:04: Synchronizer: "Total resources: 0"
2023-10-08 12:13:04: Synchronizer: "There was some errors:"
2023-10-08 12:13:04: Synchronizer: "Error [ERR_STREAM_WRITE_AFTER_END]: write after end
Code: ERR_STREAM_WRITE_AFTER_END
Error: write after end
    at __node_internal_captureLargerStackTrace (node:internal/errors:490:5)
    at new NodeError (node:internal/errors:399:5)
    at ClientRequest.end (node:_http_outgoing:1007:15)
    at writeBody (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\node_modules\@aws-sdk\node-http-handler\dist-cjs\write-request-body.js:22:21)
    at ClientRequest.<anonymous> (C:\Program Files\Joplin\resources\app.asar\node_modules\@joplin\lib\node_modules\@aws-sdk\node-http-handler\dist-cjs\write-request-body.js:9:13)
    at ClientRequest.emit (node:events:513:28)
    at HTTPParser.parserOnIncomingClient (node:_http_client:643:11)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
    at TLSSocket.socketOnData (node:_http_client:542:22)
    at TLSSocket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:190:23)"
2023-10-08 12:13:04: "Setting up recurrent sync with interval 300"
2023-10-08 12:13:05: "DecryptionWorker: starting decryption..."
2023-10-08 12:13:05: "DecryptionWorker: completed decryption."
github-actions[bot] commented 10 months ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? If you require support or are requesting an enhancement or feature then please create a topic on the Joplin forum. This issue may be closed if no further activity occurs. You may comment on the issue and I will leave it open. Thank you for your contributions.

github-actions[bot] commented 9 months ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, feel free to create a new issue with up-to-date information.

Hobby-Student commented 2 months ago

Hi there,

I'm new to Joplin and trying to get it synchronized to a minio bucket.

Joplin 2.14.22 Windows 10 22H2 and MacOS 14.5 minio Release 13.06.2024

I have the same problem. On Android it's fine and everything gets synced to the S3 bucket. Both Windows and Mac aren't able to synchronize anything. When starting the sync, a "locks" folder (with a .json inside) gets created inside the S3 bucket and after Joplin stops the sync with

FileApi: [warn] Could not retrieve remote date - defaulting to device date: Error [ERR_STREAM_WRITE_AFTER_END]: write after end Code: ERR_STREAM_WRITE_AFTER_END

the "locks" folder gets deleted. Joplin can communicate with the S3 bucket, but for an unknown reason it's not successfull.