Git Product home page Git Product logo

Comments (10)

deftdawg avatar deftdawg commented on July 25, 2024

This is the only version numbers that look odd to me, but they're present in the Linux version of the file as well.

$ curlie "https://phoenicis.playonlinux.com/index.php/wine?os=darwin" | grep version | sort -u
...
                "version": "1.4.rc4-xliveless-no_xinput2",
                "version": "1.4.rc6-xliveless-no_xinput2",
...

from scripts.

deftdawg avatar deftdawg commented on July 25, 2024

Here's where it actually chokes...

DEBUG --- a: 4.19 b: 3.0-rc3
DEBUG --- aVersionParts: 4.19,4.19,, bVersionParts: 3.0-rc3,3.0,,-rc3

from scripts.

deftdawg avatar deftdawg commented on July 25, 2024

Confirmed that Array.from is not defined with this...

        if (!Array.from) { 
            console.log('Array.from is not defined!');
        }

now to figure out where the JavaScript runtime is declared and why this would be missing...

from scripts.

deftdawg avatar deftdawg commented on July 25, 2024

hmmm... set these to see if I could get past the error:

        const aVersionNumbers = [0,0];
        const bVersionNumbers = [0,0];

It then crashes later on at this

TypeError: versionsJson.filter(...).flatMap is not a function

Also looking through the script, these look like they could break on mac/darwin too...

return getLatestVersion(wizard, "upstream-linux-" + architecture, /^\d+\.0(\.\d+)?$/);

return getLatestVersion(wizard, "upstream-linux-" + architecture, /^\d+\.\d+(\.\d+)?$/);

return getLatestVersion(wizard, "staging-linux-" + architecture, /^\d+\.\d+(\.\d+)?$/);

from scripts.

deftdawg avatar deftdawg commented on July 25, 2024

@plata Do you know what is determining the presence or absence of these missing Array.from() and Array.flatMap() functions?

I've been googling around trying to make a connection, best I can guess is graal js is using a different ecmascript-version or something... I don't really know what I'm looking at, I have no experience with JavaFX or using JS within a Java app...

Sorry to bug you, but I need a hint as to how I might proceed to fix this. Thx.

from scripts.

deftdawg avatar deftdawg commented on July 25, 2024

Pasting in this Array polyfill into the bottom of scripts/Engines/Wine/Engine/Versions/script.js I can get through the troubles with Array missing from and flatMap... Then can select my installer and wine from different streams and builds.

Then bomb out at createContainer:

[ERROR] org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.64) - TypeError: [object Array] is not iterable
	at <js> createContainer(Unnamed:349-362:12812-13432)
	at <js> prefix(Unnamed:79:2538-2603)
	at <js> go(Unnamed:92:3662-3751)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotObjectProxyHandler.invoke(PolyglotObjectProxyHandler.java:103)
	at com.sun.proxy.$Proxy67.go(Unknown Source)
	at [email protected]/org.phoenicis.javafx.components.application.skin.ApplicationInformationPanelSkin.lambda$installScript$7(ApplicationInformationPanelSkin.java:274)
	at [email protected]/org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
	at [email protected]/org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

somewhere in here:

createContainer(subCategory, version, containerName) {
const [distribution, , architecture] = subCategory.split("-");
const containerNameCleaned = containerName.replace(this._containerRegex, "");
const containerDirectory = this._winePrefixesDirectory + "/" + containerNameCleaned + "/";
mkdir(containerDirectory);
const containerConfiguration = configFactory.open(containerDirectory + "/phoenicis.cfg");
containerConfiguration.writeValue("wineVersion", version);
containerConfiguration.writeValue("wineDistribution", distribution);
containerConfiguration.writeValue("wineArchitecture", architecture);
}

from scripts.

deftdawg avatar deftdawg commented on July 25, 2024

Replaced all of the const [var1,,var2] = somestring.split(); like this one through out the file:

        // const [distribution, , architecture] = subCategory.split("-");
        const distribution = subCategory.split("-")[0]; 
        const architecture = subCategory.split("-")[2];

Now I can download the Wine tarball and explode it, on tried Wine-6.5 x86 that fails with Bad CPU type in executable, tried x86 on 64 with cx and 19.0.0, get prompted to install gecko, say yes, get prompted to install again, say no...

Finally, can select what version of windows to emulate... pick Win XP... then another crash.

[ERROR] org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.65) - TypeError: (intermediate value).entries is not a function
	at <js> go(Unnamed:62:2029-2061)
	at <js> :=>(Unnamed:38:1153-1233)
	at <js> go(Unnamed:96:3793-3827)
	at org.graalvm.truffle/com.oracle.truffle.polyglot.PolyglotObjectProxyHandler.invoke(PolyglotObjectProxyHandler.java:103)
	at com.sun.proxy.$Proxy67.go(Unknown Source)
	at [email protected]/org.phoenicis.javafx.components.application.skin.ApplicationInformationPanelSkin.lambda$installScript$7(ApplicationInformationPanelSkin.java:274)
	at [email protected]/org.phoenicis.scripts.session.PhoenicisInteractiveScriptSession.eval(PhoenicisInteractiveScriptSession.java:35)
	at [email protected]/org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$createInteractiveSession$1(BackgroundScriptInterpreter.java:45)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

from scripts.

plata avatar plata commented on July 25, 2024

It might make sense to rollback Graal to an older version (in https://github.com/PhoenicisOrg/phoenicis/blob/16143aed13e6f209f0ebd9567dc066e1b00c75d9/pom.xml#L58). After finding a working version, update until the breaking version is found. Then check in the Graal changelog for hints about the issue.

from scripts.

deftdawg avatar deftdawg commented on July 25, 2024

It might make sense to rollback Graal to an older version

Ah crap... YAll that hacking around... You're totally right!

Reapply your rollback to 21.0.0 commit and everything works with the default set of scripts:
PhoenicisOrg/phoenicis@46f8603

Wonder what graal did to change the default behaviour... I'll look into it.

from scripts.

deftdawg avatar deftdawg commented on July 25, 2024

21.1.0 and below are okay... There is mention in the changelog for 21.2.0 that nashorn compatibility changed to EMCAScript 5...

This explains why Array lost a bunch of methods and broke, this comment explains.

https://github.com/PhoenicisOrg/phoenicis/blob/0550391377e14c1cab49376052be5e434526f361/phoenicis-scripts/src/main/java/org/phoenicis/scripts/engine/ScriptEngineType.java#L15-L17

I tried commenting out nashorn-compat and adding "js.ecmascript-version", "2017", but I get errors like this starting up...

[ERROR] org.phoenicis.multithreading.ControlledThreadPoolExecutorService (l.65) - org.phoenicis.scripts.exceptions.ScriptException: org.graalvm.polyglot.PolyglotException: java.lang.NoSuchMethodError: jdk.vm.ci.meta.ResolvedJavaType.link()V
	at [email protected]/org.phoenicis.scripts.engine.injectors.EngineInjector.throwException(EngineInjector.java:23)
	at [email protected]/org.phoenicis.scripts.engine.implementation.PolyglotScriptEngine.handleError(PolyglotScriptEngine.java:96)
	at [email protected]/org.phoenicis.scripts.engine.implementation.PolyglotScriptEngine.eval(PolyglotScriptEngine.java:66)
	at [email protected]/org.phoenicis.scripts.engine.implementation.PolyglotScriptEngine.eval(PolyglotScriptEngine.java:55)
	at [email protected]/org.phoenicis.scripts.engine.injectors.ScriptUtilitiesInjector.injectInto(ScriptUtilitiesInjector.java:13)
	at [email protected]/org.phoenicis.scripts.engine.PhoenicisScriptEngineFactory.lambda$createEngine$0(PhoenicisScriptEngineFactory.java:38)
	at java.base/java.util.Arrays$ArrayList.forEach(Arrays.java:4390)
	at [email protected]/org.phoenicis.scripts.engine.PhoenicisScriptEngineFactory.createEngine(PhoenicisScriptEngineFactory.java:38)
	at [email protected]/org.phoenicis.engines.EngineSettingsManager.lambda$fetchAvailableEngineSettings$2(EngineSettingsManager.java:68)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.graalvm.polyglot.PolyglotException: java.lang.NoSuchMethodError: jdk.vm.ci.meta.ResolvedJavaType.link()V
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.GraalTruffleRuntime.resolveType(GraalTruffleRuntime.java:444)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.common.TruffleCompilerRuntime.resolveType(TruffleCompilerRuntime.java:387)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.compiler.phases.TruffleSafepointInsertionPhase.<init>(TruffleSafepointInsertionPhase.java:77)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.compiler.phases.TruffleCompilerPhases.register(TruffleCompilerPhases.java:48)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.compiler.TruffleTierConfiguration.<init>(TruffleTierConfiguration.java:51)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.compiler.TruffleTierConfiguration.<init>(TruffleTierConfiguration.java:42)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.compiler.hotspot.HotSpotTruffleCompilerImpl.create(HotSpotTruffleCompilerImpl.java:130)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.hotspot.java.HotSpotTruffleRuntime.newTruffleCompiler(HotSpotTruffleRuntime.java:67)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntime.initializeTruffleCompiler(AbstractHotSpotTruffleRuntime.java:298)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntime.access$200(AbstractHotSpotTruffleRuntime.java:87)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntime$1.accept(AbstractHotSpotTruffleRuntime.java:253)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.hotspot.AbstractHotSpotTruffleRuntime$1.accept(AbstractHotSpotTruffleRuntime.java:249)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.CompilationTask.call(CompilationTask.java:221)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.CompilationTask.call(CompilationTask.java:42)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
	at jdk.internal.vm.compiler/org.graalvm.compiler.truffle.runtime.BackgroundCompileQueue$TruffleCompilerThreadFactory$1.run(BackgroundCompileQueue.java:294)

For now I'll just stick to 21.1.0

from scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.