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

Can't build with latest code because of Java error #4737

Closed
caridley opened this issue Nov 21, 2022 · 4 comments · Fixed by #4794
Closed

Can't build with latest code because of Java error #4737

caridley opened this issue Nov 21, 2022 · 4 comments · Fixed by #4794
Assignees
Labels
status: archived Archived and locked; will not be updated type: docs Improvements or fixes to documentation
Milestone

Comments

@caridley
Copy link
Contributor

caridley commented Nov 21, 2022

Have you read the FAQ and checked for duplicate open issues?
yes

What version of Shaka Player are you using?
NA main branch commit c3ff8e5

Can you reproduce the issue with our latest release version?

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
NA

If custom app, can you reproduce the issue using our demo app?
NA

What browser and OS are you using?
NA

For embedded devices (smart TVs, etc.), what model and firmware version are you using?

What are the manifest and license server URIs?

NA

What configuration are you using? What is the output of player.getConfiguration()?

NA

What did you do?

Tried to build with the command python build/all.py

What did you expect to happen?

What actually happened?
Build failed with this error message

P2134253@CHTRMACP4H2J3 shaka-player % python build/all.py
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Generating Closure dependencies...
[INFO] Linting JavaScript...
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Linting CSS...
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Linting HTML...
[WARNING] No changes detected, skipping. Use --force to override.
[INFO] Checking that the build files are complete...
[INFO] Checking for common misspellings...
[INFO] Checking correct usage of eslint-disable...
[INFO] Checking the tests for type errors...
[WARNING] No changes detected, skipping. Use --force to override.
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/google/javascript/jscomp/CommandLineRunner has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
[ERROR] Build failed
P2134253@CHTRMACP4H2J3 shaka-player % java -version
java version "1.8.0_351"
Java(TM) SE Runtime Environment (build 1.8.0_351-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.351-b10, mixed mode)
P2134253@CHTRMACP4H2J3 shaka-player % node --version
v16.13.1
P2134253@CHTRMACP4H2J3 shaka-player % python --version
Python 3.10.5

I was able to work around the problem by reverting changes to the closure versions in package.json

-    "google-closure-compiler-java": "^20220301.0.0",
-    "google-closure-deps": "https://gitpkg.now.sh/google/closure-library/closure-deps?d7736da6",
-    "google-closure-library": "^20220301.0.0",
+    "google-closure-compiler-java": "^20221102.0.0",
+    "google-closure-deps": "^20221102.0.0",
+    "google-closure-library": "^20221102.0.0",

from this commit

fix(hls): Fix type error in lazy-loading (#4687)

There was a potential type error in an edge case in lib/player.js. It
would have been caught by the latest compiler, so this upgrades the
compiler and fixes another type error in one other place, as well.
Commit:
28b73b9 [28b73b9]
Parents:
7af357c
Author:
Joey Parrish [email protected]
Date:
November 11, 2022 at 8:07:58 AM MST
Committer:
GitHub [email protected]

This problem was observed on an M1 macbook running MacOS version 12.6

I am running the latest available Java version for MacOS

@caridley caridley added the type: bug Something isn't working correctly label Nov 21, 2022
@avelad
Copy link
Member

avelad commented Nov 21, 2022

Please upgrade to Java 11. Thanks!

@caridley
Copy link
Contributor Author

I am using the latest available version of java for Mac OS
Screen Shot 2022-11-21 at 12 57 20 PM

@github-actions github-actions bot added this to the v4.4 milestone Nov 21, 2022
@caridley
Copy link
Contributor Author

Ok.. didn't realize that we can no longer use use JRE installed by the OS. Thanks

@caridley
Copy link
Contributor Author

@avelad We should update the pre-requisites on this page https://shaka-player-demo.appspot.com/docs/api/tutorial-welcome.html

@joeyparrish joeyparrish reopened this Dec 6, 2022
@joeyparrish joeyparrish added type: docs Improvements or fixes to documentation and removed type: bug Something isn't working correctly labels Dec 6, 2022
@joeyparrish joeyparrish self-assigned this Dec 6, 2022
joeyparrish added a commit that referenced this issue Dec 8, 2022
We require node v14+ and Java v11+ now.

Closes #4721 
Closes #4737
joeyparrish added a commit that referenced this issue Dec 8, 2022
We require node v14+ and Java v11+ now.

Closes #4721 
Closes #4737
joeyparrish added a commit that referenced this issue Dec 8, 2022
We require node v14+ and Java v11+ now.

Closes #4721 
Closes #4737
joeyparrish added a commit that referenced this issue Dec 8, 2022
We require node v14+ and Java v11+ now.

Closes #4721 
Closes #4737
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Feb 4, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: docs Improvements or fixes to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants