zlatinb / muwire

MuWire file sharing client for I2P
GNU General Public License v3.0
191 stars 27 forks source link

0.8.14-beta2 AppImage - java.lang.reflect.UndeclaredThrowableException ... *.hashlist (No such file or directory) #171

Closed slrslr closed 2 years ago

slrslr commented 2 years ago

Hi,

my Muwire message was not yet delivered, so i am submitting issue here.

Using 0.8.14-beta2 AppImage

This is what I have seen couple times a day, sometimes multiple times in a few minutes.

java.lang.reflect.UndeclaredThrowableException
    at jdk.proxy1/jdk.proxy1.$Proxy37.apply(Unknown Source)
    at java_util_function_Function$apply.call(Unknown Source)
    at com.muwire.core.files.HasherService.processFile(HasherService.groovy:136)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
    at com.muwire.core.files.HasherService$_throttle_closure4.doCall(HasherService.groovy:111)
    at com.muwire.core.files.HasherService$_throttle_closure4.doCall(HasherService.groovy)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
Caused by: java.io.FileNotFoundException: /home/me/.MuWire/files/somestring/vO-hu~somestring=.hashlist (No such file or directory)
    at com.muwire.core.files.PersisterFolderService.loadInfoHash(PersisterFolderService.groovy:386)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
    ... 7 more

Thank you

zlatinb commented 2 years ago

Hi, I've been afk for a few days and my MuWire node isn't running, that's why the message hasn't been delivered.

I'm not sure how this exception is possible but just in case I've committed some code to avoid throwing it. If you try the latest code from git you will notice that MuWire may start hashing some of your shared files again while it loads the library. That is intentional, it now checks whether a file on disk has been modified after it has been shared and if that's the case it will re-hash it.

slrslr commented 2 years ago

Hi, i have tried to clone into my local git repository (i did muwire git cloning exactly same way several times with success) :

git is already the newest version (1:2.30.2-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Updating f3686b7b..a8d9354b

then build. After maybe 30 minutes of runtime, i see:

java.lang.reflect.UndeclaredThrowableException
    at java_util_function_Function$apply$0.call(Unknown Source)
    at com.muwire.core.files.HasherService.processFile(HasherService.groovy:136)
    at jdk.internal.reflect.GeneratedMethodAccessor464.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at com.muwire.core.files.HasherService$_throttle_closure4.doCall(HasherService.groovy:111)
    at com.muwire.core.files.HasherService$_throttle_closure4.doCall(HasherService.groovy)
    at jdk.internal.reflect.GeneratedMethodAccessor462.invoke(Unknown Source)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Caused by: java.io.FileNotFoundException: /home/user/.MuWire/files/PBO~xs/rFm9KD4WbuPBQh4wdsCk7QwC1ZLFB-ag1BVLs=.hashlist (No such file or directory)
    at com.muwire.core.files.PersisterFolderService.loadInfoHash(PersisterFolderService.groovy:386)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    ... 8 more
zlatinb commented 2 years ago

The update didn't go well because the line numbers have changed in the last commit. Updating should be as simple as:

cd muwire
git pull

the latest commit is a8d9354bf8f106ce8252262b1576b30def20be97 and git log should show the latest commit from today.

slrslr commented 2 years ago

git pull

The result was not ideal, it was "discouraged", but i could delete local changes by "git stash" after that and then repeat "git pull" (with same discouraged message).

Then started muwire (./gradlew gui:run) and ran it for like 20 hours without seeing the exception again. Thank you. Maybe this issue can be closed..

zlatinb commented 2 years ago

Yes, this time it actually pulled the latest changes. Don't worry about the persisted.bak file, it was committed by accident and it is safe to remove it.

If you see a new button in the Library tab in the middle right with tooltip "Check for files that may be out of sync" then you're definitely running the latest code. If you want to see what it does you need to git pull again.

I'll close this issue now, feel free to re-open if necessary.