Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Application cannot be opened." on macOS 15 #430

Closed
4 tasks
rememberber opened this issue Sep 14, 2024 · 18 comments
Closed
4 tasks

"Application cannot be opened." on macOS 15 #430

rememberber opened this issue Sep 14, 2024 · 18 comments
Labels
bug Something isn't working feedback Waiting for feedback

Comments

@rememberber
Copy link

I'm submitting a…

  • bug report
  • feature request
  • other

Short description of the issue/suggestion:

IMG_4811

Steps to reproduce the issue/enhancement:

  1. [First Step]
  2. [Second Step]
  3. [Other Steps...]

What is the expected behavior?

What is the current behavior?

Do you have outputs, screenshots, demos or samples which demonstrate the problem or enhancement?

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

  • JavaPackager version: 1.7.5
  • OS version:macOS 15
  • JDK version: 21
  • Build tool:
    • [yes] Maven
    • Gradle

Other information (e.g. related issues, suggestions how to fix, links for us to have context)

@fvarrui
Copy link
Collaborator

fvarrui commented Sep 14, 2024

Hi @rememberber!
Please, could you provide Maven output and plugin configuration?

@rememberber
Copy link
Author

Hi @rememberber! Please, could you provide Maven output and plugin configuration?

io.github.fvarrui javapackager 1.7.5 true com.luoboduner.moo.tool.App true
                <vmArgs>--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</vmArgs>
            </configuration>
            <executions>
               <execution>
                    <id>bundling-for-mac</id>
                    <phase>package</phase>
                    <goals>
                        <goal>package</goal>
                    </goals>
                    <configuration>
                        <platform>mac</platform>
                        <createTarball>true</createTarball>
                        <additionalModules>jdk.crypto.ec,jdk.charsets</additionalModules>
                        <additionalResources>
                            <additionalResource>${name}.l4j.ini</additionalResource>
                        </additionalResources>
                    </configuration>
                </execution>
            </executions>
        </plugin>

@rememberber
Copy link
Author

Hi @rememberber! Please, could you provide Maven output and plugin configuration?

It (the .app file)works well on macOS 14,but can not open the .app file on macOS 15(the newest macOS recent released by Apple)

@amariottini
Copy link

amariottini commented Sep 19, 2024

Same problem with my customers: after upgrading to MacOS 15 the app doesn't start anymore.

@fvarrui
Copy link
Collaborator

fvarrui commented Sep 19, 2024

Hi @rememberber and @amariottini!
Are you able to run your app from BASH executing your.app/Contents/MacOS/universalJavaApplicationStub on MacOS 15?
And, please, look into Console app and check if there's any error in logs

@fvarrui
Copy link
Collaborator

fvarrui commented Sep 19, 2024

Sorry, I can't test on MacOS as I don't have one anymore

@fvarrui
Copy link
Collaborator

fvarrui commented Sep 19, 2024

@rememberber, on your attached image, what does this message say? Could you translate it?

@fvarrui
Copy link
Collaborator

fvarrui commented Sep 19, 2024

Hi @rememberber! Please, could you provide Maven output and plugin configuration?

io.github.fvarrui javapackager 1.7.5 true com.luoboduner.moo.tool.App true

                <vmArgs>--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</vmArgs>
            </configuration>
            <executions>
               <execution>
                    <id>bundling-for-mac</id>
                    <phase>package</phase>
                    <goals>
                        <goal>package</goal>
                    </goals>
                    <configuration>
                        <platform>mac</platform>
                        <createTarball>true</createTarball>
                        <additionalModules>jdk.crypto.ec,jdk.charsets</additionalModules>
                        <additionalResources>
                            <additionalResource>${name}.l4j.ini</additionalResource>
                        </additionalResources>
                    </configuration>
                </execution>
            </executions>
        </plugin>

I can't see in your POM if you are bundling a JRE

@rememberber
Copy link
Author

Hi @rememberber! Please, could you provide Maven output and plugin configuration?

io.github.fvarrui javapackager 1.7.5 true com.luoboduner.moo.tool.App true

                <vmArgs>--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</vmArgs>
            </configuration>
            <executions>
               <execution>
                    <id>bundling-for-mac</id>
                    <phase>package</phase>
                    <goals>
                        <goal>package</goal>
                    </goals>
                    <configuration>
                        <platform>mac</platform>
                        <createTarball>true</createTarball>
                        <additionalModules>jdk.crypto.ec,jdk.charsets</additionalModules>
                        <additionalResources>
                            <additionalResource>${name}.l4j.ini</additionalResource>
                        </additionalResources>
                    </configuration>
                </execution>
            </executions>
        </plugin>

I can't see in your POM if you are bundling a JRE

<plugin>
                <groupId>io.github.fvarrui</groupId>
                <artifactId>javapackager</artifactId>
                <version>1.7.5</version>
                <configuration>
                    <bundleJre>true</bundleJre>
                    <mainClass>com.luoboduner.moo.tool.App</mainClass>
                    <generateInstaller>true</generateInstaller>
                    <vmArgs>--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED</vmArgs>
                </configuration>
                <executions>
                    <execution>
                        <id>bundling-for-mac</id>
                        <phase>package</phase>
                        <goals>
                            <goal>package</goal>
                        </goals>
                        <configuration>
                            <platform>mac</platform>
                            <createTarball>true</createTarball>
                            <additionalModules>jdk.crypto.ec,jdk.charsets</additionalModules>
                            <additionalResources>
                                <additionalResource>${name}.l4j.ini</additionalResource>
                            </additionalResources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

@rememberber
Copy link
Author

I tried "codesign --force --deep --sign ./universalJavaApplicationStub", got "error: The specified item could not be found in the keychain."

@rememberber
Copy link
Author

@rememberber, on your attached image, what does this message say? Could you translate it?

"The Application can't open"

@rememberber
Copy link
Author

Hi @rememberber and @amariottini!

Are you able to run your app from BASH executing your.app/Contents/MacOS/universalJavaApplicationStub on MacOS 15?

And, please, look into Console app and check if there's any error in logs


Last login: Thu Sep 19 23:32:08 on ttys000
zhoubo@zhoubodeMacBook-Pro ~ % /Users/zhoubo/Downloads/MooTool.app/Contents/MacOS/universalJavaApplicationStub ; exit;
zsh: killed

Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

@fvarrui fvarrui added the bug Something isn't working label Sep 19, 2024
@fvarrui
Copy link
Collaborator

fvarrui commented Sep 19, 2024

Please, can you try to build your app using macConfig.macStartup=ARM64 or UNIVERSAL to use a compiled version of universalJavaApplicationStub? Maybe there's a security issue related to MacOS 15 and BASH scripts

@nemqooo
Copy link

nemqooo commented Sep 19, 2024

I have had experienced the same issue, however, using the macStartup property with UNIVERSAL value resolved the issue. @fvarrui Thank you for the idea! Appreciate your help very much!

@fvarrui fvarrui added the feedback Waiting for feedback label Sep 19, 2024
@rememberber
Copy link
Author

Successfully resolved! (using the macStartup property with UNIVERSAL)
Thank you , Mr.Edge : )

@fvarrui
Copy link
Collaborator

fvarrui commented Sep 20, 2024

Maybe It would be a good idea to set UNIVERSAL as the default value for macStartup property

@amariottini
Copy link

Solved macStartup = UNIVERSAL but now I have another error, I'll open a new issue.

@fvarrui
Copy link
Collaborator

fvarrui commented Sep 23, 2024

I think we can close this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feedback Waiting for feedback
Projects
None yet
Development

No branches or pull requests

4 participants