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

Update Internet Explorer 7.0 #642

Merged
merged 19 commits into from
Sep 22, 2018
Merged

Update Internet Explorer 7.0 #642

merged 19 commits into from
Sep 22, 2018

Conversation

Zemogiter
Copy link
Contributor

@Zemogiter Zemogiter commented May 29, 2018

No description provided.

@plata
Copy link
Collaborator

plata commented May 29, 2018

The diff looks strange somehow.

Attempting to fix trailing space error and tempFile not being defined anywhere.
Zemogiter added 2 commits May 30, 2018 19:04
Removed distribution() and architecture() parameters.
Fixes for the implementation of PhoenicisOrg#627
Zemogiter added 2 commits May 30, 2018 19:36
Removed .luna() and indentation fixes.
Another indentation fixes.
@plata
Copy link
Collaborator

plata commented May 30, 2018

Can you install it to see if it works?

@Zemogiter
Copy link
Contributor Author

It gives me this error regardless of repo priority (meaning that this error is likey not related to this script):

javax.script.ScriptException: TypeError: null has no such function "getMainMiniature" in <eval> at line number 18
	at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
	at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.phoenicis.scripts.nashorn.NashornEngine.eval(NashornEngine.java:50)
	at org.phoenicis.scripts.nashorn.NashornScriptInterpreter.runScript(NashornScriptInterpreter.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$runScript$0(BackgroundScriptInterpreter.java:35)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: <eval>:18 TypeError: null has no such function "getMainMiniature"
	at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
	at jdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkNull(NashornBottomLinker.java:180)
	at jdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:66)
	at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
	at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154)
	at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:253)
	at jdk.nashorn.internal.scripts.Script$Recompilation$816$585$\^eval\_.run(<eval>:18)
	at org.phoenicis.scripts.Installer$$NashornJavaAdapter.run(Unknown Source)
	at jdk.nashorn.internal.scripts.Script$791$\^eval\_.:program(<eval>:241)
	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
	... 10 more

@plata
Copy link
Collaborator

plata commented May 31, 2018

Try to replace l.13 by:

var application = appsManager.getApplication([TYPE_ID, CATEGORY_ID, APPLICATION_ID])

The script for IE6 has the same issue.

@Zemogiter
Copy link
Contributor Author

Now the script starts but right after clicking on "Next" it crashes with this error:

javax.script.ScriptException: TypeError: new Wine().wizard(setupWizard).version is not a function in <eval> at line number 22
	at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
	at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.phoenicis.scripts.nashorn.NashornEngine.eval(NashornEngine.java:50)
	at org.phoenicis.scripts.nashorn.NashornScriptInterpreter.runScript(NashornScriptInterpreter.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$runScript$0(BackgroundScriptInterpreter.java:35)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: <eval>:22 TypeError: new Wine().wizard(setupWizard).version is not a function
	at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
	at jdk.nashorn.internal.runtime.Undefined.lookup(Undefined.java:102)
	at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:106)
	at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:98)
	at jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176)
	at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
	at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154)
	at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:253)
	at jdk.nashorn.internal.scripts.Script$Recompilation$333$585$\^eval\_.run(<eval>:22)
	at org.phoenicis.scripts.Installer$$NashornJavaAdapter.run(Unknown Source)
	at jdk.nashorn.internal.scripts.Script$308$\^eval\_.:program(<eval>:241)
	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
	... 10 more

We might have to convert it from custom script to OnlineScript.

@plata
Copy link
Collaborator

plata commented Jun 4, 2018

This is happening because version, distribution and architecture must be given in the prefix() function:

var wine = new Wine()
    .wizard(setupWizard)
    .prefix("InternetExplorer7", "upstream", "x86", LATEST_STABLE_VERSION)
    .create();

wine.run("iexplore", ["-unregserver"], null, false, true);
wine.overrideDLL()
    .set("native,builtin", [
        "iexplore.exe", "itircl", "itss", "jscript", "mshtml", "msimtf", "shdoclc", "shdocvw", "shlwapi", "urlmon", "xmllite"
    ])
    .set("builtin", ["updspapi"])
    .do();

Specified parameters in .prefix
@Zemogiter
Copy link
Contributor Author

Ready for review but now throws up a diffirent error:

javax.script.ScriptException: TypeError: null has no such function "getMainMiniature" in <eval> at line number 18
	at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
	at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.phoenicis.scripts.nashorn.NashornEngine.eval(NashornEngine.java:50)
	at org.phoenicis.scripts.nashorn.NashornScriptInterpreter.runScript(NashornScriptInterpreter.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$runScript$0(BackgroundScriptInterpreter.java:35)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: <eval>:18 TypeError: null has no such function "getMainMiniature"
	at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
	at jdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkNull(NashornBottomLinker.java:180)
	at jdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:66)
	at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
	at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154)
	at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:253)
	at jdk.nashorn.internal.scripts.Script$Recompilation$605$585$\^eval\_.run(<eval>:18)
	at org.phoenicis.scripts.Installer$$NashornJavaAdapter.run(Unknown Source)
	at jdk.nashorn.internal.scripts.Script$580$\^eval\_.:program(<eval>:242)
	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
	... 10 more

@plata
Copy link
Collaborator

plata commented Jun 6, 2018

This should be fixed by

var application = appsManager.getApplication([TYPE_ID, CATEGORY_ID, APPLICATION_ID])

Did you revert that again?

@Zemogiter
Copy link
Contributor Author

Zemogiter commented Jun 6, 2018

I think I might accidentally do that. But with that change the script starts but it crashes with this:

javax.script.ScriptException: TypeError: new Wine().wizard(setupWizard).version is not a function in <eval> at line number 22
	at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
	at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.phoenicis.scripts.nashorn.NashornEngine.eval(NashornEngine.java:50)
	at org.phoenicis.scripts.nashorn.NashornScriptInterpreter.runScript(NashornScriptInterpreter.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$runScript$0(BackgroundScriptInterpreter.java:35)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: <eval>:22 TypeError: new Wine().wizard(setupWizard).version is not a function
	at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
	at jdk.nashorn.internal.runtime.Undefined.lookup(Undefined.java:102)
	at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:106)
	at jdk.nashorn.internal.runtime.linker.NashornLinker.getGuardedInvocation(NashornLinker.java:98)
	at jdk.internal.dynalink.support.CompositeTypeBasedGuardingDynamicLinker.getGuardedInvocation(CompositeTypeBasedGuardingDynamicLinker.java:176)
	at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
	at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154)
	at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:253)
	at jdk.nashorn.internal.scripts.Script$Recompilation$273$585$\^eval\_.run(<eval>:22)
	at org.phoenicis.scripts.Installer$$NashornJavaAdapter.run(Unknown Source)
	at jdk.nashorn.internal.scripts.Script$248$\^eval\_.:program(<eval>:242)
	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
	... 10 more

The local script for IE7 I'm using contains both var application = appsManager.getApplication([TYPE_ID, CATEGORY_ID, APPLICATION_ID]) and .prefix("InternetExplorer7", "upstream", "x86", LATEST_STABLE_VERSION). I also updated my local repo.

@plata
Copy link
Collaborator

plata commented Jun 7, 2018

You must remove

.version(LATEST_STABLE_VERSION)

The version is already specified in the prefix() call.

@Zemogiter
Copy link
Contributor Author

Did that now the script runs but once prefix is created the script crashes with this error despite the fact that this location exist

java.lang.RuntimeException: java.nio.file.NoSuchFileException: /home/jonasz/.Phoenicis/containers/wineprefix/InternetExplorer7/dosdevices/z:
	at org.phoenicis.scripts.Installer$$NashornJavaAdapter.run(Unknown Source)
	at jdk.nashorn.internal.scripts.Script$217$\^eval\_.:program(<eval>:241)
	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
	at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.phoenicis.scripts.nashorn.NashornEngine.eval(NashornEngine.java:50)
	at org.phoenicis.scripts.nashorn.NashornScriptInterpreter.runScript(NashornScriptInterpreter.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$runScript$0(BackgroundScriptInterpreter.java:35)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.nio.file.NoSuchFileException: /home/jonasz/.Phoenicis/containers/wineprefix/InternetExplorer7/dosdevices/z:
	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
	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.phoenicis.tools.files.FileUtilities.createSymbolicLink(FileUtilities.java:73)
	at jdk.nashorn.internal.scripts.Script$Recompilation$288$1960AA$\^eval\_.lns([utils, functions, filesystem, files]:76)
	at jdk.nashorn.internal.scripts.Script$Recompilation$290$251$\^eval\_.sandbox([engines, wine, verbs, sandbox]:16)
	at jdk.nashorn.internal.scripts.Script$Recompilation$242$585$\^eval\_.run(<eval>:22)
	... 16 more

@plata
Copy link
Collaborator

plata commented Jun 11, 2018

Can you figure out where exactly this happens? Otherwise I guess I'll have to try myself because I don't see this issue currently.

@Zemogiter
Copy link
Contributor Author

Zemogiter commented Jun 11, 2018

It happens randomly. I tried the script again just a moment ago and this time the error appears right after clicking on "Next" in the script introduction. Removing the wineprefix and trying again solves this error but shortly after IE language selection the script crashes with the following error:

java.lang.IllegalMonitorStateException
	at java.lang.Object.wait(Native Method)
	at java.lang.Object.wait(Object.java:502)
	at jdk.nashorn.internal.scripts.Script$Recompilation$196$585$\^eval\_.run(<eval>:202)
	at org.phoenicis.scripts.Installer$$NashornJavaAdapter.run(Unknown Source)
	at jdk.nashorn.internal.scripts.Script$171$\^eval\_.:program(<eval>:241)
	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
	at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.phoenicis.scripts.nashorn.NashornEngine.eval(NashornEngine.java:50)
	at org.phoenicis.scripts.nashorn.NashornScriptInterpreter.runScript(NashornScriptInterpreter.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$runScript$0(BackgroundScriptInterpreter.java:35)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

Strangely enough, this does not stop the IE instalation. However the IE installator shows an error that says "Internet Explorer 7 is not supported in this OS". I'm sending the phoenicis.log file
phoenicis.log

UPDATE: Today wine 3.10 was released and on the list of fixed bugs is
43509 Internet Explorer 11 installer fails, needs stub 'dism.exe'
Not sure if it helps our situation but I though it was worth mentioning.

@Zemogiter
Copy link
Contributor Author

Do we still need this PR? Cause I just tried to run it and got this error:

javax.script.ScriptException: TypeError: null has no such function "getMainMiniature" in <eval> at line number 19
	at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
	at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.phoenicis.scripts.nashorn.NashornEngine.eval(NashornEngine.java:50)
	at org.phoenicis.scripts.nashorn.NashornScriptInterpreter.runScript(NashornScriptInterpreter.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$runScript$0(BackgroundScriptInterpreter.java:35)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: <eval>:19 TypeError: null has no such function "getMainMiniature"
	at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
	at jdk.nashorn.internal.runtime.linker.NashornBottomLinker.linkNull(NashornBottomLinker.java:180)
	at jdk.nashorn.internal.runtime.linker.NashornBottomLinker.getGuardedInvocation(NashornBottomLinker.java:66)
	at jdk.internal.dynalink.support.CompositeGuardingDynamicLinker.getGuardedInvocation(CompositeGuardingDynamicLinker.java:124)
	at jdk.internal.dynalink.support.LinkerServicesImpl.getGuardedInvocation(LinkerServicesImpl.java:154)
	at jdk.internal.dynalink.DynamicLinker.relink(DynamicLinker.java:253)
	at jdk.nashorn.internal.scripts.Script$Recompilation$787$647$\^eval\_.run(<eval>:19)
	at org.phoenicis.scripts.Installer$$NashornJavaAdapter.run(Unknown Source)
	at jdk.nashorn.internal.scripts.Script$761$\^eval\_.:program(<eval>:243)
	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
	... 10 more

@plata
Copy link
Collaborator

plata commented Sep 6, 2018

If the script doesn't work, we should fix it. So yes.

I think

var application = appsManager.getApplication(["Applications", "Internet", "Internet Explorer 7.0"]);

should be

var application = appsManager.getApplication(["applications", "internet", "internet_explorer_7_0"]);

Changes the parameters in application var.
@Zemogiter
Copy link
Contributor Author

Zemogiter commented Sep 6, 2018

The latest version of the script gives me this error:

javax.script.ScriptException: TypeError: Cannot read property "version" from undefined in <eval> at line number 23
	at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
	at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
	at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
	at org.phoenicis.scripts.nashorn.NashornEngine.eval(NashornEngine.java:50)
	at org.phoenicis.scripts.nashorn.NashornScriptInterpreter.runScript(NashornScriptInterpreter.java:35)
	at org.phoenicis.scripts.interpreter.BackgroundScriptInterpreter.lambda$runScript$0(BackgroundScriptInterpreter.java:35)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Caused by: <eval>:23 TypeError: Cannot read property "version" from undefined
	at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:213)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:185)
	at jdk.nashorn.internal.runtime.ECMAErrors.typeError(ECMAErrors.java:172)
	at jdk.nashorn.internal.runtime.Undefined.get(Undefined.java:157)
	at jdk.nashorn.internal.scripts.Script$Recompilation$767$647$\^eval\_.run(<eval>:23)
	at org.phoenicis.scripts.Installer$$NashornJavaAdapter.run(Unknown Source)
	at jdk.nashorn.internal.scripts.Script$741$\^eval\_.:program(<eval>:244)
	at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
	at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
	at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
	at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
	... 10 more

Also the link in push description is wrong. This is the correct one:
https://phoenicisorg.github.io/scripts/Develop/script-js/#custom-script

@plata
Copy link
Collaborator

plata commented Sep 7, 2018

I've edited the script online. Not quite sure which link you're talking about. Can you provide a PR with the fix?

@Zemogiter
Copy link
Contributor Author

It happen when the script reaches this line:
wine.run(setupFile).wait();

@plata
Copy link
Collaborator

plata commented Sep 22, 2018

Ah ok. Try

wine.run(setupFile, [], null, false, true);
wine.wait();

@Zemogiter
Copy link
Contributor Author

That fixes the java.lang.IllegalMonitorStateException but it still says the service pack version is imcompatible. This is how I set the windows version and service pack version:

.windowsVersion("winxp", "sp2")

@plata
Copy link
Collaborator

plata commented Sep 22, 2018

I don't know. The syntax looks correct. Have you tried "sp3" or maybe "vista"?

@Zemogiter
Copy link
Contributor Author

I've tried winxp and sp3 same result. Just tried vista and it gave me the "system is not compatible" message.

@plata
Copy link
Collaborator

plata commented Sep 22, 2018

Mh. Did it set the Windows version correctly? Can you check in the registry?

@Zemogiter
Copy link
Contributor Author

Zemogiter commented Sep 22, 2018

I found this in user.reg:

[Software\\Wine] 1537610462
#time=1d4525b2b271466
"Version"="winxp"

Nothing about service pack

@plata
Copy link
Collaborator

plata commented Sep 22, 2018

Is it also there if you check with wine regedit (I want to see if the setting has really been applied).

@Zemogiter
Copy link
Contributor Author

Zemogiter commented Sep 22, 2018

Yes. No mention about service pack there also.

@plata
Copy link
Collaborator

plata commented Sep 22, 2018

Please upload the current state you have. Can you try if the winetricks installation works with Wine 3.0.2? If it does, we can use it as an example.

Changed wine version to 3.0.2 for testing
@plata
Copy link
Collaborator

plata commented Sep 22, 2018

I think I found something.

@Zemogiter
Copy link
Contributor Author

Zemogiter commented Sep 22, 2018

Switching to 3.0.2 didn't solve the issue. But I found something strange. In HKEY_LOCAL_HARDWARE/Software/Microsoft/Windows NT/Current Version I found a text values called CSDVersion, ProductName set to Service Pack 1 and Microsoft Windows 7 respectively.
There is a text value Version in HKEY_USERS/S-1-5-21-0-0-0-1000/Software/Wine set to winxp though and winecfg says the windows version is XP.

@plata
Copy link
Collaborator

plata commented Sep 22, 2018

Yes, we have a bug in the Windows version plugin. I'm fixing it right now.

@plata
Copy link
Collaborator

plata commented Sep 22, 2018

Pull request is online. Have a look if it helps.

@Zemogiter
Copy link
Contributor Author

Zemogiter commented Sep 22, 2018

I've applied your fix to my local repo and now I get different message:

Setup cannot continue because a more recent version of Internet Explorer have been found on this machine

I've removed the wineprefix but still getting this error.

@plata
Copy link
Collaborator

plata commented Sep 22, 2018

Add this before line 34:

// delete existing IE, otherwise installer will abort with "newer IE installed"
remove(wine.prefixDirectory() + "/drive_c/" + wine.programFiles() + "/Internet Explorer/iexplore.exe");

Attempting to fix the "newer version installed" error.
@Zemogiter
Copy link
Contributor Author

Did that, still getting the same error.

@plata
Copy link
Collaborator

plata commented Sep 22, 2018

Strange. I tried locally and it worked. I will upload what I have.

@Zemogiter
Copy link
Contributor Author

On appDB there is an entry form 2017 using wine 1.8.7 that says it works. I am going to try that wine version.

@plata
Copy link
Collaborator

plata commented Sep 22, 2018

Try the current state. It should run.

@Zemogiter
Copy link
Contributor Author

Thanks. The script no longer throws any errors and installation works. But when clicking on "Run" in "Library" tab, nothing happens.
phoenicis.log

@plata
Copy link
Collaborator

plata commented Sep 22, 2018

I don't know what the problem is but as the installation works, I will merge this so anyone who cares can provide a fix.

@plata plata merged commit 4d27a1e into PhoenicisOrg:master Sep 22, 2018
@Zemogiter Zemogiter deleted the patch-6 branch September 22, 2018 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants