OpenBazaar-Client
OpenBazaar-Client copied to clipboard
Create listing, Photo not always reloading from filesystem
When creating a listing, the Client is intermittently not re-reading the photo (PNG image, in this instance) file from the filesystem.
Operating System (OS and version): Ubuntu Linux 14.04 OpenBazaar version: 1.1.5 Hardware: Asus Laptop S400 dual core, (with encrypted filesystem) Reproducible: Almost Always
Steps to reproduce:
- Create files whitebox.png, blackbox.png.
- $ cp whitebox.png box.png
- $ eog & This launches the imageviewer tool. Open box.png (so we can prove that the filesystem has updated the file).
- In OB Client, Create a Listing.
- From shell, $ cp whitebox.png box.png
- In OB Client, click "Select photos" button and add box.png
- From shell, $ cp blackbox.png box.png
- Wait for imageviewer to automatically update, reflecting that the file contents changed.
- In OB Client, click "Select photos" button and add box.png
Observed Behavior: Even though the imageviewer showed a black box, OB Client added another white box.
Expected Behavior: Expected that the second photo added would have been the black box.
This was somewhat intermittent. If I repeat steps 5 and 6, or 7 through 9, I get the results I'm reporting at least once. e.g., maybe 33% of the time it loads a stale image (i.e., fails to re-load the file from the filesystem), so do the full procedure 5-9 twice and it is sure to happen. Eventually on subsequent attempt to Select photo (e.g., repeat step 9), with no changes at the filesystem, the OB client will start loading the fresh image.
It doesn't appear to be a certain duration or a certain number of reload attempts before correcting itself so I'm not even going to try to speculate as to what might cause this behavior. I didn't try testing with any other image format (e.g., JPG, SVG, etc.) Additionally, I tried where I would click the X to remove the current image displayed but it would still load a stale image, so it doesn't appear to be a reference count issue occurring only when the image is still loaded.
Additional info (links, images, etc go here): I've attached whitebox.png and blackbox.png for use in reproducing this issue.
I'm not able to reproduce this one. @jjeffryes @morebrownies Can either of you?
I can't reproduce this either. It's possible that when a file name was turned into a hash and saved locally that identical file names would pick up the old hash even though they were new images.
I think the latest image code refactor should have fixed that.
I've pulled the latest from the OB Client repository (master) from today and tried again and the problem persists for me.
Not sure why this would behave differently on my system. I didn't use the installer but instead installed first
$ sudo npm install electron-prebuilt
And then
$ npm install
$ npm start
Anyway, ... it's a very minor issue that resolves itself by simply repeating the same action (i.e., reload the same image another time or two and eventually it will show the right one.)
Thanks for taking a look.
Weird. I'll reopen this and see if we can get anyone else to reproduce it.
It could be a Linux issue, we haven't tried it yet on that. @SamPatt can you see if you can replicate this?
We haven't been able to reproduce this issue. @sgornick are you still experiencing this problem?
I have the same problem. Used completely different pictures, changed the size to small and very small... always the same problem. German to english translated message: "we cant upload your photo". I am using win10
Found out: Its the source or pathname of the file C:\Users\rbmil\OneDrive\Bilder#löschen\HiPr\IMG_0345.JPG - is not working C:\Users\rbmil\OneDrive\Bilder\IMG_0345.JPG - is working
Is this a case of Windows not recognizing the file page due to the German characters in it?
We rely on the OS to handle the path to the image, if it doesn't like the path then it would show an error.
Same problem with this path: C:\Users\rbmil\OneDrive\Bilder#loeschen\HiPr\IMG_0345.JPG but not with: C:\Users\rbmil\OneDrive\Bilder\löschen\HiPr\IMG_0345.JPG
Problem is "#" not "ö"
PS: github deletes the "" before "#"
Is that a bug in github webinterface, too?
Pound signs are a reserved character in Chromium. We'll look into it and see if there's a way we can get around that.
https://bugs.chromium.org/p/chromium/issues/detail?id=397838
Is OB based on chromium? Like i.e. brave browser?
The OB client uses Electron, which uses Chromium.