-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2024-10-30 - Android Joplin Profiles NextCloud Issue #11292
Comments
I'm quoting a forum post that includes alternate reproduction steps:
Notes:
|
The problem occurs when different accounts are accessed on the same NextCloud instance. I have a Nextcloud instance since 2023 just for analysing this issue: If you are interested in this test environment, I can give you the access data for the two users A-User and B-User in a PM. |
My view of things - as of 2024-11-25 Joplin itself does not use cookies. On Android, Joplin brings in the case of NextCloud / WebDAV an external software component ‘underlying network library’ that still sets at least one cookie when starting - see statement here. NextCloud apparently also uses cookies, for example to enable Collabora to control the simultaneous editing of the same document by different accounts. To do this, the rights of a cookie owner and the rights of a WebDAV ID must somehow be logically linked. When Joplin is completely restarted on Android, e.g. after a reboot of Android, a new cookie is presumably set by the ‘underlying network library’. Suppose Joplin is completely restarted with the rights of user A. The cookie generated by the ‘underlying network library’ by default is linked by NextCloud to the rights of the A user. When Joplin is restarted after changing the Joplin profile – let's say to the B user profile – that software component will set no new cookie matching the rights of the newly selected B user ID. The cookie of the first A user remains. The rights of the A user's cookie do not match the rights of the B user in the file system. Therefore, an error occurs. If this theory is correct, it should perhaps be sufficient for Joplin on Android, although it does not use cookies itself, to use a command to delete all active cookies - see statement here. |
…ookies on Android Note: An alternative, as suggested on the linked issue, might be to allow users to manually delete all cookies (e.g. under advanced settings). This, however, is more complicated (may require either Android-specific native code or adding a library).
I've created a test APK with a possible fix. In this version, In reference to authentication, the Nextcloud documentation states (emphasis added):
Joplin includes an |
Operating system
Android
Joplin version
Joplin 3.0.8 (prod, android)
Desktop version info
No response
Current behaviour
Forked from https://discourse.joplinapp.org/t/2024-10-03-status-of-the-joplin-profiles-nextcloud-issue/41181/2?u=coffee
As has been known since September 2023, there is an issue between the Android app Joplin with multiple profiles and NextCloud.
There have already been several Discourse dialogues and #9283 about this.
Thanks to roman_r_m, it now seems clear how the problem can be solved in the code of the Android Joplin app.
https://discourse.joplinapp.org/t/nextcloud-sync-fails-on-all-but-the-default-profile/38515/18
https://discourse.joplinapp.org/t/nextcloud-sync-fails-on-all-but-the-default-profile/38515/30
Expected behaviour
Both profiles (A-user and B-user) can be easily connected to the same Joplin Android app. Switching between the profiles is possible without any problems.
Logs
No response
The text was updated successfully, but these errors were encountered: