Playscape Publishing Kit. Failed to apply patch to the .jar file - unity3d

Unable to build the project with Playscape Publishing Kit v1.11 on a Mac.
An error occured while applying post-build logic: failed to apply patch to the .jar file
log file https://www.dropbox.com/s/plz5aneqgbj4mf7/log_jar.txt?dl=0
Bugs for exceptions thrown have titles File:line from the top stack,
e.g., "SomeFile.java:243"
If you don't find the exception below in a bug, please add a new bug
at http://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
To make the bug a priority, please include a test program
that can reproduce this exception.
org.aspectj.weaver.MissingResolvedTypeWithKnownSignature cannot be cast to org.aspectj.weaver.ReferenceType
when weaving type com.startapp.android.publish.h.b$4
when weaving classes
when weaving
when batch building BuildConfig[null] #Files=0 AopXmls=#0
org.aspectj.weaver.MissingResolvedTypeWithKnownSignature cannot be cast to org.aspectj.weaver.ReferenceType
java.lang.ClassCastException: org.aspectj.weaver.MissingResolvedTypeWithKnownSignature cannot be cast to org.aspectj.weaver.ReferenceType
at org.aspectj.weaver.BoundedReferenceType.parameterize(BoundedReferenceType.java:113)
at org.aspectj.weaver.ResolvedType.parameterize(ResolvedType.java:2489)
at org.aspectj.weaver.ResolvedMemberImpl.parameterize(ResolvedMemberImpl.java:897)
at org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(ResolvedMemberImpl.java:794)
at org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(ResolvedMemberImpl.java:742)
at org.aspectj.weaver.ReferenceType.getDeclaredMethods(ReferenceType.java:859)
at org.aspectj.weaver.ResolvedType$MethodGetterIncludingItds.get(ResolvedType.java:252)
at org.aspectj.weaver.ResolvedType$MethodGetterIncludingItds.get(ResolvedType.java:250)
at org.aspectj.weaver.Iterators$4$1.hasNext(Iterators.java:213)
at org.aspectj.weaver.Iterators$4.hasNext(Iterators.java:230)
at org.aspectj.weaver.ResolvedType.lookupResolvedMember(ResolvedType.java:619)
at org.aspectj.weaver.JoinPointSignatureIterator.findSignaturesFromSupertypes(JoinPointSignatureIterator.java:192)
at org.aspectj.weaver.JoinPointSignatureIterator.hasNext(JoinPointSignatureIterator.java:68)
at org.aspectj.weaver.patterns.SignaturePattern.matches(SignaturePattern.java:317)
at org.aspectj.weaver.patterns.KindedPointcut.matchInternal(KindedPointcut.java:197)
at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:137)
at org.aspectj.weaver.patterns.NotPointcut.matchInternal(NotPointcut.java:56)
at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:137)
at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:56)
at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:137)
at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:56)
at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:137)
at org.aspectj.weaver.patterns.AndPointcut.matchInternal(AndPointcut.java:56)
at org.aspectj.weaver.patterns.Pointcut.match(Pointcut.java:137)
at org.aspectj.weaver.ShadowMunger.match(ShadowMunger.java:113)
at org.aspectj.weaver.Advice.match(Advice.java:109)
at org.aspectj.weaver.bcel.BcelAdvice.match(BcelAdvice.java:152)
at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:3304)
at org.aspectj.weaver.bcel.BcelClassWeaver.match(BcelClassWeaver.java:2692)
at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:480)
at org.aspectj.weaver.bcel.BcelClassWeaver.weave(BcelClassWeaver.java:100)
at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1689)
at org.aspectj.weaver.bcel.BcelWeaver.weaveWithoutDump(BcelWeaver.java:1633)
at org.aspectj.weaver.bcel.BcelWeaver.weaveAndNotify(BcelWeaver.java:1398)
at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1184)
at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.weaveQueuedEntries(AjPipeliningCompilerAdapter.java:514)
at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.afterCompiling(AjPipeliningCompilerAdapter.java:375)
at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$afterReturning$org_aspectj_ajdt_internal_compiler_CompilerAdapter$2$f9cc9ca0(CompilerAdapter.aj:78)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:421)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:1036)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performBuild(AjBuildManager.java:272)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:185)
at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
at org.aspectj.tools.ajc.Main.run(Main.java:371)
at org.aspectj.tools.ajc.Main.runMain(Main.java:248)
at org.aspectj.tools.ajc.Main.main(Main.java:84)
5 fail|aborts
[PS-Warn] process failed with error
UnityEngine.Debug:Internal_Log(Int32, String, Object)
UnityEngine.Debug:LogWarning(Object)
Playscape.Internal.L:W(String, Object[]) (at Assets/Plugins/Playscape/Internal/L.cs:43)
Playscape.Editor.UnityDebugLogger:W(String, Object[]) (at Assets/Plugins/Playscape/Editor/UnityDebugLogger.cs:38)
Playscape.Editor.AndroidApkCreator:runProcessWithCommand(String, String) (at Assets/Plugins/Playscape/Editor/AndroidApkCreator.cs:515)
Playscape.Editor.AndroidApkCreator:applyPatch(String, String, String) (at Assets/Plugins/Playscape/Editor/AndroidApkCreator.cs:387)
Playscape.Editor.BuildProcess:Build(String) (at Assets/Plugins/Playscape/Editor/BuildProcess.cs:198)
Playscape.Editor.AndroidPostProcessor:build(Boolean, BuildCompleted, BuildProgressChanged, BuildFailed) (at Assets/Plugins/Playscape/Editor/AndroidPostProcessor.cs:44)
Playscape.Editor.AndroidPostProcessor:Run() (at Assets/Plugins/Playscape/Editor/AndroidPostProcessor.cs:88)
Playscape.Editor.BuildProcessor:OnPostprocessBuild(BuildTarget, String) (at Assets/Plugins/Playscape/Editor/BuildProcessor.cs:41)
UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, BuildTarget, BuildOptions, Boolean, UInt32&)
UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions, Boolean)
UnityEditor.BuildPlayerWindow:BuildPlayerWithDefaultSettings(Boolean, BuildOptions)
UnityEditor.BuildPlayerWindow:GUIBuildButtons(Boolean, Boolean, Boolean, BuildPlatform)
UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings()
UnityEditor.BuildPlayerWindow:OnGUI()
System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)
System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
System.Reflection.MethodBase:Invoke(Object, Object[]) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
UnityEditor.HostView:Invoke(String, Object)
UnityEditor.HostView:Invoke(String)
UnityEditor.HostView:OnGUI()

Please, check that you've done the following:
You have required android api version or android 19 in android sdk folder
You have downloaded google-play-services inside android sdk folder

Related

I'm getting IL2CPP build error for some reason

For some reason, I'm getting build errors. I was be able to build my project clearly with mono. I'm trying to build the project with IL2CPP now and getting some errors.
I tried:
Changing Windows language to English. In fact, I reinstalled Windows 11.
And reinstall Unity, Visual Studio and sdk, ndk etc.
Btw, the error is about file path of compile.rsp file. I manually checked that file path and the file. it is exist in the right file location.
Here is the errors and console messages.
Error 1:
Internal build system error. BuildProgram exited with code -2147024893.
System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\Program Files\Unity\Hub\Editor\2021.2.7f1\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Release\StaticLibs\armeabi-v7a\compile.rsp'.
at System.IO.FileStream.ValidateFileHandle(SafeFileHandle fileHandle)
at System.IO.FileStream.CreateFileOpenHandle(FileMode mode, FileShare share, FileOptions options)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
at System.IO.StreamReader.ValidateArgsAndOpenPath(String path, Encoding encoding, Int32 bufferSize)
at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks)
at System.IO.File.InternalReadAllText(String path, Encoding encoding)
at System.IO.File.ReadAllText(String path)
at NiceIO.NPath.SystemIOFileSystem.File_ReadAllText(NPath path)
at NiceIO.NPath.WindowsFileSystem.File_ReadAllText(NPath path)
at Bee.Core.Stevedore.VirtualFileSystem.File_ReadAllText(NPath path)
at NiceIO.NPath.RelayingFileSystem.File_ReadAllText(NPath path)
at Bee.Core.BuildProgramFileSystem.File_ReadAllText(NPath path)
at NiceIO.NPath.ReadAllText()
at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupCompile(AndroidSharedLibraryConfiguration config, String name, AndroidTargetDeviceType deviceType, NPath sourceFilePath)
at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupLibUnityLibrary()+MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at System.Collections.Generic.List`1.AddRange(IEnumerable`1 collection)
at AndroidPlayerBuildProgram.AndroidPlayerBuildProgram.SetupPlayerBuild()
at PlayerBuildProgramLibrary.PlayerBuildProgramBase.RunBuildProgram()
at PlayerBuildProgramTypeWrapper.Run(String[] args)
at Program.Main(String[] args)
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)
Error 2:
BuildFailedException: Incremental Player build failed!
UnityEditor.Modules.BeeBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <374d68101b9e4829844c8329406f32cc>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.Int32 subtarget, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <0cde216a590a4d6fbc3d7db7ac203c5d>:0)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I finally solved my problem.
2 things you must be sure
Set your Windows Display Language to English
Change your Unity version from 2021.2 to 2020.3
These 2 thing most probably solve your problem like mine
In case the answer presented doesn't help, I've found a different possible cause of the error: large arrays of values (over 10k elements) can't be handled by IL2CPP specifically. No clue why-how, it just was mentioned on a thread in Unity forum, and it did solve the problem for me - I just dropped all the values in the text file and parsed it on startup.

Errors while using VS Code extension

I try to use the VS Code extension for Isabelle 2019. When I try to open the Isabelle output I get the exception
Exception in thread "event_timer" java.util.NoSuchElementException: key not found: IsabelleDejaVuSans.ttf
at scala.collection.MapLike.default(MapLike.scala:231)
at scala.collection.MapLike.default$(MapLike.scala:230)
at scala.collection.AbstractMap.default(Map.scala:59)
at scala.collection.MapLike.apply(MapLike.scala:140)
at scala.collection.MapLike.apply$(MapLike.scala:139)
at scala.collection.AbstractMap.apply(Map.scala:59)
at isabelle.HTML$.font_face$1(html.scala:366)
at isabelle.HTML$.$anonfun$fonts_css$1(html.scala:371)
at scala.collection.immutable.List.map(List.scala:282)
at isabelle.HTML$.fonts_css(html.scala:371)
at isabelle.Present$.output_document$1(present.scala:120)
at isabelle.Present$.preview(present.scala:138)
at isabelle.vscode.Preview_Panel.$anonfun$flush$2(preview_panel.scala:33)
at scala.collection.TraversableOnce.$anonfun$foldLeft$1(TraversableOnce.scala:156)
at scala.collection.TraversableOnce.$anonfun$foldLeft$1$adapted(TraversableOnce.scala:156)
at scala.collection.Iterator.foreach(Iterator.scala:937)
at scala.collection.Iterator.foreach$(Iterator.scala:937)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1425)
at scala.collection.TraversableOnce.foldLeft(TraversableOnce.scala:156)
at scala.collection.TraversableOnce.foldLeft$(TraversableOnce.scala:154)
at scala.collection.AbstractIterator.foldLeft(Iterator.scala:1425)
at scala.collection.TraversableOnce.$div$colon(TraversableOnce.scala:150)
at scala.collection.TraversableOnce.$div$colon$(TraversableOnce.scala:150)
at scala.collection.AbstractIterator.$div$colon(Iterator.scala:1425)
at isabelle.vscode.Preview_Panel.$anonfun$flush$1(preview_panel.scala:27)
at isabelle.Synchronized.change_result(synchronized.scala:73)
at isabelle.vscode.Preview_Panel.flush(preview_panel.scala:24)
at isabelle.vscode.Server.$anonfun$delay_preview$2(server.scala:210)
at isabelle.Standard_Thread$Delay.run(standard_thread.scala:64)
at isabelle.Standard_Thread$Delay.$anonfun$invoke$1(standard_thread.scala:77)
at isabelle.Event_Timer$$anon$1.run(event_timer.scala:27)
at java.base/java.util.TimerThread.mainLoop(Timer.java:556)
at java.base/java.util.TimerThread.run(Timer.java:506)
If I then do anything else (for example typing in the code window) another exception is raised every time
[Error - 9:01:48 PM] java.lang.IllegalStateException: Timer already cancelled.
How can I get rid of these two errors?
I found the same or a similar problem here, and they recommend running
$ isabelle scala
scala> import isabelle._
scala> Isabelle_Fonts.fonts(hidden = true)
Which results in
res0: List[isabelle.Isabelle_Fonts.Entry] = List(Entry("/home/daniel/opt/isabelle/contrib/isabelle_fonts-20190409/ttf-hinted/IsabelleDejaVuSans.ttf",false), Entry("/home/daniel/opt/isabelle/contrib/isabelle_fonts-20190409/ttf-hinted/IsabelleDejaVuSans-Bold.ttf",false), Entry("/home/daniel/opt/isabelle/contrib/isabelle_fonts-20190409/ttf-hinted/IsabelleDejaVuSans-Oblique.ttf",false), Entry("/home/daniel/opt/isabelle/contrib/isabelle_fonts-20190409/ttf-hinted/IsabelleDejaVuSans-BoldOblique.ttf",false), Entry("/home/daniel/opt/isabelle/contrib/isabelle_fonts-20190409/ttf-hinted/IsabelleDejaVuSansMono.ttf",false), Entry("/home/daniel/opt/isabelle/contrib/isabelle_fonts-20190409/ttf-hinted/IsabelleDejaVuSansMono-Bold.ttf",false), Entry("/home/daniel/opt/isabelle/con...
The plain answer: Isabelle2019 does not support VSCode --- that platform is moving too fast and assuming quick movements.
In Isabelle2020 (April 2020) it should work again. Approximations of this release is available here: https://sketis.net/2020/release-process-for-isabelle2020
See also https://marketplace.visualstudio.com/items?itemName=makarius.Isabelle2020

ServiceStack License not found when using NUnit 3 through Console Runner in TeamCity

I am using a valid license key. But I keep getting this error:
ServiceStack.LicenseException : The free-quota limit on '10 ServiceStack Operations' has been reached. Please see https://servicestack.net to upgrade to a commercial license or visit https://github.com/ServiceStackV3/ServiceStackV3 to revert back to the free ServiceStack v3.
So far I have tried the following:
Storing my license key in app.config
Storing my license key in web.config
Adding my key as a System Environment Variable called "SERVICESTACK_LICENSE"
Adding my key as a System Property through TeamCity Build Parameters
Adding my key as a System Environment Variable through TeamCity Build Parameters
Adding my key by calling Licensing.RegisterLicense before running AppHost.Init
When adding my key as a System Environment Variable through TeamCity Build Parameters I instead get an exception from JsConfig:
System.TypeInitializationException : The type initializer for 'ServiceStack.Text.JsConfig' threw an exception.
----> System.TypeInitializationException : The type initializer for 'ServiceStack.LicenseUtils' threw an exception.
----> System.IO.FileLoadException : Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at ServiceStack.Text.JsConfig.InitStatics()
at ServiceStack.AppHostHttpListenerPoolBase..ctor(String serviceName, Int32 poolSize, Assembly[] assembliesWithServices) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\AppHostHttpListenerPoolBase.cs:line 75
at ServiceStack.AppSelfHostBase..ctor(String serviceName, Assembly[] assembliesWithServices) in C:\BuildAgent\work\3481147c480f4a2f\src\ServiceStack\AppSelfHostBase.cs:line 13
at Alstra.SG.Tests.AppSelfHost..ctor() in C:\TeamCity\buildAgent\work\a0903bf22b2d1e1c\Test\AppSelfHost.cs:line 31
at Alstra.SG.Tests.Private.BaseIntegrationTest..ctor() in C:\TeamCity\buildAgent\work\a0903bf22b2d1e1c\Test\Private\BaseIntegrationTest.cs:line 16
at Alstra.SG.Tests.Private.Integration.RespondentServiceTests..ctor()
--TypeInitializationException
at ServiceStack.LicenseUtils.Init()
at ServiceStack.Text.JsConfig..cctor() in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\JsConfig.cs:line 21
--FileLoadException
at System.MemoryExtensions.AsSpan(String text)
at ServiceStack.Text.Jsv.JsvReader`1.Parse(String value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Jsv\JsvReader.Generic.cs:line 81
at ServiceStack.Text.TypeSerializer.DeserializeFromString[T](String value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\TypeSerializer.cs:line 67
at ServiceStack.LicenseUtils.ToLicenseKeyFallback(String licenseKeyText) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\LicenseUtils.cs:line 446
at ServiceStack.LicenseUtils.RegisterLicense(String licenseKeyText) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\LicenseUtils.cs:line 252
at ServiceStack.Net45PclExport.RegisterLicenseFromConfig() in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\PclExport.Net45.cs:line 140
at ServiceStack.LicenseUtils..cctor() in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\LicenseUtils.cs:line 135
When adding my key by calling Licensing.RegisterLicense before running AppHost.Init I get the following exception instead:
System.IO.FileLoadException : Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
at System.MemoryExtensions.AsSpan(String text)
at ServiceStack.Text.Jsv.JsvReader`1.Parse(String value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\Jsv\JsvReader.Generic.cs:line 81
at ServiceStack.Text.TypeSerializer.DeserializeFromString[T](String value) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\TypeSerializer.cs:line 67
at ServiceStack.LicenseUtils.ToLicenseKeyFallback(String licenseKeyText) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\LicenseUtils.cs:line 446
at ServiceStack.LicenseUtils.RegisterLicense(String licenseKeyText) in C:\BuildAgent\work\912418dcce86a188\src\ServiceStack.Text\LicenseUtils.cs:line 252
at Alstra.SG.Tests.Private.BaseIntegrationTest..ctor() in C:\TeamCity\buildAgent\work\a0903bf22b2d1e1c\Test\Private\BaseIntegrationTest.cs:line 17
at Alstra.SG.Tests.Private.Integration.ActivityServiceTests..ctor()
Happy to get some help!
I believe the version of ServiceStack you are using was built with a different version of System.Runtime.CompilerServices.Unsafe than what you are using in your Test project and because bindingredirect are not working in this context.
See Does redirecting assembly binding work for unit testing with a test runner?
As a workaround, you can try changing System.Runtime.CompilerServices.Unsafe in Nuget Package Manager to 4.5.2.
This version matches the missing assembly, Version=4.0.4.1.
Edit: If you are using NUnit 3 in your NUnit build step, you can then specify "Path to application configuration file: " to point to your app.config.
This should solve the root problem and let you use the most current version of your Nuget packages (since the correct bindingRedirects will then be applied).

install4j Extract JAR file exception

For the uninstaller of our application, i need to get a version from one of our JAR files. So i created a ExtractZipFileAction with the following options:
Property mode: 644
Property destinationDirectory: .
Property destinationRoot: Installation directory
Property dirMode: 755
Property fileFilter:
Property showProgress: false
Property zipFile: OurJarFile-1.0-SNAPSHOT-plugin.jar
Property zipRoot: Installation directory
Property rollbackSupported: true
But the execution cancels immediately with a ClassCastException (stack trace from the error log):
[ERROR] com.install4j.runtime.beans.actions.files.ExtractZipFileAction [ID 541]: java.lang.ClassCastException: com.install4j.runtime.installer.helper.comm.impl.UninstallerHelperContextImpl cannot be cast to com.install4j.api.context.InstallerContext
java.lang.ClassCastException: com.install4j.runtime.installer.helper.comm.impl.UninstallerHelperContextImpl cannot be cast to com.install4j.api.context.InstallerContext
at com.install4j.runtime.beans.actions.files.AbstractZipFileAction.zipActions(AbstractZipFileAction.java:89)
at com.install4j.runtime.beans.actions.files.AbstractZipFileAction.execute(AbstractZipFileAction.java:79)
at com.install4j.runtime.beans.actions.SystemInstallOrUninstallAction.uninstall(SystemInstallOrUninstallAction.java:35)
at com.install4j.runtime.installer.ContextImpl$7.executeAction(ContextImpl.java:1670)
at com.install4j.runtime.installer.ContextImpl$7.fetchValue(ContextImpl.java:1659)
at com.install4j.runtime.installer.ContextImpl$7.fetchValue(ContextImpl.java:1656)
at com.install4j.runtime.installer.helper.comm.actions.FetchObjectAction.execute(FetchObjectAction.java:14)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionWrapper(HelperCommunication.java:367)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.access$200(HelperCommunication.java:33)
at com.install4j.runtime.installer.helper.comm.HelperCommunication$1.run(HelperCommunication.java:98)`
Note that we're in the uninstaller, not the installer, but the exception complains about casting an UninstallerHelperContextImpl to an InstallerContext. Could it be a problem with the JAR file?
I also set the action elevation type to Elevate to maximum available privileges since i want to extract the files in the installation directory in the programs-folder.
This is a bug and will be fixed in 6.1.5. Please contact support#ej-technologies.com to get a build where this fixed.

Why does custom Build Process Template executing PowerShell fail

I've modified a custom build process template to execute Powershell on the build server. This is so I can run some scripts that will automate the deployment of our SharePoint solution. Everything was working fine up until I upgraded the build servers Powershell version from 2.0 to 3.0 (which needed to be done as I was installing SCVMM Admin Console 2012 and Powershell 3.0 was a pre-requisite).
In the build template itself, I'm using a Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess work flow item to execute the PowerShell command with the following properties:
Arguments : String.Format(" ""& '{0}' -DropLocation '{1}' {2} "" ",
ScriptFilename, BuildDetail.DropLocation, PostDropScript2Arguments)
FileName : "powershell"
OutputEncoding :
System.Text.Encoding.GetEncoding(System.Globalization.CultureInfo.InstalledUICulture.TextInfo.OEMCodePage)
Now every time I try to execute the build, I get the following error:
Exception Message: File not found: PowerShell (type
FileNotFoundException) Exception Stack Trace: Server stack trace:
at
Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess.ProcessWrapper.Start()
at
Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess.InvokeProcessInternal.RunCommand(AsyncState
state) at
System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr
md, Object[] args, Object server, Object[]& outArgs) at
System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage
msg, IMessageSink replySink)
Exception rethrown at [0]: at
System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message
reqMsg, Boolean bProxyCase) at
System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed,
MessageData& msgData) at System.Func2.EndInvoke(IAsyncResult
result) at
System.Activities.AsyncCodeActivity1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext
context, IAsyncResult result) at
System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor
executor, BookmarkManager bookmarkManager)
Inner Exception Details:
Exception Message: The system cannot find the file specified (type
Win32Exception) Exception Stack Trace: at
System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo
startInfo) at
Microsoft.TeamFoundation.Build.Workflow.Activities.InvokeProcess.ProcessWrapper.Start()
It seems like the build is no longer able to link the "powershell" command with the actual PowerShell file.
I've manually gone onto the build server and typed "powershell" into a command line and it started PowerShell, as expected.
Has anyone else experienced this issue before?
Thanks very much
Add the full filepath to powershell.exe in the invokeprocess step in your workflow and it should always work (I would not trust the environment-settings for this)
And know, logging in on the server under your own account is not equal to the build server running under a specific account.
In my case same error occurred after deploying Windows Managment Framework 3.0.
It was solved by restarting build controller and agent.