Home / GitHub Page

Feature Request: pCloud Synchronisation

Hi,

Would it be possible to add support for synchronising with pCloud. It would be great to be able to move away from OneDrive/Dropbox to a provider that has a native Linux client and a zero knowledge storage policy.

With my desktop Linux Joplin program, I can use the file system that is auto-backed up to pCloud - the problem is on my Android phone. I can’t figure out how to sync with pCloud unless it is supported by Joplin.

Thank you for doing an awesome job.

pCloud supports WebDAV. Joplin supports WebDAV…

…thus Joplin can synchronize with pCloud.

Thank you for replying. I had tried but could not get it to work and there seems to be no pcloud documentation.

I have tried again and appear to have got it working on mobile now. Perhaps doing it this way with mobile and synchronising on desktop with local files is the way to go.

Thank you.

Setting up Joplin synchronization with pCloud is done via the WebDAV target.

If you got it to work with mobile, it should also work with desktop. If not, there’s a problem somewhere.
Without a proper log and error message, there’s nothing we can do. If you can attach the log, or post the relevant section here, we can have a look.

How do you even setup WebDAV with pCloud?

You check the manual of pCloud and/or ask them for the webdav address. Searching the net gives me the following address for pCloud’s webdav access: https://webdav.pcloud.com

So do I just go into Joplin, set the sync target to WebDav, feed it the url, and then enter my username/email and password? What if I have 2FA enabled?

Yep, that’s usually how it works.

I can’t speak for pCloud. In case of 2FA one rather uses a token instead of a password. In Nextcloud I go to user security and create an app token. You will have to read up on pCloud or send them an email.

1 Like

Alright, thank you

I would also like to see pCloud support with Joplin. Many online services offer pCloud support. I believe they have an API similar to Dropbox where you are sent a link and give permission for Joplin to access your account. Setting up other services aps that do support pCloud such as rclone, and some Keepass apps, it looks exactly the same as Dropbox.

Currently Joplin doesn’t work with pCloud via webdav. It will authenticate and sync but it never finished the sync, so it get stuck in a “forever syncing loop”.

Proper token based support would be ideal however I would settle for a working webdav solution at this point.

pCloud WebDAV works with Joplin: https://github.com/laurent22/joplin/issues/2119#issuecomment-557540476

If it doesn’t work for you, there might be some error in the log that will tell you the issue.

Hi,

I struggled with it for 5 or 6 hours a few weeks ago and gave up. I would like to move away from Dropbox and pCloud seems like a more privacy respecting alternative so it would be a good match for Joplin. I successfully have moved all of my other syncing apps except Joplin because I couldn’t get it working. These other apps however offer the token based authentication I mentioned so I thought that may be part of the issue.

I looked at the link you provided, I have less than 1000 files so the large file issue reported in the link is probably not the issue for me.

The issue I was having is that it would sync but at the end it never stops syncing, I can’t cancel the sync either, have to kill it. It’s like it gets stuck. I could try it again and see what the log has to say.

I tried it again with a fresh data set. The sync gets stuck around half way. It looks like it retries twice then reports “Completed” but when I look at the Synchronization status, it still has around 1/2 the items still left to synchronize. Also the number of items that it reports it synchronized is different that the actual number of files on the remote host. It is out of sync.

019-11-27 23:33:04: “FetchError: network timeout at: https://webdav.pcloud.com/data/.resource/a7234273286b46d28fc76ea4aa5d1aa7
FetchError: network timeout at: https://webdav.pcloud.com/data/.resource/a7234273286b46d28fc76ea4aa5d1aa7
at /tmp/.mount_Joplin4ZLvJ3/resources/app/node_modules/node-fetch/index.js:126:13”
2019-11-27 23:33:04: "Operations completed: "
2019-11-27 23:33:04: “createRemote: 1102”
2019-11-27 23:33:04: “Total folders: 74”
2019-11-27 23:33:04: “Total notes: 749”
2019-11-27 23:33:04: “Total resources: 1182”
2019-11-27 23:38:05: “Running background sync on timer…”
2019-11-27 23:38:05: “Scheduling sync operation…”
2019-11-27 23:38:05: “Preparing scheduled sync”
2019-11-27 23:38:05: “Starting scheduled sync”
2019-11-27 23:40:35: “RevisionService::maintenance: Starting…”
2019-11-27 23:40:35: “RevisionService::maintenance: Service is enabled”
2019-11-27 23:40:36: “RevisionService::collectRevisions: Created revisions for 0 notes”
2019-11-27 23:40:36: “RevisionService::maintenance: Done in 1004ms”
2019-11-27 23:43:04: “Running background sync on timer…”
2019-11-27 23:43:04: “Scheduling sync operation…”
2019-11-27 23:43:04: “Preparing scheduled sync”
2019-11-27 23:43:04: “Starting scheduled sync”
2019-11-27 23:43:04: “Synchronisation is already in progress. State: in_progress”
2019-11-27 23:46:55: “FetchError: network timeout at: https://webdav.pcloud.com/data/.resource/a7234273286b46d28fc76ea4aa5d1aa7
FetchError: network timeout at: https://webdav.pcloud.com/data/.resource/a7234273286b46d28fc76ea4aa5d1aa7
at /tmp/.mount_Joplin4ZLvJ3/resources/app/node_modules/node-fetch/index.js:126:13”
2019-11-27 23:46:55: "Operations completed: "
2019-11-27 23:46:55: “createRemote: 1”
2019-11-27 23:46:55: “Total folders: 74”
2019-11-27 23:46:55: “Total notes: 749”
2019-11-27 23:46:55: “Total resources: 1182”

It I look at the Joplin folder on the remote, it has 1105 files.

From Joplin’s synchronization status page:

Sync status (synced items / total items)
Note: 749/749
Folder: 74/74
Resource: 278/1182
Tag: 0/3
NoteTag: 0/21
MasterKey: 0/1
Revision: 0/0
Total: 1101/2030

Conflicted: 0
To delete: 0

At this point Joplin it just reports: Created remote items: 1. and it forever syncs, it keeps repeating:

2019-11-28 00:19:39: "Scheduling sync operation..."
2019-11-28 00:19:39: "Preparing scheduled sync"
2019-11-28 00:19:39: "Starting scheduled sync"
2019-11-28 00:20:34: "RevisionService::maintenance: Starting..."
2019-11-28 00:20:34: "RevisionService::maintenance: Service is enabled"
2019-11-28 00:20:34: "RevisionService::collectRevisions: Created revisions for 0 notes"
2019-11-28 00:20:34: "RevisionService::maintenance: Done in 109ms"

over and over, stuck in a sync loop.

These are the same results results I have had with different tests. My previous tests were on Windows, this is on Debian Buster. I have also tried it on Fedora 30, same results. Dropbox is the only other remote I have tried and it works without issue.

Could you check this resource? https://webdav.pcloud.com/data/.resource/a7234273286b46d28fc76ea4aa5d1aa7 as it times out on it I wonder if it’s particularly big?

Hi Laurent,

Yes it is quite large, it is an .crypted file 51.1mb. I have read there is a 10mb attachment limit however I do not have any unencrypted attachments that are over 10mb. My largest non .crypted attachment is a .7z file- 9.8mb. The file is heavily compressed and encrypted. Is it possible the encryption algorithm can increase the size of a compressed file to larger than it was originally?

How can I recover from this? I can delete the note, deleted the attachment from the filesystem and delete the row from the resource table and tried to sync again, which one of these will work?

I should mention that I have synced this exact same dataset with dropbox many times and its alway synced without any error, is this file size limitation a limitation with webdav?

you should be able to fix it by deleting on the sync target:

  • .resource/a7234273286b46d28fc76ea4aa5d1aa7
  • a7234273286b46d28fc76ea4aa5d1aa7.md
    Then sync again.

Encryption makes the files larger but not 5 times larger so there might some other issue.

Okay, I deleted the file and it started syncing properly again. You suggested deleting the sync target, does this mean deleting the file on the remote or on the local? I deleted the local file and the local note and it started syncing. Several hundred more files have synced

Here is the next problem:

2019-11-28 12:31:56: “Synchronisation is already in progress. State: in_progress”
2019-11-28 12:34:22: "Error: PUT .resource/(…): Unknown error 2 (500):

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


Apache/2.4.10 (Debian) Server at webdav.pcloud.com Port 443

Code: 500
Error: PUT .resource/…: Unknown error 2 (500):

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


Apache/2.4.10 (Debian) Server at webdav.pcloud.com Port 443
at newError (/tmp/.mount_JoplinR0TvBu/resources/app/lib/WebDavApi.js:384:11)
at WebDavApi.exec (/tmp/.mount_JoplinR0TvBu/resources/app/lib/WebDavApi.js:414:10)
at process._tickCallback (internal/process/next_tick.js:68:7)"

2019-11-28 12:34:22: “Req 12:33:47: PROPFIND https://webdav.pcloud.com/Joplin/(...).md {“headers”:{“Depth”:0,“Authorization”:”********",“If-None-Match”:“JoplinIgnore-28618”,“Content-Length”:“190”},“body”:"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t\t\t<d:propfind xmlns:d=“DAV:”>\n\t\t\t\t<d:prop xmlns:oc="http://owncloud.org/ns">\n\t\t\t\t\t<d:getlastmodified/><d:resourcetype/>\n\t\t\t\t</d:prop>\n\t\t\t</d:propfind>",“timeout”:120000,“maxRetry”:0}"
2019-11-28 12:34:22: "Res 12:33:47:

404 Not Found

Not Found

The requested URL /Joplin/(...).md was not found on this server.


Apache/2.4.10 (Debian) Server at webdav.pcloud.com Port 443 " 2019-11-28 12:34:22: "Req 12:33:48: PUT https://webdav.pcloud.com/Joplin/.resource/(...) {"headers":{"Authorization":"********","If-None-Match":"JoplinIgnore-82650","Content-Length":"153741"},"path":"/home/resources/(...).crypted"}" 2019-11-28 12:34:22: "Res 12:33:48: " 2019-11-28 12:34:22: "Req 12:33:49: PUT https://webdav.pcloud.com/Joplin/(...).md {"headers":{"Authorization":"********","If-None-Match":"JoplinIgnore-50840","Content-Length":"973"},"body":"id: (...)\nmime: \nfilename: \ncreated_time: \nupdated_time: 2019-09-29T23:28:12.145Z\nuser_created_time: \nuser_updated_time: \nfile_extension: \nencryption_cipher_text: JED01000022014a42dfa6164a43409020bc6b16a4eb7e00029a{\"iv\":\"bUdKgMqVp0jykKvVfMi/9w==\",\"v\":1,\"iter\":1000,\"ks\":128,\"ts\":64,\"mode\":\"ocb2\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"lyTdgxKJ5RM=\",\"ct\":\"2WIoJikSKfPQjClwm6qFt7WeDvvIcVgcAjRWKpUEixt2TRbJ/acyWMyhWg4U2GbdAiGoSQJErJJ92o+sqok07j1EHZyQoHHwSlKcU8F5nJQv406tLfQTICV6VhRvLjifAXuRi1IvJh9n/Po0mHNSLcZyvGEifUvegroLgSscgbmRj8PXflRecn6ZvC98tBNvws+M2hzcVH05zDBs78LMiqf4tL16JN8V+jvEe35H+p8E9DMqN8dfAIEdsA5Z1plwqMh72L5lc4hEprG9I7iJdACqZafB2psvCPS/y7zO/+cKlkD04FsdgjDg0MGbkc92z2/hn+5ZczHyGH619HyWOnSIFuGS2d2l7D/JkawOMIfi0TO2rNeHIv0VXMKHxp99KVPMNrYuJOigN3s52mX15Adh3Cvav8w4rDpyZD0wfguGccixl9LZYfdy73/MC5ImPNjS/05HanXa4KT8lI4IDrUxf8hAgbKvzBKjPswLXXiWXkr7aYDugThqShremLGjz4nMc6yFaMXrkro=\"}\nencryption_applied: 1\nencryption_blob_encrypted: \nsize: \ntype_: 4","timeout":120000,"maxRetry":0}" 2019-11-28 12:34:22: "Res 12:33:49: " 2019-11-28 12:34:22: "Req 12:33:49: PROPFIND https://webdav.pcloud.com/Joplin/(...).md {"headers":{"Depth":0,"Authorization":"********","If-None-Match":"JoplinIgnore-34908","Content-Length":"190"},"body":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t","timeout":120000,"maxRetry":0}" 2019-11-28 12:34:22: "Res 12:33:49: 404 Not Found

Not Found

The requested URL /Joplin/(...).md was not found on this server.


Apache/2.4.10 (Debian) Server at webdav.pcloud.com Port 443 " 2019-11-28 12:34:22: "Req 12:33:50: PUT https://webdav.pcloud.com/Joplin/.resource/(...) {"headers":{"Authorization":"********","If-None-Match":"JoplinIgnore-53026","Content-Length":"75205"},"path":"/home/resources/(...).crypted"}" 2019-11-28 12:34:22: "Res 12:33:50: " 2019-11-28 12:34:22: "Req 12:33:50: PUT https://webdav.pcloud.com/Joplin/(...).md {"headers":{"Authorization":"********","If-None-Match":"JoplinIgnore-12889","Content-Length":"977"},"body":"id: (...)\nmime: \nfilename: \ncreated_time: \nupdated_time: 2019-09-29T19:51:41.884Z\nuser_created_time: \nuser_updated_time: \nfile_extension: \nencryption_cipher_text: JED01000022014a42dfa6164a43409020bc6b16a4eb7e00029e{\"iv\":\"N68hxKyMZ0JehSOzb1VrHA==\",\"v\":1,\"iter\":1000,\"ks\":128,\"ts\":64,\"mode\":\"ocb2\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"lyTdgxKJ5RM=\",\"ct\":\"M5KBTRGF+rxZrPQtF7buJ9R/ddFvMI7znp4iA3Deq/Wp3x0Fmp3AuEvMZtgmIRTq2i1mIcPbpH7b3vVxYY6YXRhKtvQ20H5Msg5eHbVRkoy9SpBplAKxfeqShKv7AhS+HDRmnO7LZnwRQhqxxGROsIcBUUaEjp0iOio1EAIO8ubWSRKQx7KTiuLSLFoQ8MoXRDjcsqFlwjEcGtA7yHqphUTba75bVvj7nPCn6KJELKPKgX6Y23jBXvVfgYLOdC6+EKIb5vuUMrp4ymrPCQtE4wVrEwaESJwpFxMDo9j8bHB/yTxYqzl3ugmoIvnnDfgylrNWrRcFJ2SsJWtuRNT7eRm93XKjbpPEcGLnUzmqhR81mFOQmIRzPOU7Hz+fUP0blaKyxRaV6YvRfmbqg//oXFoXdA/AFmke7nXCT2vF4P079XmgtonyXI1v04F2++QpHUf7rXf0kjPCuuaFZCszuE5BzV86HJFJ/YKgNFdS17vzuD3NgloUMg+eyz8NsP/5048c3YAfh1xKqamtHg==\"}\nencryption_applied: 1\nencryption_blob_encrypted: \nsize: \ntype_: 4","timeout":120000,"maxRetry":0}" 2019-11-28 12:34:22: "Res 12:33:50: " 2019-11-28 12:34:22: "Req 12:33:51: PROPFIND https://webdav.pcloud.com/Joplin/(...).md {"headers":{"Depth":0,"Authorization":"********","If-None-Match":"JoplinIgnore-23526","Content-Length":"190"},"body":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t","timeout":120000,"maxRetry":0}" 2019-11-28 12:34:22: "Res 12:33:51: 404 Not Found

Not Found

The requested URL /Joplin/(...).md was not found on this server.


Apache/2.4.10 (Debian) Server at webdav.pcloud.com Port 443 " 2019-11-28 12:34:22: "Req 12:33:53: PUT https://webdav.pcloud.com/Joplin/.resource/(...) {"headers":{"Authorization":"********","If-None-Match":"JoplinIgnore-6876","Content-Length":"1941865"},"path":"/home/resources/.crypted"}" 2019-11-28 12:34:22: "Res 12:33:53: 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


Apache/2.4.10 (Debian) Server at webdav.pcloud.com Port 443 " 2019-11-28 12:34:22: "Req 12:33:59: PUT https://webdav.pcloud.com/Joplin/.resource/(...) {"headers":{"Authorization":"********","If-None-Match":"JoplinIgnore-53702","Content-Length":"1941865"},"path":"/home/resources/(...).crypted"}" 2019-11-28 12:34:22: "Res 12:33:59: 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


Apache/2.4.10 (Debian) Server at webdav.pcloud.com Port 443 " 2019-11-28 12:34:22: "Req 12:34:09: PUT https://webdav.pcloud.com/Joplin/.resource/(...) {"headers":{"Authorization":"********","If-None-Match":"JoplinIgnore-39245","Content-Length":"1941865"},"path":"/home/resources/(...).crypted"}" 2019-11-28 12:34:22: "Res 12:34:09: 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


Apache/2.4.10 (Debian) Server at webdav.pcloud.com Port 443 " 2019-11-28 12:34:22: "Req 12:34:22: PUT https://webdav.pcloud.com/Joplin/.resource/(...) {"headers":{"Authorization":"********","If-None-Match":"JoplinIgnore-95050","Content-Length":"1941865"},"path":"/home/resources/.crypted"}" 2019-11-28 12:34:22: "Res 12:34:22: 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


Apache/2.4.10 (Debian) Server at webdav.pcloud.com Port 443 " 2019-11-28 12:34:22: "Operations completed: " 2019-11-28 12:34:22: "updateRemote: 1" 2019-11-28 12:34:22: "createRemote: 498" 2019-11-28 12:34:22: "Total folders: 74" 2019-11-28 12:34:22: "Total notes: 749" 2019-11-28 12:34:22: "Total resources: 1182" 2019-11-28 12:34:22: "There was some errors:" 2019-11-28 12:34:22: "Error: PUT .resource/(...): Unknown error 2 (500): 500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


Apache/2.4.10 (Debian) Server at webdav.pcloud.com Port 443

Code: 500
Error: PUT .resource/(…): Unknown error 2 (500):

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.


Apache/2.4.10 (Debian) Server at webdav.pcloud.com Port 443
at newError (/tmp/.mount_JoplinR0TvBu/resources/app/lib/WebDavApi.js:384:11)
at WebDavApi.exec (/tmp/.mount_JoplinR0TvBu/resources/app/lib/WebDavApi.js:414:10)
at process._tickCallback (internal/process/next_tick.js:68:7)"

I have redacted the filenames. I checked the filenames however and they are small jpg and pdf files, nothing over 100k.

After it finished, I deleted everything and started again from a fresh backup. I did this just in case that large file caused the issue. This time I removed the note and the large file before syncing. It syncs for a few hours then it stops and throws the errors again. Same errors but different files. I won’t repost the errors but I have them in a log if they would be helpful.

This is similar to what I saw when I tried to migrate to pcloud previous, I was never able to get joplin to successfully sync with pcloud.

Are these Joplin errors or pCloud errors? Is there anything further I can do to troubleshoot? I would really like to see Joplin working with pCloud.

There are like 10 pages of information so i don’t know for sure, but error 500 means “server error”, so a bug on pCloud side.