syd711 / vpin-studio

Competition, table, and player management for VPins.
MIT License
34 stars 2 forks source link

update of macOS client always fails #386

Closed gorgatron1 closed 3 weeks ago

gorgatron1 commented 3 months ago

Describe the bug macOS client is unable to update itself

To Reproduce

I run my client on macOS like this:

(base) [dkoski@dkoski-14 VPin-Studio-Client-macosx_aarch64 ]$ sh VPin-Studio-macosx_aarch64.sh

I have updated client & server many times: the server updated via the clicked button in the UI and I always downloaded the new client from GitHub. This time I noticed in the logs that it looks like it was supposed to update the client as well, but I found that it actually did not:

19-08 19:59:36.086 INFO  [JavaFX Application Thread] d.m.v.u.UpdateDialogController - Updater resolved OS name 'Mac OS X'
19-08 19:59:36.089 INFO  [Thread-48] d.m.v.c.u.Updater - Downloading https://github.com/syd711/vpin-studio/releases/download/3.2.0/vpin-studio-ui-jar.zip
19-08 19:59:37.089 INFO  [Thread-47] d.m.v.c.u.Updater - /Users/dkoski/pinball/VPin-Studio-Client-macosx_aarch64/./vpin-studio-ui-jar.zip.bak download at 1%
19-08 19:59:37.090 INFO  [Thread-47] d.m.v.u.UpdateDialogController - Client Update Download: 1
19-08 19:59:38.092 INFO  [Thread-47] d.m.v.c.u.Updater - /Users/dkoski/pinball/VPin-Studio-Client-macosx_aarch64/./vpin-studio-ui-jar.zip.bak download at 20%
19-08 19:59:38.092 INFO  [Thread-47] d.m.v.u.UpdateDialogController - Client Update Download: 20
19-08 19:59:39.095 INFO  [Thread-47] d.m.v.c.u.Updater - /Users/dkoski/pinball/VPin-Studio-Client-macosx_aarch64/./vpin-studio-ui-jar.zip.bak download at 39%
19-08 19:59:39.095 INFO  [Thread-47] d.m.v.u.UpdateDialogController - Client Update Download: 39
19-08 19:59:40.096 INFO  [Thread-47] d.m.v.c.u.Updater - /Users/dkoski/pinball/VPin-Studio-Client-macosx_aarch64/./vpin-studio-ui-jar.zip.bak download at 75%
19-08 19:59:40.096 INFO  [Thread-47] d.m.v.u.UpdateDialogController - Client Update Download: 75
19-08 19:59:40.839 INFO  [Thread-48] d.m.v.c.u.Updater - Downloaded file /Users/dkoski/pinball/VPin-Studio-Client-macosx_aarch64/./vpin-studio-ui-jar.zip
19-08 19:59:41.097 INFO  [Thread-47] d.m.v.u.UpdateDialogController - Client Update Download: 100
19-08 19:59:44.109 INFO  [Thread-47] d.m.v.c.u.Updater - Written temporary bash: #!/bin/bash
sleep 4
unzip -o vpin-studio-ui-jar.zip
rm vpin-studio-ui-jar.zip
./VPin-Studio.sh &
19-08 19:59:44.110 INFO  [Thread-47] d.m.v.c.u.Updater - Applied execute permissions to : /Users/dkoski/pinball/VPin-Studio-Client-macosx_aarch64/./update-client.sh
19-08 19:59:44.114 INFO  [Thread-50] d.m.v.c.u.Updater - Exiting Studio

(base) [dkoski@dkoski-14 VPin-Studio-Client-macosx_aarch64 ]$ sh update-client.sh 
unzip:  cannot find or open vpin-studio-ui-jar.zip, vpin-studio-ui-jar.zip.zip or vpin-studio-ui-jar.zip.ZIP.
rm: vpin-studio-ui-jar.zip: No such file or directory
update-client.sh: line 5: ./VPin-Studio.sh: No such file or directory

Sure enough, there is no vpin-studio-ui-jar.zip anywhere that I can see (despite the logs indicating that it was downloaded to /Users/dkoski/pinball/VPin-Studio-Client-macosx_aarch64/./vpin-studio-ui-jar.zip, which is the current directory where the client runs).

I manually copy over the contents of the zip that I download and that does work fine.

Expected behavior

Expected:

Screenshots

No, but see logs above.

Desktop (please complete the following information):

java --version
openjdk 19.0.2 2023-01-17
OpenJDK Runtime Environment Zulu19.32+13-CA (build 19.0.2+7)
OpenJDK 64-Bit Server VM Zulu19.32+13-CA (build 19.0.2+7, mixed mode, sharing)

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

karlsnyder0 commented 3 months ago

I have MacOS and will be happy to investigate this issue. Thank you so much for the thorough reporting of this issue.

syd711 commented 1 month ago

Fixed with 3.9.0

syd711 commented 3 weeks ago

gorgatron — Today at 10:52 PM something still isn't quite right with the client update on macOS -- it seems to download and restart but it goes back to a 3.9.0 client. the scripts are updated (the timestamp is right now) but the jar is not:

(base) [dkoski@dkoski-14 VPin-Studio-Client-macosx_aarch64 ]$ ls -lrt total 370472 drwxr-xr-x 4 dkoski staff 128 May 30 20:33 config drwxr-xr-x 3 dkoski staff 96 Aug 24 15:39 C: drwxr-xr-x@ 14 dkoski staff 448 Oct 6 15:31 zulu11.72.19-ca-fx-jre11.0.23-macosx_aarch64 -rw-rw-r--@ 1 dkoski staff 75709212 Oct 31 13:07 zulu11.72.19-ca-fx-jre11.0.23-macosx_aarch64.tar.gz -rw-rw-r--@ 1 dkoski staff 111931660 Oct 31 13:07 vpin-studio-ui.jar -rw-rw-r--@ 1 dkoski staff 233 Oct 31 13:07 installation.txt -rw-r--r-- 1 dkoski staff 573536 Oct 31 22:59 vpin-studio-ui.2024-10-31.log -rw-r--r-- 1 dkoski staff 673087 Nov 1 23:40 vpin-studio-ui.2024-11-01.log drwxr-xr-x@ 5 dkoski staff 160 Nov 2 15:51 resources -rw-r--r-- 1 dkoski staff 724728 Nov 2 22:28 vpin-studio-ui.2024-11-02.log -rwx------ 1 dkoski staff 109 Nov 3 13:48 update-client.sh -rwx------ 1 dkoski staff 246 Nov 3 13:48 VPin-Studio-macosx_aarch64.sh -rw-r--r-- 1 dkoski staff 42111 Nov 3 13:49 vpin-studio-ui.log


[vpin-studio-ui.log](https://github.com/user-attachments/files/17612223/vpin-studio-ui.log)
karlsnyder0 commented 3 weeks ago

Was this from 3.9.0 to 3.9.1 or from a previous version to 3.9.1?

You will need to manually update first, then try the auto-update with the next release. The new code needed for the update is not in previous releases.

davidkoski commented 3 weeks ago

3.9.0 -> 3.9.1