mirror of
https://github.com/BoostIO/BoostNote-App.git
synced 2026-04-26 21:05:55 +03:00
[GH-ISSUE #721] Cloud Sync of Attachments (images) fails #375
Labels
No labels
android 🤖
assigned to core 🦹
bug 🐛
documentation 📚
documentation 📚
duplicate 🚫
external issue 🔼
external issue 🔼
feature request 🌟
funded on issuehunt 💵
help wanted 🆘
improvement request 🔨
improvement request 🔨
ios 🍎
mobile 📱
needs investigation 🔬
needs more info ℹ️
needs specs 📐
plugin idea 🔌
plugin idea 🔌
poll 🗳️
pull-request
question ❓
rewarded on issuehunt 🎁
security issue 🔑
won’t fix ❌
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/BoostNote-App#375
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Komediruzecki on GitHub (Dec 14, 2020).
Original GitHub issue: https://github.com/BoostIO/BoostNote-App/issues/721
Current behavior
The syncing between the various OSes should be available for image attachments but is not.
Expected behavior
When I save attachment (image in this case) in boostnote.next and sync it to cloud, the synced attachment (image) should be retrieved in other synced locations. For example, on linux and windows.
Steps to reproduce
Some screenshot and logs:
Image saved on windows (don't show up in linux)

AWS pinpoint error:

LogPinpointOnWindows.txt
Error loading images from linux:
CannotSyncLogOnlyErr.txt
and it's full log:
CannotSyncLog.txt
Screenshot of the console (for the log above):
Images on Linux (don't show on Windows, see logs above):

Few other notes:
In general I think the conversion just don't work if there are attachments which cannot be read/loaded. So when I remove them, the conversion passes.
Let me know if any other info is needed, is this even a feature (syncing notes+attachements?)
Important
The attachments are correctly encoded saved and retrieved by
pouchDb.putAttachmentandpouchDb.getAttachmenton windows and linux. But saving attachment in windows and loading on Linux does not work, similarly for Linux -> Windows.This might be some cross-browser (or in this case chromium cross OS problem).
Tried:
Saving attachment as base64 encoded item, the attachment is retrieved on Windows as Blob and still have corrupted hash and data retrieved. This might be the case because of the "binary: true" while retrieving attachment on Windows executable, but I am not sure if this would fix the issue.
Environment
Desktop
Mobile
@Komediruzecki commented on GitHub (Dec 27, 2020):
Hi again,
So I investigated this issue further.
I downloaded attachment on windows and Linux, inspected hex content and I found:
EF BF BDare added (meaning data corruption) i.e. characters could not be encoded properlyThe logic and code seem fine, but I guess conversion fails at some point.
Here is the link to Unicode corrupted data replacement information on stack: https://stackoverflow.com/questions/47484039/java-charset-decode-issue-in-converting-string-to-hex-code
And quote:
"EF BF BD is UTF-8 for FFFD, which is the Unicode replacement character (used for data corruption, when characters cannot be converted to a certain code page)."
I am attaching both test files (win/lin) for further inspection.


Linux - correct data
Windows: corrupted data
@SinclairHudson commented on GitHub (Feb 10, 2021):
Also having this issue! A very similar setup. Syncing images that were added on windows don't show up in linux.
@Komediruzecki commented on GitHub (Mar 13, 2021):
Hi SinclairHudson,
Sorry for the long waiting,
I am watching the issue closely, and it seems to be true for the Electron cross-platform image rendering, I'll try to reproduce it in native windows build and see from there how we could fix this so we can finally easily sync images across platforms.
But of course, legacy cloud storage will not be supported anymore, so this sync issue won't exist.
@Rokt33r commented on GitHub (Aug 20, 2021):
Closed this since the legacy cloud space has been deprecated.