Feature Request: pCloud Synchronisation

Yeah, Joplin logs these errors but it also spits that wall of text into the little status window above the Sync button in the app.

So you suggesting that the pCloud webdav server is not working? Should I report the errors to them?

I just tried to run it again, started with a freshly restored db from a jex file and a newly generated pcloud account. I got the same error around the same time:

2019-11-30 19:29:17: "FetchError: response timeout at https://webdav.pcloud.com/Applications/Joplin/ over limit: 120000
FetchError: response timeout at https://webdav.pcloud.com/Applications/Joplin/ over limit: 120000
at /tmp/.mount_JoplinsXVknw/resources/app/node_modules/node-fetch/lib/body.js:117:12"
2019-11-30 19:29:17: "Req 19:12:25: MKCOL https://webdav.pcloud.com/Applications/Joplin/.resource/ {"headers":{"Authorization":"********","If-None-Match":"JoplinIgnore-59363","User-Agent":"Joplin/1.0"},"timeout":120000,"maxRetry":0}"
2019-11-30 19:29:17: "Res 19:12:25:

405 Method Not Allowed

Method Not Allowed

The requested method MKCOL is not allowed for the URL /Applications/Joplin/.resource/.


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

Error 405 Method Not Allowed:
What is the MKCOL method that Joplin is trying to call that is not allowed by the server?

Also what does 'over limit: 120000' mean. Is Joplin timeing our or is the the pcloud server?

The I see the error another 21 times in the log. Sometimes it reports a similar error only on a .lock:

019-11-30 19:55:54: "Req 19:47:33: MKCOL https://webdav.pcloud.com/Applications/Joplin/.lock/ {"headers":{"Authorization":"********","If-None-Match":"JoplinIgnore-45451","User-Agent":"Joplin/1.0"},"timeout":120000,"maxRetry":0}"
2019-11-30 19:55:54: "Res 19:47:33:

405 Method Not Allowed

Method Not Allowed

The requested method MKCOL is not allowed for the URL /Applications/Joplin/.lock/.

Is it getting locked up when trying to sync?

I compared the log file from the last test to this test *.md and the files that it complains about are all different so I don't think the issue is with the data. Could it be that Joplin's webdav settings are not compatible with the webdav server at pcloud?

Okay, so the sync finished, it reports complete however I wasn’t sure if it was successful. To test it, I created a new instance of Joplin and downloaded the whole data set from pCloud. Again Joplin gets stuck in a loop. Here is the log:

2019-11-30 21:02:43: “DecryptionWorker: error for: 1d3ef47fb59a419bae5f1f6dd8afdf74 (resources)”, “Error: json decode: this isn’t json!
Error: json decode: this isn’t json!
at EncryptionService.decrypt (/tmp/.mount_Jopling0SGb0/resources/app/lib/services/EncryptionService.js:316:11)
at EncryptionService.decryptAbstract_ (/tmp/.mount_Jopling0SGb0/resources/app/lib/services/EncryptionService.js:385:33)”, “{“id”:“1d3ef47fb59a419bae5f1f6dd8afdf74”,“title”:“LB Different Versions.ai”,“mime”:“application/postscript”,“filename”:”",“created_time”:1570121428132,“updated_time”:1570121428132,“user_created_time”:1570121428132,“user_updated_time”:1570121428132,“file_extension”:“ai”,“encryption_cipher_text”:"",“encryption_applied”:0,“encryption_blob_encrypted”:1,“size”:509166,“type_”:4}"
2019-11-30 21:02:43: “DecryptionWorker: error for: f9e7e97f7d5447748d55c10b1acb1f49 (resources)”, "Error: json decode: this isn’t json!

In the Joplin app, the UI gets stuck in a loop, switching between “Completed” and Decrypting every second. It never stops and just fills up the log with thousands of the same message.

I don't know, I'd need to try. But this:

It tells me that when something doesn't work pCloud sends whatever random page (probably html) instead of a proper error status code, and for that I wouldn't trust them with my data. Since it's popular I might check anyway at some point.

If I look at the first error log I reported, I saw something interesting. There was an owncloud message there:

019-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

Is this message coming from pcloud or from Joplin? If it is pcloud then does this mean that pcloud is running owncloud?

I have created a proper github bug report here: https://github.com/laurent22/joplin/issues/2136

Yes it would be really nice to see Joplin working with pcloud, it is nice to have more privacy respecting alternatives rather than the big US tech cloud providers.

@ioojoplin Please open an issue with pCloud instead.

Ask them why method not allowed pops up.
Ask them if they are running Owncloud.
Ask them why they send crap instead of a proper status error code in json format.
Send them the bug report you sent us and tell tem it works on other webdav servers.

Yes I will do that. Are we sure that it is pCloud’s webdav that is causing the issue? I can see similar errors were reported here: Bug? New IOS update fails to sync on WebDav connection where Joplin wasn’t sending someting to pcloud. Could there still be issues related to this?

I should also state that the request is for pCloud compatibility. I am using pCloud successfully with other web apps that have synchronization capabilities. rClone and Keepass2Android are two good examples. These apps are also hosted on github to the connection code may be available. These apps however do not use the webdav server, they instead get a token and sync with pCloud directly, the same way I can use Dropbox with Joplin now. Joplin on Dropbox is extremely reliable. Would it be possible to integrate Joplin with pCloud in the same way? It might be more reliable to sync this way rather than using webdav.

Adding a sync target for pCloud is most likely not going to happen. pCloud has WebDAV access and thus the sync target for WebDAV should work. If not, it is most likely a problem on the server side, which is why I asked you to take this up with them.
In fact we’ve already explained to you that something is off on the server side.
If you can use the WebDAV target with proper WebDAV servers and configurations, but not with pCloud or other server envs that don’t follow the RFCs or have bugs, the logical conclusion is that it is not Joplin’s fault.
The issue you referenced had to do with something else and was fixed (btw, a workaround for servers which were doing something they shouldn’t).

Fact is that Joplin has a WebDAV target that works. pCloud has WebDAV access. Fact is that pCloud does strange things when people use WebDAV to access it, so please get them to solve it.
I’m not sure why you’re hellbent on us fixiing their issues. I’m really sorry that my comment might sound harsh, but this pCloud topic came up several times already and people don’t seem to understand that it’s not Joplin’s fault.

Yes, as I have mentioned above I have opened up a support ticket with pCloud and I will report back what I find.

pCloud seems like a popular cloud service. I am investigating several other FOSS apps that do support it as a sync target. If several other Joplin users want to use pCloud then wouldn’t that make it a good candidate for a sync target?

I hear your argument that it should work but the fact it that it doesn’t work (at least for me). You mentioned that the topic came up several times, are there other users that you know of successfully syncing with pCloud?

Certainly, but it is additional code that has to be maintained. The point is that we already have a sync target that works with WebDAV. It just doesn't work with pCloud, because of some obscure reason on their side.
There are 2 options with pCloud:

  • webdav
  • direct (token type of authentication)

We already have webdav implemented, so why do you think we have to workaround their inability to correctly support webdav clients?

I think to remember that people got it working on pCloud. But all the latest reports indicate the opposite.

As soon as pCloud fixes their WebDAV, Joplin will work just great with pCloud. If your satellite radio doesn't work, because the satellite is broken, do you ask the radio manufacturer or the owner of the satellite to fix thie issue (given that they are not the same company)?

Yes your points make sense re: which system is broken and it appears we have logs to suggest which one it is. The end result however is that users can’t use pcloud to sync with Joplin.

What about speed? Aside from the inability of pCloud’s webdav server to sync properly with Joplin. Is WebDAV a generally a slower protocol than a direct token type of authentication?

I did some some speed tests and to sync my data set with Dropbox it takes around 3 hours. With the pcloud webdav server it takes around 5. I tested several times on different platforms. Even after the sync is finished, if I manually click on the Syncronize button, dropbox reports back in 3 seconds- Complete. In pCloud it takes 2m50s just to return a “Complete” message.

So I thought that Dropbox must be a faster service than pcloud but I don’t think this is the necessarily the case either. I have seen review articles which showed them to be similar or even that pcloud is faster because dropbox aggressively throttles uploads. If I compare syncing with rclone to dropbox and to pcloud the time to sync a data set it similar.

So the difference is the webdav server. I am not sure if webdav is slower than token based authentication in general or if pcloud’s webdav server in particular is slower.

So speed could be another reason to support token based authentication.

Can anybody find any documentation saying pCloud supports WebDAV officially? There is zero mention of it on pcloud.com that can be found using Google or the search feature. Just because there is a server responding on webdav.pcloud.com does not mean it is supported or even working. It is a fact that it is incompatible with two-factor authentication. Seems like someone just installed a vanilla Apache with a DAV module and forgot about it. If they are using Jackrabbit, then performance will be slow (which is exactly what people have been complaining about in other forums). In fact it would be better if pCloud dropped WebDAV support completely rather than a half-working, unsupported legacy option like it is today.

I’ve been using a combination of NValt (Mac) and Plaintext/Editorial (iOS) via Dropbox for years, and it has been working well. Recently Dropbox just shot themselves in the foot though by discontinuing Linux support with any security, as well as limiting the number of devices to 3 for the free version. Given that a lifetime pCloud sub cost the same as one year of Dropbox while offering better privacy and device support, the choice was easy. Finding a pCloud-supporting Markdown app is not.

Fact is, WebDAV is a horrible protocol, even though the spec might look good on paper. Every instance I’ve tested is either buggy or at least slow. On top of this, trying to add two-way synchronization often results in the same files being copied over and over again. I bought a QNAP NAS for running ownCloud, but it has proven impossible to use no matter what client OS or software I’m using. That’s why cloud APIs are necessary to get satisfactory performance. Joplin seems tempting with it’s multi-platform client support, but with only native provider support for Dropbox and Microsoft you’re gonna find the market rapidly dwindling.

WebDAV is a horrible protocol, but mainly because companies have no incentive to make it better, as they’d rather lock users into their proprietary (and often equally horrible) protocol.

However WebDAV is so far all we have and it can work well when implemented properly as it does for many Nextcloud, SeaFiles, Nginx or Apache users. There used to be a lot of bug reports about these servers but since the bugs have been fixed I haven’t heard anything other than misconfiguration issues.

Supporting all the proprietary APIs out of there is simply unrealistic, so we focus on the big ones - which are Dropbox and OneDrive. Google Drive too, but Google is too unstable a company to build anything long term around their APIs, so there’s no plan to support it.

1 Like

So to answer your question geira, I ended up speaking to pCloud support and they confirmed yes they have a webdav server however it is not officially supported. The support agent said that the errors I was seeing were due to a “file limit”. My data set is only around 2,000 files so not large at all. I adjusted the sync to 1 concurrent connection but I would never successfully sync to pCloud.

From the error I was seeing it looks like they installed an owncloud instance as their webdav server.

I too feel I am running out out of options. pCloud doesn’t work, box.com announced they are ending their webdav support. That really just leaves users with two options: self hosted (Nextcloud etc.) which is not an option for many or the big US tech firms which are the anthesis of the spirit of the Joplin project in terms of their tracking and privacy violating policies etc. It would be nice to have at least one privacy respecting platform option in Europe or Asia.

The open source rclone project is very outstanding in this regard, that is another excellent cloud project with native support for just about every platform there is which is a really nice security for the longevity of the project (look at all the platforms on their homepage: https://rclone.org/), I would love to see Joplin supporting all of those platforms natively one day.

There are also third party NC providers: https://nextcloud.com/providers/

I was able to get pcloud Webdav to work well first try. It just required me setting the uri to https://webdav.pcloud.com and then using my pcloud credentials. So nice.

Although, if you want to fill a specific folder, you will need to add its path to the end of the uri.

Mine for the sake of being consistent with what is used on OneDrive is:

https://webdav.pcloud.com/Apps/Joplin/

Hello,
I had similar problems with pCloud webdav synchronisation (> 3000 notes). Following your recommendations in this conversation, I contacted their hotline. Here is the final answer I got from them (sorry, it's in french, but I guess any online translator would help to understand if needed)

Nous n'avons pas notre propre implémentation de WebDav et nous utilisons simplement le module WebDav par défaut d'un serveur web (apache). Cela signifie que nous ne pouvons pas vraiment résoudre les problÚmes avec des logiciels tiers, soit ils fonctionnent, soit ils ne fonctionnent pas et nous ne pouvons malheureusement pas y faire grand chose de notre coté. Si vous pouvez vous connecter à webdav.pcloud.com avec un navigateur et accéder à vos fichiers, cela signifie que le service est opérationnel.

Nous avons regardé la documentation de Joplin, elle dit qu'il devrait fonctionner avec le module Apache WebDav que nous utilisons, donc c'est trÚs probablement une erreur de configuration du cÎté du client. Enfin, nous ne sommes pas censés résoudre les problÚmes avec des logiciels tiers si notre serveur WebDav est opérationnel et accessible. Si certains utilisateurs ont des problÚmes avec Joplin, le plus simple et efficace serait de demander l'aide de Joplin

So I gave up and migrated my Joplin online database from pCloud to DropBox :pensive:
And now, it works very good. Absolutely no sync problem anymore :ok_hand:

i got pretty much the same reply a month or 2 ago. their response to me was we think it should work ok, but if it doesn’t we can’t help you. but other than that, I love pCloud.

I will not reply to their answer, otherwise I will be very, very rude. Suffice it to say, those guys apparently have no idea what an RFC is nor why specifications exist.

To everyone who thinks pCloud is a good idea: Dont use it. They are unprofessional and it’s actually a miracle that they have stayed in business that long. (This was not rude, just a fact.)

Just because clients work around illegal responses doesn’t mean that it’s the client’s fault, if a request/response transaction does not work. Either way, I will excuse myself from this topic. No worries, I will never, ever post in this topic again.

1 Like