zlatinb / muwire

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

Some suggestions on updates #157

Closed Searinox closed 2 years ago

Searinox commented 2 years ago

MuWire will search in the background for new versions and if it finds them, pops up a window about the update.

On a personal note, as part of professional activity I do considerable screen-sharing. Even if I'm doing everything on a remote machine and my real desktop isn't being seen, a front window pop-up is very disruptive and I may not want people mid-stream to see that nor is it their business what it is that I'm running on my personal setup.

I would suggest notifications via a change in tray icon and tray label, and an in-window link, maybe up near the menu bar, with an icon and text reporting that a new version is available, and clicking it would begin the update process.

Finally, a setting in the configuration to pick between Beta+Stable releases, or only Stable releases.

I have had to set the update check interval to an absurd number in order to avoid the checks.

zlatinb commented 2 years ago

Fair point, instead of just displaying the popup I can make a button appear somewhere on the main frame, most likely in the bottom (next to the "Edit Profile" button).

Making the beta-vs-stable channel configurable would be a bit messy right now; the way it currently works is if you're running a stable version you listen to that channel and vice versa and I'll probably leave it that way for a while.

zlatinb commented 2 years ago

Implemented the "Update" button, you can try it from this CI build but please do not close this issue until you verify that it works. I should have beta4 out some time this weekend.

Searinox commented 2 years ago

Okay. So what happens, does the button become enabled when an update is found?

zlatinb commented 2 years ago

If the user has enabled automatic downloading of updates the button gets enabled after the update is downloaded. Otherwise it gets enabled if the update server says that a new update is available, prompting the user to look for it.

Searinox commented 2 years ago

Had the absurdly high recheck interval removed. Still waiting. Did restart the app. Update button is still gray.

zlatinb commented 2 years ago

Close MuWire, open the MuWire.properties file and delete the line that starts with lastUpdateCheck=... then restart MuWire. It should check for updates within a few minutes.

Searinox commented 2 years ago

About to do that. Btw. Just as I was quitting MuWire:

org.h2.jdbc.JdbcSQLNonTransientException: The object is already closed [90007-200]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:505)
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:429)
    at org.h2.message.DbException.get(DbException.java:205)
    at org.h2.message.DbException.get(DbException.java:181)
    at org.h2.message.DbException.get(DbException.java:170)
    at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1511)
    at org.h2.jdbc.JdbcConnection.checkClosed(JdbcConnection.java:1490)
    at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:732)
    at com.muwire.core.hostcache.H2HostCache.purgeHopeless(H2HostCache.groovy:395)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
    at com.muwire.core.hostcache.H2HostCache$_load_closure8.doCall(H2HostCache.groovy:350)
    at com.muwire.core.hostcache.H2HostCache$_load_closure8.doCall(H2HostCache.groovy)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
    at TimerTask1_groovyProxy.run(Unknown Source)

Also, exception windows have the same problem that some other windows in the past had: the top left corner is what's centered on screen instead of the entire window.

Searinox commented 2 years ago

Still waiting but no updates. In muwire.properties the lastupdatecheck was recreated by the app and set to zero. It still hasn't been updated. Recheck interval is set to 1 hour. But it has been more than that now.

zlatinb commented 2 years ago

Let it run overnight if you can, by tomorrow it should have made at least one successful ping to the update server. I had some problems earlier myself and had to retry a few times.

The exception you pasted is harmless, I've committed some code to avoid it but haven't pushed to GH yet. Will do so before Monday.

I'll try to center the exception windows but they must also work during initialization when the main frame hasn't been created yet so it may be tricky.

Searinox commented 2 years ago

This morning the button is still grayed out. In muwire.properties lastupdatecheck is still 0.

Searinox commented 2 years ago

I should mention that the download update checkbox is unchecked. I have it set to only look for updates, not also download them. Before this had no problems showing me update pop-ups but now based on the lastupdatecheck variable, I have to conclude that it's not even looking for them. Is this because I'm not on a stand-alone exe build and running it through a java command line?

zlatinb commented 2 years ago

lastUpdateCheck will get written to disk only when either any of the configuration changes or when MuWire shuts down. Try changing some configuration property and click save; then see if the property has changed.

Having said that I do not see your node in the update server logs so either it didn't try to ping at all or the ping didn't reach it due to some I2P weirdness.

Searinox commented 2 years ago

All good now.