gowrite 3.0.23 on Macos won't create database

Reporting and discussion about bugs.

Moderator: lpaatero

Post Reply
kleftis
Posts: 10
Joined: Thu Oct 28, 2021 6:51 am

gowrite 3.0.23 on Macos won't create database

Post by kleftis »

I just installed gowrite 3.0.23 on MacOS, but it won't create a database or write new settings to the configuration file. Otherwise, the program seems to work.

Version 2.3 does create a database and record settings, so I've gone back to that version for now.

I also tried using the configuration file and a database created in 2.3 with 3.0.23, and it would read the configuration file but not the database.
kleftis
Posts: 10
Joined: Thu Oct 28, 2021 6:51 am

Re: gowrite 3.0.23 on Macos won't create database

Post by kleftis »

Made some progress on the database problem. The Info.plist file is messed up. I corrected the ClassPath, and I got the database stuff to work. But I notice that File|Open can't seem to read the directories either. Same problem with File|Save.

I have discovered, though, that the "other platforms" version will work when run from the commandline, so I'm using that now.
lpaatero
Go liiton hallitus
Posts: 528
Joined: Fri May 21, 2004 12:20 pm
Location: Finland

Re: gowrite 3.0.23 on Macos won't create database

Post by lpaatero »

Thans for report!
plist seemed to have broken list of JAR files. Next version fixes this.

Do you have any idea why File->Open and File->Save fail?
Could it be something problematic in plist?

/Lauri
kleftis
Posts: 10
Joined: Thu Oct 28, 2021 6:51 am

Re: gowrite 3.0.23 on Macos won't create database

Post by kleftis »

Actually, it's the Documents folder it can't read. MacOS Catalina has introduced security restrictions on apps accessing the Documents folder. Permission has to be given by the user by responding to a prompt from within the app. I don't get a prompt from GOWrite so I can't grant it permission. I'm not sure how you set an application up to do this.
lpaatero
Go liiton hallitus
Posts: 528
Joined: Fri May 21, 2004 12:20 pm
Location: Finland

Re: gowrite 3.0.23 on Macos won't create database

Post by lpaatero »

Is this a possible way to give the permissions?
https://support.apple.com/guide/mac-hel ... a35146/mac

/Lauri
kleftis
Posts: 10
Joined: Thu Oct 28, 2021 6:51 am

Re: gowrite 3.0.23 on Macos won't create database

Post by kleftis »

On Catalina, at least, you cannot add an application to the Documents access list through System Settings. It has to be a prompt from the application itself. (The plus sign is grayed out and inactive).

I also tried granting GOWrite full disk access through Settings (which is enabled), but that didn't work to give access to Documents, either. It's been a few versions of MacOS since I did any development for it, so I'm not sure what needs to happen to make an application trigger the prompt under Catalina.

If I run across any further information, I'll post again. But as I say, I can start it from the commandline, so I just do that for now, and that allows access to the Documents folder. It's a little inconvenient, but it works.
kleftis
Posts: 10
Joined: Thu Oct 28, 2021 6:51 am

Re: gowrite 3.0.23 on Macos won't create database

Post by kleftis »

Further on the access to Documents issue, this article (https://github.com/tofi86/universalJava ... /issues/85) suggests that the problem arises from using JFileChooser rather than FileDialog in a Java application that starts from a script version of universalJavaApplicationStub (as GOWrite does), rather than a compiled binary. Apparently, switching to using FileDialog in the Java app or starting it from a compiled binary stub solves the problem.

There is a compiled binary version of universalJavaApplicationStub at: https://github.com/tofi86/universalJava ... tag/v3.2.0. I swapped in the Mac 10.15 version (https://github.com/tofi86/universalJava ... -10.15.zip) in place of the script version in GO Write.app/Contents/MacOS/ and that triggers the prompt and allows access to Documents, etc. I have only tried this on Catalina, but so far this solves the problem for me. YMMV.
lpaatero
Go liiton hallitus
Posts: 528
Joined: Fri May 21, 2004 12:20 pm
Location: Finland

Re: gowrite 3.0.23 on Macos won't create database

Post by lpaatero »

Thank you a lot for digging this out!
I will release next version using compiled version.

/Lauri
lpaatero
Go liiton hallitus
Posts: 528
Joined: Fri May 21, 2004 12:20 pm
Location: Finland

Re: gowrite 3.0.23 on Macos won't create database

Post by lpaatero »

This change is now in 3.1.2

/Lauri
kleftis
Posts: 10
Joined: Thu Oct 28, 2021 6:51 am

Re: gowrite 3.0.23 on Macos won't create database

Post by kleftis »

Excellent! Thanks
kleftis
Posts: 10
Joined: Thu Oct 28, 2021 6:51 am

Re: gowrite 3.0.23 on Macos won't create database

Post by kleftis »

I just tried GOWrite 3.1.3 on my Macs. I have both a machine that's still stuck on High Sierra and one that's running Catalina.

The 3.1.3 version won't run on High Sierra. I presume that's because the binary stub is compiled for Catalina and above. When I get a chance, I will investigate whether there is a version of the binary stub that is backwards compatible with High Sierra. Version 3.0.23 (with the script-based stub) works on High Sierra, though, so I will continue to use that version on that machine for now.

The 3.1.3 version gives an error message on Catalina that it can't recognize your developer ID and thus won't run unless you grant permission for it to run in Settings|Security and Privacy|General (Allow apps from unidentified developers). Once I allowed apps from gowrite.net, it started up fine, prompted for access to Documents, etc. I'm guessing that something in Info.plist isn't matching up to your registered ID. I notice that the app name string has changed from "GOWrite 2" to "GOWrite". Not sure if that matters. I haven't had a chance to try anything more that starting up, but I will continue to try it out.

Will post again if I discover anything further.
lpaatero
Go liiton hallitus
Posts: 528
Joined: Fri May 21, 2004 12:20 pm
Location: Finland

Re: gowrite 3.0.23 on Macos won't create database

Post by lpaatero »

Thank you for update.
I will release 3.1.4 soon, I hope to make this stable release. There I change the name back to "GOWrite 2", if this would help with others.

/Lauri
kleftis
Posts: 10
Joined: Thu Oct 28, 2021 6:51 am

Re: gowrite 3.0.23 on Macos won't create database

Post by kleftis »

Just tried 3.1.5 on both High Sierra and Catalina.

The binary stub compiled for Catalina won't run on High Sierra, and there isn't a precompiled binary for High Sierra. So I swapped in the script-based stub from 3.0.23, and that works fine on High Sierra. I'll just do that for any new releases from now on. I suppose one could try to compile a binary version of the script using the instructions at https://github.com/tofi86/universalJavaApplicationStub, but I doubt it's worth the trouble since the script can just be swapped in by unfortunate users like me still stuck on High Sierra.

The binary stub shipped with 3.1.5 does work on Catalina. It prompts me to allow the application to run, and it prompts me to allow access to Documents and folders.

The database code works for both.

For what it's worth, the universalJavaApplicationStub project does offer a precompiled binary for Big Sur, but I don't have that (Big Sur) installed anywhere, so I can't try it. I don't know if the Catalina stub will work on Big Sur, although I'd guess it would. If not, your users can swap in the Big Sur binary into GOWrite/Contents/MacOS/. Sorry I can't try this for you.
Post Reply