Open futurecad opened 5 months ago
Hi @futurecad!
I've just try it and managed to reproduce your issue. Not sure why, but it seems that universalJavaApplicationStub
script it's not being copied in Contents/MacOS
, just the auxiliary script startup
, used to run as administrator.
I'll try to figure out whats happening asap.
Thanks for taking your time posting this issue.
Ok, I've just found where's the bug:
Some time ago a new feature which let use a custom launcher script was introduced ... creating this side effect. As you can see here, the startup
script should be an extension, not an alternative to universalJavaApplicationScript
or the custom one.
Just released a SNAPHOT version to Maven Central: 1.7.6-20240330.174335-4
. Please, test it and give me some feedback.
Thanks!
You can take a look about how to use snapshot versions.
I used 1.7.6 - SNAPSHOT version and still have the same problem. After double-clicking the package to run and entering the password, there is still no prompt. macos version: 14.4.1 (23 E224)
I used 1.7.6 - SNAPSHOT version and still have the same problem. After double-clicking the package to run and entering the password, there is still no prompt. macos version: 14.4.1 (23 E224)
Ok, I'm not sure what's happening right now.
Please, could you try to run your app from the terminal using $ ./Your.app/Contents/MacOS/startup
and universalJavaApplicationStub
?
Also doesn't work. How can I show you the relevant logs?
Are you solving this problem now?
Hi @futurecad!
Yes, but I haven't found a solution yet. I'll tell you something if figure out what's happening.
You can find some logs in Console.app
Hi @futurecad!
Sorry, I can't figure out what's happening since this was working fine some time ago.
Let me know if you find a different way than calling osascript
to run something as admin on macOS.
I'll keep researching about this issue.
1.7.6 - SNAPSHOT Another problem
Null reference [template 'mac/startup.vtl', line 4, column 48]: $SCRIPTPATH cannot be resolved. [DEBUG] ResourceManager: found mac/Info.plist.vtl with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader [DEBUG] Null reference [template 'mac/Info.plist.vtl', line 47, column 33]: $APP_PACKAGE cannot be resolved.
I received printouts in my in-application logs but did not successfully start the gui interface.
The program can be started normally through startup, but it needs to be set - Djava.awt.headless=false \ Launched via app without any logs
The program can be started normally through startup, but it needs to be set - Djava.awt.headless=false Launched via app without any logs
Hi @futurecad! Did you find a solution?
The program can be started normally through startup, but it needs to be set - Djava.awt.headless=false Launched via app without any logs
Hi @futurecad! Did you find a solution?
not yet
Hi, i have same problem. I tried download "issue-398" branch in mavenLocal, but "javapackager" plugin in Gradle doesn`t work. Also i tried SNAPSHOT-1.7.6-20240330.174335-4, but i have same reaction on "isAdministratorRequired = true".
Can you load this in another SNAPSHOT please?
Hi @futurecad and @AridanWarlock! Sorry, but my availability has been very limited lately and I no longer have a Mac to be able to do tests.
Hi, i have same problem. I tried download "issue-398" branch in mavenLocal, but "javapackager" plugin in Gradle doesn`t work.
Do you mean it cannot be built? Which tool versions are you using?
Also i tried SNAPSHOT-1.7.6-20240330.174335-4, but i have same reaction on "isAdministratorRequired = true". Can you load this in another SNAPSHOT please?
I'm sorry, snapshot versions are not available forever, but just released a new one for this issue: 1.7.6-20240901.181942-1
The program can be started normally through startup, but it needs to be set - Djava.awt.headless=false Launched via app without any logs
I wonder if that the app finally starts with administrator privileges using -Djava.awt.headless=false
. If so, you can use vmArgs
property to set this argument at runtime by default.
Hi @fvarrui! I set new SNAPSHOT and add -Djava.awt.headless=false. Now I have both scripts created, but still "startup" immediately closes without waiting for the password to be entered.
Hi, @fvarrui! Any ideas what went wrong? What should I try to do?
Hi, @fvarrui! Any ideas what went wrong? What should I try to do?
Hi @futurecad! Do you know any way to call a script on MacOS as admin without using osascript?
Maybe it would be posible to create a native launcher (for x86 and/or aarch64) which asks for user credentials and runs universalJavaAplicationScript as admin?
@AridanWarlock @fvarrui I couldn't find a better startup solution, so I had to change the program to pop up the user password to temporarily circumvent this problem.
I'm submitting a…
Short description of the issue/suggestion:
Steps to reproduce the issue/enhancement:
What is the expected behavior? After turning on administrator Required, there is no response after entering the password when starting under mac.
What is the current behavior? Turn on administrator Required and then double-click the package program but it cannot run after entering the password.
Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?
What is the motivation / use case for changing the behavior? I need to start this app as administrator
Please tell us about your environment: macos14.4 jdk21 javapackager1.7.5
Other information (e.g. related issues, suggestions how to fix, links for us to have context)