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

download/unpacking seems to not work (on linux) #11

Closed
ensonic opened this issue May 18, 2018 · 12 comments
Closed

download/unpacking seems to not work (on linux) #11

ensonic opened this issue May 18, 2018 · 12 comments
Labels

Comments

@ensonic
Copy link
Contributor

ensonic commented May 18, 2018

I've created this example according to the docs on your README:
https://github.com/ensonic/pandomium-example

When running this on linux I get this output:

java -jar target/pandomium-example-1.0-SNAPSHOT-jar-with-dependencies.jar 
starting
[09:28:59.414][main/INFO ] Launching Pandomium 1.0.6
[09:28:59.417][main/INFO ] Progress: 0%
[09:28:59.418][main/INFO ] Progress: 5%
[09:28:59.418][main/INFO ] Progress: 10%
[09:28:59.938][main/INFO ] Starting to download -1 bytes of data
[09:28:59.938][main/INFO ] Downloading https://pandomium.panda-lang.org/download/native/1.0.4/linux64-native.tar.xz
[09:29:00.141][main/INFO ] Progress: 91%
[09:29:00.142][main/INFO ] Unzipping .xz archive
[09:29:00.152][main/INFO ] Progress: 95%
[09:29:00.153][main/INFO ] Unpacking .tar archive (it can take a while)
java.io.FileNotFoundException: /home/ensonic/projects/pandomium-example/native/locales/te.pak (No such file or directory)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
	at org.panda_lang.pandomium.util.ArchiveUtils.unpackTarArchiveEntry(ArchiveUtils.java:47)
	at org.panda_lang.pandomium.util.ArchiveUtils.unpackTar(ArchiveUtils.java:21)
	at org.panda_lang.pandomium.loader.PandomiumNativeLoader.loadNatives(PandomiumNativeLoader.java:50)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.load(PandomiumLoaderWorker.java:37)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.run(PandomiumLoaderWorker.java:27)
	at org.panda_lang.pandomium.loader.PandomiumLoader.load(PandomiumLoader.java:36)
	at org.panda_lang.pandomium.Pandomium.initialize(Pandomium.java:37)
	at org.buzztrax.jceff.App.main(App.java:26)
Exception in thread "main" java.lang.RuntimeException: Pandomium is not initialized
	at org.panda_lang.pandomium.Pandomium.createClient(Pandomium.java:42)
	at org.buzztrax.jceff.App.main(App.java:28)

When I check the 'native' directory, it is empty:

>ll native/
total 8
drwxr-xr-x 2 ensonic users 4096 May 18 09:28 ./
drwxr-xr-x 6 ensonic users 4096 May 18 09:28 ../

If I manually download and unpack:

cd native
wget https://pandomium.panda-lang.org/download/native/1.0.4/linux64-native.tar.xz
tar xJf linux64-native.tar.xz --strip 1

(please note that the download is also much slower than the above), it fails differenttly

java -jar target/pandomium-example-1.0-SNAPSHOT-jar-with-dependencies.jar 
starting
[13:30:11.038][main/INFO ] Launching Pandomium 1.0.6
[13:30:11.040][main/INFO ] Progress: 0%
java.nio.file.AccessDeniedException: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/icudtl.dat
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:84)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
	at sun.nio.fs.UnixFileSystemProvider.createSymbolicLink(UnixFileSystemProvider.java:457)
	at java.nio.file.Files.createSymbolicLink(Files.java:1043)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.load(PandomiumLoaderWorker.java:64)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.run(PandomiumLoaderWorker.java:27)
	at org.panda_lang.pandomium.loader.PandomiumLoader.load(PandomiumLoader.java:36)
	at org.panda_lang.pandomium.Pandomium.initialize(Pandomium.java:37)
	at org.buzztrax.jceff.App.main(App.java:26)
Exception in thread "main" java.lang.RuntimeException: Pandomium is not initialized
	at org.panda_lang.pandomium.Pandomium.createClient(Pandomium.java:42)
	at org.buzztrax.jceff.App.main(App.java:28)

Any ideas? Is it okay that the maven version is 1.0.6 while the binary linux64-native.tar.xz is 1.0.4 ?

@ensonic
Copy link
Contributor Author

ensonic commented May 18, 2018

Wrt the last issue, I've straced it:

32719 open("/home/ensonic/projects/pandomium-example/native/liblinuxenv.so", O_RDONLY) = 20
32719 open("/home/ensonic/projects/pandomium-example/native/liblinuxenv.so", O_RDONLY|O_CLOEXEC) = 20
32719 open("/usr/lib/jvm/java-8-openjdk-amd64/jre/bin", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 20
32719 symlink("/home/ensonic/projects/pandomium-example/native/icudtl.dat", "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/icudtl.dat") = -1 EACCES (Permission denied)

and that of course cannot work. What is this trying to achieve?

If I manually copy (3 files), it starts.

sudo cp native/icudtl.dat /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/
sudo cp native/natives_blob.bin /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/
sudo cp native/snapshot_blob.bin /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/

Seems to be similar issue like
cztomczak/cefpython#231
can we apply the same fix?

@dzikoysk
Copy link
Owner

dzikoysk commented May 18, 2018

I've just released 1.0.7 version, the first case should work now, the second rests on you. If I have a moment, I'll check cefpython solution

@ensonic
Copy link
Contributor Author

ensonic commented May 18, 2018

Thanks. Probably takes a bit for the release to be available: 'Failed to collect dependencies at org.panda-lang:pandomium:jar:1.0.7' (tried mvn clean install -U').
I'll keep trying and report if the checks help.
More logging would be nice, since the native dir is empty and it is hard to say, wheter somethign was wrong with the download, or with unpacking.

@dzikoysk
Copy link
Owner

Artifact should be available: https://repo.panda-lang.org/org/panda-lang/pandomium/1.0.7/pandomium-1.0.7.jar
You can also try to fork Pandomium and debug it inside

@ensonic
Copy link
Contributor Author

ensonic commented May 18, 2018

Thanks, still getting:

[ERROR] Failed to execute goal on project pandomium-example: Could not resolve dependencies for project org.buzztrax.jceff:pandomium-example:jar:1.0-SNAPSHOT: Failed to collect dependencies at org.panda-lang:pandomium:jar:1.0.7: Failed to read artifact descriptor for org.panda-lang:pandomium:jar:1.0.7: Could not find artifact org.panda-lang:pandomium-parent:pom:1.0.7 in panda-repo (https://repo.panda-lang.org/) -> [Help 1]

I'll try again later. Forking is easy, juts need to figure how to change my example to use it without having to create a maven repo. I can probably just copy the jar into the maven cache or some hack like this.

@dzikoysk
Copy link
Owner

Similar problem: #10

@ensonic
Copy link
Contributor Author

ensonic commented May 18, 2018

I manually downloaded the 1.0.7 and placed it into .m2/repository/org/panda-lang/pandomium/1.0.7/.
So here is new output:

[17:22:03.649][main/INFO ] Launching Pandomium 1.0.7
[17:22:03.651][main/INFO ] Progress: 0%
[17:22:03.652][main/INFO ] Progress: 5%
[17:22:03.653][main/INFO ] Progress: 10%
[17:22:04.046][main/INFO ] Starting to download -1 B of data
[17:22:04.046][main/INFO ] Downloading https://pandomium.panda-lang.org/download/native/1.0.4/linux64-native.tar.xz
[17:22:04.234][main/INFO ] Progress: 91%
[17:22:04.234][main/INFO ] Unzipping .xz archive
[17:22:04.244][main/INFO ] Progress: 95%
[17:22:04.244][main/INFO ] Unpacking .tar archive (it can take a while)
java.lang.IllegalStateException: Couldn't create parent directory for /home/ensonic/projects/pandomium-example/native/locales/te.pak.
	at org.panda_lang.pandomium.util.ArchiveUtils.unpackTarArchiveEntry(ArchiveUtils.java:47)
	at org.panda_lang.pandomium.util.ArchiveUtils.unpackTar(ArchiveUtils.java:20)
	at org.panda_lang.pandomium.loader.PandomiumNativeLoader.loadNatives(PandomiumNativeLoader.java:50)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.load(PandomiumLoaderWorker.java:34)
	at org.panda_lang.pandomium.loader.PandomiumLoaderWorker.run(PandomiumLoaderWorker.java:24)
	at org.panda_lang.pandomium.loader.PandomiumLoader.load(PandomiumLoader.java:36)
	at org.panda_lang.pandomium.Pandomium.initialize(Pandomium.java:37)

There is now an empty 'native/locales/' dir.

Since I've figure how to add debug logging and test it, I'll figure it out and let you know whats going on. Thanks for the help so far.

@ensonic
Copy link
Contributor Author

ensonic commented May 21, 2018

FYI:

[WARNING] The POM for org.panda_lang.pandomium-dependencies:universal:jar:1.0.0 is missing, no dependency information available
[WARNING] The POM for org.panda_lang.pandomium-dependencies:natives-windows-amd64:jar:1.0.0 is missing, no dependency information available
[WARNING] The POM for org.panda_lang.pandomium-dependencies:natives-macosx-universal:jar:1.0.0 is missing, no dependency information available
[WARNING] The POM for net.dzikoysk:linuxenv:jar:1.0.0 is missing, no dependency information available
Downloading: https://oss.sonatype.org/content/repositories/releases/org/panda_lang/pandomium-dependencies/universal/1.0.0/universal-1.0.0.jar
...
[ERROR] Failed to execute goal on project pandomium: Could not resolve dependencies for project org.panda-lang:pandomium:jar:1.0.7: The following artifacts could not be resolved: org.panda_lang.pandomium-dependencies:universal:jar:1.0.0, org.panda_lang.pandomium-dependencies:natives-windows-amd64:jar:1.0.0, org.panda_lang.pandomium-dependencies:natives-macosx-universal:jar:1.0.0, net.dzikoysk:linuxenv:jar:1.0.0: Could not find artifact org.panda_lang.pandomium-dependencies:universal:jar:1.0.0 in gdx-releases (https://oss.sonatype.org/content/repositories/releases/)

This breaks building Pandomium for me.

@dzikoysk
Copy link
Owner

obraz

Did you remove panda_lang directory (also net/dzikoysk)?

@ensonic
Copy link
Contributor Author

ensonic commented May 22, 2018

Good point, also removed that one, still fails, here is the full output https://gist.github.com/ensonic/66268842483854caae03e06fc710eb28

@ensonic
Copy link
Contributor Author

ensonic commented Jun 8, 2018

Fixed: I had both:

~/.m2/repository/org/panda_lang/
~/.m2/repository/org/panda-lang/

after removing the one with the underbar '_', it build. Maybe consider to unify the names?

@dzikoysk
Copy link
Owner

dzikoysk commented Jun 8, 2018

It should not be a problem, but I've just reinstalled all artifacts in repository (~ 2 days ago) and it could help. Anyway, panda_lang is abandoned groupId but it still exists in some older native artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants