Feature Requests

The MuWire file sharing application
User avatar
B0B
Posts: 51
Joined: 18 Mar 2020 11:48
Location: NL

Re: Feature Requests

Post by B0B »

Adding files to shared folders won't update the shared files list on my windows system.

edit:
After an update those become visible. I guess it requires a MuWire restart to re-read the folders.
zlatinb

Re: Feature Requests

Post by zlatinb »

B0B wrote: 25 Mar 2020 15:42 Adding files to shared folders won't update the shared files list on my windows system.
I couldn't reproduce this, but we can check whether the folders are "watched". If you have access to a linux system, copy the value of the "watchedDirectories" property from MuWire.properties, then execute

Code: Select all

base64 -di -
Then paste the long string and press Enter followed by Ctrl-D.

Alternatively try an online base64 decoder if you don't mind them being able to find out what folders you're sharing.

If the directory you're adding files to is present in this list, they should show up in the shared files tree & table after they are hashed. MuWire will not share zero-sized files or files greater than 128GB. If the files are not empty nor greater than 128GB and still don't get shared, then we'll need to do some more aggressive debugging.

Edit:
B0B wrote: 25 Mar 2020 15:42 After an update those become visible. I guess it requires a MuWire restart to re-read the folders.
No that definitely shouldn't be the case, they should show up right away with the latest few builds.
User avatar
B0B
Posts: 51
Joined: 18 Mar 2020 11:48
Location: NL

Re: Feature Requests

Post by B0B »

zlatinb wrote: 25 Mar 2020 15:41 but I would really like it if you registered at http://git.idk.i2p and opened PRs in future. That way of work is much more sustainable than patches on forums :)
Thanks for the quick fix. I noticed it works on "Tree" but not the "Table" view. Is this intentional?

Subscribe... I did, but I'm still waiting, and waiting, and waiting... for that confirmation mail.
zlatinb wrote: 25 Mar 2020 15:59 Alternatively try an online base64 decoder if you don't mind them being able to find out what folders you're sharing.
No linux right now. Tried online with multiple BASE64 converters and it looks like a "back-slash" issue. The first entry (MuWire download folder) is decoded to visible UTF-8 but anything after that is scrambled. All my shared files are on a NAS so I have paths like \\NAS3\MuWire-Download\ \\NAS3\Shares1\ \\NAS3\MoreShares\ etc...

This works when adding the folders but not when polled for changes as it seems. Could it be my file paths (which al start with back-slashes) are interpreted wrong by MuWire at polling-time? Looks like the BASE64 encoding does something right when adding a folder but wrong when polling for updates.
zlatinb wrote: 25 Mar 2020 15:59 If the files are not empty nor greater than 128GB and still don't get shared, then we'll need to do some more aggressive debugging.
I hope my "windows" findings are useful. I suspect this is somehow related to my initial issue: "unable to add mapped drive."
Let me know if there is more I can test for.
zlatinb

Re: Feature Requests

Post by zlatinb »

B0B wrote: 25 Mar 2020 16:26 Thanks for the quick fix. I noticed it works on "Tree" but not the "Table" view. Is this intentional?
No this is a bug due to me copy-pasting CSS without understanding the implications.
B0B wrote: 25 Mar 2020 16:26 Subscribe... I did, but I'm still waiting, and waiting, and waiting... for that confirmation mail.
That email won't arrive, but I'll bug idk to approve your account, which he does manually. I assume it's B0B?
B0B wrote: 25 Mar 2020 16:26 All my shared files are on a NAS so I have paths like \\NAS3\MuWire-Download\ \\NAS3\Shares1\ \\NAS3\MoreShares\ etc...

This works when adding the folders but not when polled for changes as it seems.
That's what I'm suspecting is happening. To verify, can you create a temp folder on a non-network drive (ideally C:), share it and try dropping some files in it? If MuWire doesn't pick them up then it's a general Windows issue, if it does then it's specific to the NAS.
User avatar
B0B
Posts: 51
Joined: 18 Mar 2020 11:48
Location: NL

Re: Feature Requests

Post by B0B »

zlatinb wrote: 25 Mar 2020 16:40 No this is a bug due to me copy-pasting CSS without understanding the implications.
"Table" may be in a "table wrapper"-like thingy.
zlatinb wrote: 25 Mar 2020 16:40 That email won't arrive, but I'll bug idk to approve your account, which he does manually. I assume it's B0B?
Won't arrive? Well, hows that for a waterproof system :-) But yeah, to keep it simple I did also go for "B0B" over there.
zlatinb wrote: 25 Mar 2020 16:40 To verify, can you create a temp folder on a non-network drive (ideally C:), share it and try dropping some files in it?
That works. Files placed in a D:\test\ folder were updated within seconds.

Also: if one un-shares all files within a folder (file by file, not folder itself) the folder itself is still being "watched", just not visible in MuWire. That means you can't un-share the folder itself unless you place a file in it first. Is that true?
And if one deletes a folder from the O.S, will MuWire also removes it from MuWire.properties ? Just curious.
zlatinb

Re: Feature Requests

Post by zlatinb »

B0B wrote: 25 Mar 2020 17:48
zlatinb wrote: 25 Mar 2020 16:40 To verify, can you create a temp folder on a non-network drive (ideally C:), share it and try dropping some files in it?
That works. Files placed in a D:\test\ folder were updated within seconds.
Ok so something is breaking at the NAS level. I'm tempted to point the finger at the JRE 13.

Can you go to /configlogging in the router console and enable logging at DEBUG level for the class "com.muwire.core.files.DirectoryWatcher". Then create a new temp folder on your NAS, add it to be shared with MuWire and try dropping and deleting files from that folder. Watch the i2p router logfile for lines containing:

"created entry .."
"modified entry ..."
"deleted entry...

Or for any errors and exceptions.

I realize I'm asking you to do quite a bit but this is a very strange situation and I'm 99% sure it's related to the original issue you posted of the NAS not being recognized.
zlatinb

Re: Feature Requests

Post by zlatinb »

B0B wrote: 25 Mar 2020 17:48 Also: if one un-shares all files within a folder (file by file, not folder itself) the folder itself is still being "watched", just not visible in MuWire. That means you can't un-share the folder itself unless you place a file in it first. Is that true?
That is true, but I figured such use case would be rare. I should probably add some method of managing watched folders from the UI.
B0B wrote: 25 Mar 2020 17:48 And if one deletes a folder from the O.S, will MuWire also removes it from MuWire.properties ? Just curious.
If you delete a folder that is inside another watched folder than yes. I haven't tested the scenario where a top-level shared folder is deleted, thanks for pointing it out!
User avatar
B0B
Posts: 51
Joined: 18 Mar 2020 11:48
Location: NL

Re: Feature Requests

Post by B0B »

zlatinb wrote: 25 Mar 2020 18:05 Can you go to /configlogging in the router console and enable logging at DEBUG level for the class "com.muwire.core.files.DirectoryWatcher".
That class doesn't exist. Closest (by name) is "com.muwire.core.files.PersisterFolderService".
User avatar
B0B
Posts: 51
Joined: 18 Mar 2020 11:48
Location: NL

Re: Feature Requests

Post by B0B »

zlatinb wrote: 25 Mar 2020 18:09 That is true, but I figured such use case would be rare. I should probably add some method of managing watched folders from the UI.
I agree it's rare but non impossible. Maybe also list the empty folders in MuWire so the ACTION button will be available.
zlatinb wrote: 25 Mar 2020 18:09 I haven't tested the scenario where a top-level shared folder is deleted, thanks for pointing it out!
I think above solution solves this as well.
zlatinb

Re: Feature Requests

Post by zlatinb »

B0B wrote: 25 Mar 2020 18:17
zlatinb wrote: 25 Mar 2020 18:05 Can you go to /configlogging in the router console and enable logging at DEBUG level for the class "com.muwire.core.files.DirectoryWatcher".
That class doesn't exist. Closest (by name) is "com.muwire.core.files.PersisterFolderService".
Ok this is also a problem but I'm not going to open that can of worms until I figure out what is happening with your NAS. I'm going to write a small java program that mimics what MuWire does to watch for filesystem changes and post it here.
Post Reply