Autodesk Forge third party updater dialog issue - autodesk-forge

We can open Revit files on Autodesk forge but recently we have run into a Revit file that have content from a third party plugin. When you open the file manually you get this dialog:
We think this dialog is causing this file to stop from loading the file further. Our question is how can we suppress this dialog.

We've added the Custom Failure Handling (as suggested), but it seems that this code is not even executed: we don't see any logs. The failure seems to occur directly after our log when our plugin starts (see ** Plugin code starts here.)
...
Running RevitAssemblyResolver....
Initializing RevitCoreEngine...
Selected Revit\RCE install Path: (from app.config) C:\RevitDir
Resolving location of Revit/RevitCoreEngine installation...
Running user application....
Found an addIn for registration: PlugIn01.addin
Initializing RCE....
Initializing RevitCoreEngine (and possibly running stub installer)...
Language not specified, using English as default
application.ActiveAddInId.GetGUID() = 000bd853-36e4-461f-9171-c5aceda4e724
** Plugin code starts here.
Initialize and get RCE: (VersionBuild) 18.0.0.0 (VersionNumber) 2018 (SubVersionNumber) 2018.3
Autodesk.Revit.Exceptions.InternalException: An internal error has occurred.
at Autodesk.Revit.ApplicationServices.Application.OpenDocumentFile(ModelPath modelPath, OpenOptions openOptions)
at DesignAutomationFramework.DesignAutomationData..ctor(Application revitApp, String mainModelPath)
at DesignAutomationFramework.DesignAutomationReadyEventArgs..ctor(Application revitApp, String mainModelPath)
at DesignAutomationFramework.DesignAutomationBridge.SetDesignAutomationReady(Application revitApp, String mainModelPath)
at RevitCoreEngineTest.RceConsoleApplication.Program.UserMain(CommandLineArgs cl)
RESULT: Failure - Result of running user app is failure
Finished running. Process will return: TestError
====== Revit finished running: revitcoreconsole ======
...
What we eventually did to have a successful run, was to recreate a new central file. Maybe the file was corrupt to start with.

Related

Each project is throwing ControllerConnectionException on startup

Ok, I don't rly know where to start, but let's do this.
So for two weeks I had my last working day where everything was working fine in VS 2019 (16.11.4). Today I wanted to start a project, and i got the following error message:
Unfortunately, a process used by VS has encountered an unrecoverable error.
Stack Trace:
Microsoft.ServiceHub.Client.ControllerConnectionException : Controller terminated before accepting connections. Exit code: -1073741674.
at async Microsoft.ServiceHub.Client.HubControllerClient.StartAsync(<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.LaunchOrFindControllerAsync(<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.GetLocationServiceAsync(<Unknown Parameters>)
at async Microsoft.ServiceHub.Utility.Shared.ServiceHubRetry.ExecuteAsync[TReturnType](<Unknown Parameters>)
at async Microsoft.ServiceHub.Utility.Shared.ServiceHubRetry.ExecuteAsync[TReturnType](<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.GetThisAsRemoteServiceBrokerAsync(<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.<Reset>b__54_0(<Unknown Parameters>)
at async Microsoft.VisualStudio.Threading.AsyncLazy`1.<>c__DisplayClass13_0.<GetValueAsync>b__0[T](<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.GetPipeAsync(<Unknown Parameters>)
at async Microsoft.ServiceHub.Client.HubClient.RequestServiceAsync(<Unknown Parameters>)
at async Microsoft.CodeAnalysis.Remote.ServiceHubRemoteHostClient.RequestServiceAsync(<Unknown Parameters>)
at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)
Followed by another error:
There was an error activating the remote language server. Plese select Help > Send Feedback > Report a problem.
These errors also appear, when I create a new project. The only way I can start VS19 without errors is, when I click "Continue without code" in the popup.
So I tried to repair or modify VS. When I want to repair it, it failed. The popup which is prepairing the repair info is shutting down with no error message.
I didn't find that much information in the internet, especially with the error code.
Furthermore I detected, that I cannot install or uninstall VS19. Plus, I cannot install VS22, because it is aborting again after the "preparing the VS installer". Again no error is poping up.
A sample log:
[2cf4:0001][2021-12-15T17:45:47] Saving the current locale (de-DE) to user.json.
[2cf4:0001][2021-12-15T17:45:47] Setting the telemetry services
[2cf4:0004][2021-12-15T17:45:47] Creating a new telemetry service.
[2cf4:0001][2021-12-15T17:45:47] Visual Studio Installer Version: 3.0.4496
[2cf4:0001][2021-12-15T17:45:47] Raw Command line: "C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe"
[2cf4:0001][2021-12-15T17:45:47] Using registry value of (1) to theme installer.
[2cf4:0001][2021-12-15T17:45:47] Getting singleton lock. Mutex name: DevdivInstallerUI
[2cf4:0004][2021-12-15T17:45:47] Telemetry session ID: ...
[2cf4:0001][2021-12-15T17:45:47] Getting singleton lock succeed.
[2cf4:0006][2021-12-15T17:45:47] Creating new ExperimentationService
[2cf4:0006][2021-12-15T17:45:47] Telemetry property VS.ABExp.Flights : lazytoolboxinit;fwlargebuffer;refactoring;spmoretempsbtn1;asloff;keybindgoldbarext;asynccsproj;vsfricheditor;completionapi;tn-vsmacnps-7;toggleblockcomment;tasmigddvs;multitenanttasmigration_002;vsfdevcom2;lsprmsgvol;debugger-init-asynccf;vswnewinstaller;links_carousel_tfl;azure_links_tf
**[2cf4:0003][2021-12-15T17:45:47] An abnormal shutdown was detected from the previous telemetry session.**
[2cf4:0004][2021-12-15T17:45:47] Telemetry property vs.willow.source : WPF
[2cf4:0004][2021-12-15T17:45:47] Telemetry property vs.willow.locale : de-DE
[2cf4:0004][2021-12-15T17:45:47] Telemetry property vs.willow.installerversion : 3.0.4496.34889
[2cf4:0004][2021-12-15T17:45:47] Telemetry property vs.willow.startmethod : direct
[2cf4:0004][2021-12-15T17:45:47] Telemetry property vs.willow.activityid : ...
[2cf4:0004][2021-12-15T17:45:47] Telemetry property vs.willow.campaign : 70
[2cf4:0004][2021-12-15T17:45:47] Telemetry property vs.willow.passive : False
[2cf4:0004][2021-12-15T17:45:47] Telemetry property vs.willow.quiet : False
[2cf4:0004][2021-12-15T17:45:47] Telemetry property vs.willow.processtype : ui
[2cf4:0001][2021-12-15T17:45:47] Monitor center position: 960, 585
[2cf4:0001][2021-12-15T17:45:47] Showing the window.
I didn't really know what Telemetry was for. Can this cause any issues due to fireall/network problems, that I cannot install, repair, uninstall VS?
With sfc /scannow I got following lines:
2021-12-16 16:25:52, Info CSI 00000293 [SR] Cannot repair member file [l:15]'mscorlib.ni.dll' of NetFx4-mscorlib_ni, version 4.0.15805.350, arch amd64, versionScope neutral, pkt {l:8 b:b03f5f7f11d50a3a} in the store, hash mismatch
2021-12-16 16:25:52, Info CSI 00000294 [SR] This component was referenced by [l:78]'Package_3_for_KB5004331~31bf3856ad364e35~amd64~~10.0.4400.1.5004331-51_neutral'
2021-12-16 16:25:52, Info CSI 00000295 Hashes for file member [l:15]'mscorlib.ni.dll' do not match.
2021-12-16 16:25:52, Info CSI 00000297 [SR] Could not reproject corrupted file \??\C:\Windows\Microsoft.NET\Framework64\v4.0.30319\NativeImages\\mscorlib.ni.dll; source file in store is also corrupted
Does this have any connection to my general problem?
Maybe(!) a very similar problem, this guy was facing:
https://developercommunity.visualstudio.com/t/visual-studio-installer-vs2019-keep-crashing-sudde/711824
So... (further) things I tried:
Installed .NET Frameworks again
Tried the reapair tools for VS and .NET
Tried to repair VS19, but I cant
Run sfc scannow
Run chkdsk scan
Several reboots, restarting VS, ...

An unexpected error happened during phase Publishing of job

I am trying to use the ForgeApp with Revit. For the same I am trying to execute the workitem from Postman. During the execution I am getting below error.
An unexpected error happened during phase Publishing of job.
The parts of the actual report (after removing some of the sensitive info) is as follows:
[10/15/2020 05:45:24] Finished running. Process will return: Success
[10/15/2020 05:45:24] ====== Revit finished running: revitcoreconsole ======
[10/15/2020 05:45:25] End Revit Core Engine standard output dump.
[10/15/2020 05:45:25] End script phase.
[10/15/2020 05:45:25] Start upload phase.
[10/15/2020 05:45:25] Error: Non-optional output [result.json] is missing.
[10/15/2020 05:45:25] Error: An unexpected error happened during phase Publishing of job.
[10/15/2020 05:45:25] Job finished with result FailedMissingOutput
[10/15/2020 05:45:25] Job Status:
From the error it is clear that the Plugin has failed in processing but it gives give much idea as to why it has failed . After receiving this error, I tried to debug locally by following https://forge.autodesk.com/blog/design-automation-debug-revit-plugin-locally
But during debugging it is failing with below error while Executing the Plugin itself. It executes the Onstartup without any issues but after that it is not going in HandleDesignAutomationReadyEvent.
Managed Debugging Assistant 'FatalExecutionEngineError' : 'The runtime has encountered a fatal error. The address of the error was at 0xdb9b8a8d, on thread 0x3784*
So I am not sure what to ahead to resolve this. If I can get this working somehow in the Local with Debugger or through Postman then it would help.
Further update - I have now found the root cause. Even though it was complaining about the missing output file leading me to believe the code was not running properly, the actual root cause was that it was not finding the model from the inputFile parameter. This became clear once I tried putting Console.Write in the Plugin code and then debugging became easy. I wasn't sure Console would be printed in the output at first and hence turned the debug logs off at first . But as I didn't have any other means to have the verbose logging , I put in lots of Console write and now got to know the root cause. Thanks

CorruptModelException during work item execution

I'm totally new with the Forge design-automation (V3 Beta)
During the work item execution inside the design-automation framework, the CorruptModelException is thrown.
The model (.rvt) being sent will open without problem in the desktop environment (R2018).
I tried to purge unused and resaved, but it didn't help. Here's the part from the log that tells the problem.
[04/17/2019 10:11:16] Found an addIn for registration: xxx.addin
[04/17/2019 10:11:16] Initializing RCE....
[04/17/2019 10:11:16] Initializing RevitCoreEngine (and possibly running stub installer)...
[04/17/2019 10:11:16] Language not specified, using English as default
[04/17/2019 10:11:18] Initialize and get RCE: (VersionBuild) 18.0.0.0 (VersionNumber) 2018 (SubVersionNumber) 2018.3
[04/17/2019 10:11:18] Autodesk.Revit.Exceptions.CorruptModelException: The model could not be opened: Unspecified error
[04/17/2019 10:11:18] (COleException 0x80004005)
[04/17/2019 10:11:18] at Autodesk.Revit.ApplicationServices.Application.OpenDocumentFile(String fileName)
[04/17/2019 10:11:18] at DesignAutomationFramework.DesignAutomationData..ctor(Application revitApp, String mainModelPath)
[04/17/2019 10:11:18] at DesignAutomationFramework.DesignAutomationReadyEventArgs..ctor(Application revitApp, String mainModelPath)
[04/17/2019 10:11:18] at DesignAutomationFramework.DesignAutomationBridge.SetDesignAutomationReady(Application revitApp, String mainModelPath)
[04/17/2019 10:11:18] at RevitCoreEngineTest.RceConsoleApplication.Program.UserMain(CommandLineArgs cl)
[04/17/2019 10:11:22] RESULT: Failure - Result of running user app is failure
[04/17/2019 10:11:22] Finished running. Process will return: TestError
[04/17/2019 10:11:22] ====== Revit finished running: revitcoreconsole ======
[04/17/2019 10:11:22] Process exit code: 4
[04/17/2019 10:11:22] End Revit Core Engine standard output dump.
[04/17/2019 10:11:22] Error: Application revitcoreconsole.exe exits with code 4 which indicates an error.
[04/17/2019 10:11:22] End script phase.
[04/17/2019 10:11:22] Error: An unexpected error happened during phase CoreEngineExecution of job.
[04/17/2019 10:11:22] Job finished with result FailedExecution
One example file I'm tryuing to use can be found from here:
https://www.dropbox.com/s/chffmh62wlmuwx7/empty.rvt?dl=0
Could someone test, whether he can use this with Revit 2018 design automation.
I'm also a bit confused about Workitem API. The documentation says that I NEED to use 3 legged auth. (which seems to be awfully difficulty as it requires additional signatures in the request (?)...), but the step by step guide shows it with 2-legged, which is otherwise working OK for me too. This is probably not the reason to my difficulties.
Any ideas...?
The link the provided in the comments is not a direct download link. If you click on the link, it takes you to a webpage:
https://www.dropbox.com/s/chffmh62wlmuwx7/empty.rvt?dl=0
The workitem input arguments need a direct download link to be able to process the file correctly. For example, a direct download link to the exact same file is
https://dl.dropboxusercontent.com/s/chffmh62wlmuwx7/empty.rvt

Play TypeSafe Activator fails to start - IllegalArgumentException "Failed to download new template catalog properties"

Moving from play 2.2.x to latest activator last night. Downloaded minimal 1.2.10, extracted it in program file (x86)\typesafe... and put the directory into the system path variable. cloned my repository, and when i executed activator run it downloaded the required modules and my app is up and running. All great so far. run works!
Then I tried to create a new app, and activator fails, with the following trace:
Checking for a newer version of Activator (current version 1.2.10)...
... our current version 1.2.10 looks like the latest.
Found previous process id: 9632
FOUND REPO = activator-local # file:////C:/Program%20Files%20(x86)/Typesafe/activator-1.2.10-minimal/repository
Play server process ID is 9760
[info] play - Application started (Prod)
[info] play - Listening for HTTP on /127.0.0.1:8888
[info] a.e.s.Slf4jLogger - Slf4jLogger started
[WARN] [10/30/2014 10:47:13.972] [default-akka.actor.default-dispatcher-2] [ActorSystem(default)] Failed to download new template ca
talog properties: java.lang.IllegalArgumentException: requirement failed: Source file 'C:\Users\admin\.activator\1.2.10\templates\in
dex.db_6e0565f0c8826b17.tmp' is a directory.
[ERROR] [10/30/2014 10:47:13.972] [default-akka.actor.default-dispatcher-2] [akka://default/user/template-cache] Could not find a te
mplate catalog. (activator.templates.repository.RepositoryException: We don't have C:\Users\admin\.activator\1.2.10\templates\cache.
properties with an index hash in it, even though we should have downloaded one
activator.templates.repository.RepositoryException: We don't have C:\Users\admin\.activator\1.2.10\templates\cache.properties with a
n index hash in it, even though we should have downloaded one
at activator.cache.TemplateCacheActor.preStart(TemplateCacheActor.scala:184)
at akka.actor.Actor$class.aroundPreStart(Actor.scala:470)
at activator.cache.TemplateCacheActor.aroundPreStart(TemplateCacheActor.scala:25)
at akka.actor.ActorCell.create(ActorCell.scala:580)
at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
at akka.dispatch.Mailbox.processAllSystemMessages(Mailbox.scala:263)
at akka.dispatch.Mailbox.run(Mailbox.scala:219)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:393)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
I've taken a look at several similar issues on SO and elsewhere. I've deleted .activator directory and retried, I've tried this process from behind a proxy and not, as well as offline (surely offline should work!), but it consistently gives the above error. activator ui gives the same error. I'm stuck and any suggestions would be appreciated. (Edit. tried with full activator download, rather than minimal, and I get the same error.)
Look for reasons it might be impossible to create or access 'C:\Users\admin.activator\1.2.10\templates\in
dex.db_6e0565f0c8826b17.tmp' ... maybe a permissions issue?
The failed check is for "is a directory" but that also fails if it just doesn't exist or can't be accessed.

Phonegap Blackberry app not signing

I am building a phonegap app for blackberry. It runs fine in the emulator but when i try to sign the project using command line so that i can run it on an actual device it gives me the following exception occurs.
I googled it , it seems i have to use preverify tool and verify my jar file. But i dont have a jar file of my project, its just folders. Please help me out with this.
[INFO] Parsing command line options
[INFO] Parsing bbwp.properties
[INFO] Validating application archive
[INFO] Parsing config.xml
[WARNING] Failed to find a <feature> element
[WARNING] Failed to find the <author> element
[INFO] Populating application source
[INFO] Compiling BlackBerry WebWorks application
Exported static routine: .main(String[]) is multiply defined.
Exported static routine: .main(String[]) is multiply defined.
Exported static routine: .main(String[]) is multiply defined.
net.sf.antcontrib.AntContribVersion: Error!: Missing stack map in: <init> at lab
el: 30
[ERROR] RAPC exception occurred
Thanx
Looks like i only found the solution. The problem was that the zip file was in C:\ drive, and windows was not allowing the SDK to access it because of UAC.
Nevertheless found this silly solution after 2 days of trial and error. Silly me