Error: Application revitcoreconsole.exe exits with code -19088744 which indicates an error - autodesk-designautomation

I am working on a Revit Design Automation app. I am following the instructions that are presented with the tutorial. When I submit my work item the job jails with 'failedInstructions' error.
Error: Application revitcoreconsole.exe exits with code -19088744 which indicates an error.
What am I doing wrong?
Here is the full report:
[07/28/2020 06:34:10] Job information:
"CommandLine":[
"[$(engine.path)\\\\revitcoreconsole.exe /i $(args[rvtFile].path) /al $(appbundles[AppliedVR4].path)]"
]
"Settings":{
"dasreportfaileduploadoptional": {
"value": "true",
"isEnvironmentVariable": true
}
}
"Id":"e72a71b50f194cc89fb4dd4fda928c67"
"ActivityId":"AppliedVR4.AppliedVR4Activity2+test"
"Engine.Id":"Autodesk.Revit!35"
"Apps": [
"App.Id":"AppliedVR4.AppliedVR4!31"
]
"BoundArguments":{
"rvtFile": {
"localName": "input.rvt",
"url": "https://developer.api.autodesk.com/Masked:+lo4+1yZ0UHG78KXi8qaxkGWDuw="
},
"result": {
"localName": "result.avr",
"url": "https://developer.api.autodesk.com/Masked:D9DBQayMQvFwzTKzcVtWoD1ON8U=",
"verb": "put"
},
"onProgress": {
"ondemand": true,
"url": "https://wlnr5sjl3a.execute-api.us-east-1.amazonaws.com/Masked:UK/Z3b5X3xUWxXiH6C9r9i9UlRU=",
"headers": {
"Content-Type": "application/json",
"x-das-authorize": "awssigv4(us-east-1)",
"x-ads-token-data": "{\"access_token\":{\"client_id\":\"4FyUuuVl4pVvukCOYHLNiPVnAaz7uJfk\"},\"scope\":\"code:all data:write data:read bucket:create bucket:delete\",\"expires_in\":3578,\"client_id\":\"4FyUuuVl4pVvukCOYHLNiPVnAaz7uJfk\"}"
},
"verb": "put"
}
}
"Quotas":{
"limitProcessingTimeSec": 10800,
"limitTotalUncompressedAppsSizeInMB": 5000
}
[07/28/2020 06:34:10] Starting work item e72a71b50f194cc89fb4dd4fda928c67
[07/28/2020 06:34:10] Start download phase.
[07/28/2020 06:34:10] Start downloading input: verb - 'GET', url - 'https://developer.api.autodesk.com/oss/v2/signedresources/49f68e94-a25e-4606-8675-a7a088adfefa?region=US'
[07/28/2020 06:34:11] '17813504' bytes have been written to T:\Aces\Jobs\e72a71b50f194cc89fb4dd4fda928c67\input.rvt.
[07/28/2020 06:34:11] End downloading file 'https://developer.api.autodesk.com/oss/v2/signedresources/49f68e94-a25e-4606-8675-a7a088adfefa?region=US'.
[07/28/2020 06:34:11] End download phase successfully.
[07/28/2020 06:34:11] Start preparing script and command line parameters.
[07/28/2020 06:34:11] Command line: [ /i T:\Aces\Jobs\e72a71b50f194cc89fb4dd4fda928c67\input.rvt /al T:\Aces\Applications\5fc5cf84be5cde0ff6e5d6c44c1d0505.AppliedVR4.AppliedVR4[31].package]]
[07/28/2020 06:34:11] Identified standalone application at [T:\Aces\AcesRoot\20.0\coreEngine\Exe\\revitcoreconsole.exe.
[07/28/2020 06:34:11] End preparing script and command line parameters.
[07/28/2020 06:34:11] Start script phase.
[07/28/2020 06:34:11] ### Command line arguments: /isolate HKEY_CURRENT_USER\SOFTWARE\AppDataLow\Software\Autodesk\CoreUser\WorkItem_e72a71b50f194cc89fb4dd4fda928c67 "T:\Aces\Jobs\e72a71b50f194cc89fb4dd4fda928c67\userdata" /exe "[T:\Aces\AcesRoot\20.0\coreEngine\Exe\\revitcoreconsole.exe" /i T:\Aces\Jobs\e72a71b50f194cc89fb4dd4fda928c67\input.rvt /al T:\Aces\Applications\5fc5cf84be5cde0ff6e5d6c44c1d0505.AppliedVR4.AppliedVR4[31].package].
[07/28/2020 06:34:11] Start application revitcoreconsole.exe standard output dump.
[07/28/2020 06:34:12] End application revitcoreconsole.exe standard output dump.
[07/28/2020 06:34:12] Error: Application revitcoreconsole.exe exits with code -19088744 which indicates an error.
[07/28/2020 06:34:12] End script phase.
[07/28/2020 06:34:12] Error: An unexpected error happened during phase CoreEngineExecution of job.
[07/28/2020 06:34:12] Job finished with result FailedExecution
[07/28/2020 06:34:12] Job Status:
{
"status": "failedInstructions",
"reportUrl": "https://dasprod-store.s3.amazonaws.com/workItem/AppliedVR4/e72a71b50f194cc89fb4dd4fda928c67/report.txt?AWSAccessKeyId=ASIATGVJZKM3PIAYPVMQ&Expires=1595932450&x-amz-security-token=IQoJb3JpZ2luX2VjEC8aCXVzLWVhc3QtMSJHMEUCIQDVcCLPyau%2Fbcq8MGD%2BLTdbN3mnKZXRQ5EOrW1k%2B%2BaLjgIgAIxbRh3l40SoodftgUv6j62hzfyuXPn6S5ElUAb%2Fck4q3gEI5%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FARACGgwyMjA0NzMxNTIzMTAiDH%2F%2Bdc0eHW5n78VW4yqyAbcOas%2F0JxYHwV2HJzN5mtilja0P0vCveCfxRPo2mTE%2BoIpt%2Fu6X8KJPesmZEyb80lDmwh23slylXMKeDr2Sgd92psGERJWxNRy1crMXuO3l6nZ8QHE1UrA%2BPZJmcThaPiop9PkjEBdIHvzgInq1L%2Fhi0364EG2njpdYs%2FLbettxserXm5sJGw5BjFWoIzO9Vr9Sv8hN6tq%2FWaDEWZgTfjgpWY93im5jzHANVHJNTug8I%2BEwpYH%2F%2BAU64AEaJmd6uLAuGMu3xv8v3l8bo38Vzg9yjYlswcT9z482TDE4%2FrAakmfOh7P6wPOqA5Tw8sW020H6ojghuUTXWufsLm7FcJxTLQyKqYIThW79rkAyRUdPoaqf5SObhmxAhFmmdn%2BWqidzpz%2B6Y5w97C9sH5HRWrlPG89Ygq2StAADPZvy%2FFhpH1Fqayk4UtV74%2FRuwX0T32GT50AjdgkHUgz%2ByNVcBGtti5%2B%2B4i%2FKbHUecWK%2BTKpDhR16ctCkOr%2FIehf2rcaVzgYTxfTRbSsdvKLkm%2F%2F1pY%2BJFLwQo0EzQ7ltlw%3D%3D&Signature=U8uySOmxvoFgNdu32AoF2DuEmRk%3D",
"stats": {
"timeQueued": "2020-07-28T06:34:09.8535659Z",
"timeDownloadStarted": "2020-07-28T06:34:10.0948438Z",
"timeInstructionsStarted": "2020-07-28T06:34:11.1278192Z",
"timeInstructionsEnded": "2020-07-28T06:34:12.3083113Z",
"bytesDownloaded": 17813504
},
"id": "e72a71b50f194cc89fb4dd4fda928c67"
}

We can run and debug the Forge plugin locally and it works as expected. We also added some logging, but it doesn't seem like OnStartUp is getting called at all. Also, we used to be able to run the plugin on Forge without an issue, not sure if there has been an internal change on the Forge side causing this issue
I’d start with why OnStartup is not getting called. Among the possibilities:
There is a typo in the comment (and I am guessing the code is correct). But confirm that the function name is OnStartup().
Confirm that the <FullClassName> tag provided in the bundled addin file resolves correctly in the assembly code.
Confirm that the <Assembly> tag provided in the assembly file corresponds to relative path to the valid assembly dll.
Make sure all the dependencies of the assembly dll are also bundled
in the app bundle.
See a sample appbundle. And also see some common solutions around such problems in this answer.
**
UPDATE
**
This turned out to be a case of incorrectly setup commandLine field in the Activity definition and service not being able to handle this gracefully. OP had their Activity definition setup like so:
"commandLine": [
"[$(engine.path)/revitcoreconsole.exe /i \"$(args[MyFile].path)\" /al \"$(appbundles[MyBundle].path)\"]"
],
The correct way to define this is:
"commandLine": [
"$(engine.path)/revitcoreconsole.exe /i \"$(args[MyFile].path)\" /al \"$(appbundles[MyBundle].path)\""
],
The extra starting and closing square brackets inside the commandLine string definition caused the problem. The bad command line started with [$(engine.path)/revitcoreconsole.exe but should have been $(engine.path)/revitcoreconsole.exe.
The Activity.commandLine field by itself is an array (aka collection) of commands to be run on the worker. Each of those command line instruction strings need to be a valid command after the variables referenced in them are expanded.
That said, most Design Automation for Revit will likely need only one of these two definitions each with a single command line instruction. The difference is based on the fact whether there is an input file to be opened.
Option 1 (Open file corresponding to input argument MyFile)
"commandLine": [
"$(engine.path)/revitcoreconsole.exe /i \"$(args[MyFile].path)\" /al \"$(appbundles[MyBundle].path)\""
],
Option 2 (No document to be opened)
"commandLine": [
"$(engine.path)/revitcoreconsole.exe /al \"$(appbundles[MyBundle].path)\""
],

Related

When debugging my .netcore app in a docker container, the process stops when a System.InvalidOperation exception is thrown

When I attach the vsdbg debugger to my running application in a docker container; I am able to step through code no problem; however, when I hit a particular line of code (has to do with executing a sqlcommand) which is surrounded by a try/catch, the application halts; and I get the following message in the debugging window in VSCode "The pipe program 'docker' exited unexpectedly with code 139.
As mentioned this is in a try/catch block, if I am not debugging, the application runs just fine as the exception is handled by the code. This only happens when debugging and only when the app is in the container.
Here are my debugger configuration in my launch.json file for reference:
"configurations": [
{
"name" : ".NET Core Docker Attach",
"type" : "coreclr",
"request" : "attach",
"processId" : "${command:pickRemoteProcess}",
"pipeTransport": {
"pipeProgram" : "docker",
"pipeArgs" : ["exec", "-i", "lightning-backend-1"],
"debuggerPath" : "/vsdbg/vsdbg",
"pipeCwd" : "${workspaceRoot}",
"quoteArgs" : false
},
"sourceFileMap" : {
"/app/WorkRequests": "${workspaceFolder}/WorkRequests"
},
}
]
I tried hosting the application locally rather than in a container to see what would happen outside the container as the error mentioned had to do with the container exiting with code 139. When I did, and I stepped through the code, I actually fell into the catch block and saw the exception was a System.InvalidOperation exception, however, the error is handled in the catch block and the application continue to run. My debugger still attached to the local instance of the application.
I then tried to be more specific in the code catch the exception rather than:
catch(Exception ex), I made it catch(System.InvalidOperation ex), and tried again in the container, but I got the same result. The application halts, it doesn't give an exception error on the console, or anything, and the message in the vscode debugger window says the same thing "the pipe program 'docker' exited unexpectedly with code 139".
I looked into what that error is and found its a SIGSEV issue, but I don't know why this won't fall into the catch block and continue. I'm not an expert with docker so any help is greatly appreciated.

Error when running near indexer localnet, fail to generate config.json

So I'm trying to run the indexer on localnet following the official tutorial https://docs.near.org/docs/tutorials/near-indexer
However when I run cargo run -- init to generate the localnet json config I get this error
Finished dev [unoptimized + debuginfo] target(s) in 17.62s
Running `target/debug/example-indexer init`
thread 'main' panicked at 'Failed to deserialize config: Error("expected value", line: 1, column: 1)', /home/francois/.cargo/git/checkouts/nearcore-5bf7818cf2261fd0/a44be20/nearcore/src/config.rs:499:39
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
At some point it seems the json is not created or not created properly I guess, the function crashing in config.rf line 499 is
impl From<&str> for Config {
fn from(content: &str) -> Self {
serde_json::from_str(content).expect("Failed to deserialize config")
}
}
It's quite difficult to debug since cargo run -- init is using some inner near function (also I'm new to rust).
the config.json file is created but it seems the permission are not set properly by the script, the content of config.json is
"<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>AccessDenied</Code><Message>Access Denied</Message> ... "
If anyone from the community has encountered this problem or has a hint it would be great!! thanks a lot !
In the tutorial you referenced, it mentions a similar error, and suggests the following:
Open your config.json located in the .near folder in the root of your home directory. ( ~/.near/config.json )
In this file, locate: "tracked_shards": [] and change the value to [0].
Save the file and try running your indexer again.
So I had the wrong config with download_config: false,
It should be download_config: false, for the localnet use

How to load LUA modules in aquarium/scrapy-splash?

I am working on a LUA script for scrapy-splash and want to use the socket.http module.
The module is installed, I have disabled the sandbox and configured the package path. But I can't get it to work.
My environment is aquarium on Linux.
I have installed luasocket using luarocks and added
--disable-lua-sandbox --lua-package-path "/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/?.lua"
to the splash instance in docker-compose.yml.
When I run the script I get the following error:
"error": {"info": {"type": "LUA_INIT_ERROR", "message": "[string \"<python>\"]:1: module 'socket.http' not found:
no field package.preload['socket.http']
no file '/app/splash/lua_modules/socket/http.lua'
no file '/app/splash/lua_modules/libs/socket/http.lua'
no file '/usr/local/share/lua/5.1/socket/http.lua'
no file '/usr/local/share/lua/5.1/socket/http/socket/http.lua'
no file '/usr/local/share/lua/5.2/socket/http.lua'
no file '/usr/local/share/lua/5.2/socket/http/init.lua'
no file '/usr/local/lib/lua/5.2/socket/http.lua'
no file '/usr/local/lib/lua/5.2/socket/http/init.lua'
no file '/usr/share/lua/5.2/socket/http.lua'
no file '/usr/share/lua/5.2/socket/http/init.lua'
no file './socket/http.lua'
no file '/usr/local/lib/lua/5.2/socket/http.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.2/socket/http.so'
no file '/usr/lib/lua/5.2/socket/http.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './socket/http.so'
no file '/usr/local/lib/lua/5.2/socket.so'
no file '/usr/lib/x86_64-linux-gnu/lua/5.2/socket.so'
no file '/usr/lib/lua/5.2/socket.so'
no file '/usr/local/lib/lua/5.2/loadall.so'
no file './socket.so'"}, "description": "Error happened while executing Lua script", "type": "ScriptError", "error": 400}, "qsize": 0, "status_code": 400}
Even though the file /usr/local/share/lua/5.1/socket/http.lua exists on my machine. I have also tried to chmod 777 the file but it still throws the error.
It turned out that there was no need for me to use socket.http.
I am using splash:http_get and splash:http_post now and it is working fine.

erlang lager_syslog driver failure

I'm trying to use lager_syslog in my project but it seems like a driver is missing.
This is in my rebar.conf:
{deps, [
...
{lager_syslog, {git, "https://github.com/basho/lager_syslog.git", {branch, master}}}
]}.
My test handler:
{lager_syslog_backend, ["test", local1, info]},
The error:
19:29:09.981 [error] Lager failed to install handler {lager_syslog_backend,{"test",local1}} into lager_event, retrying later : {error,
{{shutdown,
{failed_to_start_child,
syslog,
"could not load driver syslog_drv: \"cannot open shared object file: No such file or directory\""}},
{syslog_app,
start,
[normal,
[]]}}}
Any suggestion?
thanks to Kenneth Lakin who answered my question in mailing list
IIRC, rebar3 moved the port compiler out to a rebar3 plugin, rather than
packing it in with the core project. From what I've seen, rebar2
projects that relied on it will fail to load their port drivers.
Add
{overrides,
[{override, syslog, [
{plugins, [pc]},
{artifacts, ["priv/syslog_drv.so"]},
{provider_hooks, [
{post,
[
{compile, {pc, compile}},
{clean, {pc, clean}}
]
}]
}
]}
]}.
to a rebar.conf in your project, clean, and rebuild. (The syslog project
is where lager_syslog's port driver lives.)
See also: https://github.com/blt/port_compiler#use-with-existing-dependency

Creating Shortcuts for an Installed Electron Application

I have an electron application for which I use electron-packager to compile and grunt-electron-installer to generate the Windows installer package.
Upon installation I handle the squirrel events like so:
//...
switch (squirrelCommand) {
case '--squirrel-install':
case '--squirrel-updated':
createShortcuts(cleanUp);
break;
//...
and the createShortcuts function just spawns a child process to call the Update.exe (Squirrel.exe) with the --createShortcut=myapp.exe arguments
This works, however, when the shortcut it generated it is named Electron instead of myapp.
I don't see any other ways to specify the output name of the shortcut, so how would I change the generated shortcut to say myapp?
Here is the snippet of the squirrel logs:
2016-03-20 10:34:35> ApplyReleasesImpl: Creating shortcut for myapp.exe => C:\Users\zeus\Desktop\Electron.lnk
2016-03-20 10:34:35> ApplyReleasesImpl: About to save shortcut: C:\Users\zeus\Desktop\Electron.lnk (target C:\Users\zeus\AppData\Local\myapp\Update.exe, workingDir C:\Users\zeus\AppData\Local\myapp\app-0.0.3, args --processStart myapp.exe)
Upon further investigation into electron-packager I found a more detailed explanation about the resource editing here.
using the electron-packager command line I pass these arguments to update the embedded electron exe information:
electron-packager ... --version-string.CompanyName="Company Inc." --version-string.ProductName="Product" ...
The grunt-electron-installer will look for this embedded application information to generate the name for the shortcut.
If you use electron-forge, you may want to try a config that looks like this:
"electronPackagerConfig": {
"icon": "Icon",
"win32metadata":{
"ProductName": "My App",
"CompanyName": "My Company"
}
}
More info here:
https://github.com/electron-userland/electron-forge/issues/89
Try to use electron-builder if you get painful with Squirrel. You can use the command as below to make your installer for Windows:
electron-builder path/to/your-electron-packager-output --platform=win --out=path/to/your-installer-output --config=path/to/builder.json --target=win
Sample content for builder.json:
{
"win": {
"title": "My Production Name",
"icon": "path/to/your-icon.ico",
"version": "1.0.0",
"publisher": "Your Company Name"
}
}
P.s: You must install NSIS and add NSIS path into PATH environment before you run the above command.

Resources