Autodesk Forge: WorkItem failing due to AppPackage Issues

本小妞迷上赌 提交于 2020-08-10 18:53:14

问题


My AppPackage fails to load, and I'm unable to find the exact answer in the documentation or by the error message/code.

I tested the bundle by unzipping it into the "C:\Program Files\Autodesk\ApplicationPlugins" on my local machine, and it runs/loads as expected.

The AppPackage indicates that it is created successfully, which I'm sure is the most up-to-date version.

The addin is a .NET DLL file.

Error Report Message

[02/15/2019 18:44:48] Starting work item ffbcfc1ca50546fc9a6372424b2cdae1
[02/15/2019 18:44:48] Start download phase.
[02/15/2019 18:44:48] Start downloading file <CENSORED>.
[02/15/2019 18:44:48] Start preparing AppPackage <CENSORED>.
[02/15/2019 18:44:48] Download bits and install app to local cache.
[02/15/2019 18:44:48] End downloading file <CENSORED>.
[02/15/2019 18:44:48] End download phase.
[02/15/2019 18:44:48] Error: Failed to prepare app package(s).
[02/15/2019 18:44:48] Error: An unexpected error happened during phase Downloading of job.
[02/15/2019 18:44:48] Job finished with result FailedEnvironmentSetup

PackageContents.XML

<?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage SchemaVersion="1.0" AutodeskProduct="AutoCAD"
                    AppVersion="0.1.0"
                    ProductType="Application"
                    Name="CENSORED"
                    Description="CENSORED"
                    Author="CENSORED"
                    FriendlyVersion="0.1.0"
                    ProductCode="{CENSORED}"
                    UpgradeCode="{CENSORED}"
                    Helpfile="./help.html"
                    Icon="./my-icon.jpeg">

    <CompanyDetails Name="CENSORED" Phone="CENSORED" Email="CENSORED"/>

    <Components>
        <RuntimeRequirements SeriesMin="R22.0" Platform="AutoCAD*" OS="Win64"/>

        <ComponentEntry AppName="CENSORED" Version="0.1.0" ModuleName="./CENSORED.dll" AppType=".Net"
                        AppDescription="CENSORED" LoadOnAutoCADStartup="True">
        </ComponentEntry>
    </Components>

</ApplicationPackage>

Activity Definition: Note I had to manually expand some inline functions here, since I have this broken into multiple parts. If I have a typo, rest assured the code actually runs syntactically.

let activity = <CreateActivityRequest>{
            Id: id,
            Version: 1,
            IsPublic: false,
            AppPackages: ['PACKAGE_NAME'],
            Instruction: {Script: 'D6 '},
            RequiredEngineVersion: '22.0',
            Parameters: {
                InputParameters: [{Name: 'HostDwg', LocalFileName: '$(HostDwg)'}],
                OutputParameters: [{Name: 'output', LocalFileName: `output.json`}]
            },
            HostApplication: undefined,
            AllowedChildProcesses: []
        };

Entry from AppPackages Listing:

{
  References: [],
  Resource: '...',
  RequiredEngineVersion: '22.0',
  IsPublic: false,
  IsObjectEnabler: false,
  Version: 1,
  Timestamp: '2019-02-15T19:32:33.527Z',
  Description: '',
  Id: 'CENSORED'
},

回答1:


Make sure to double check how you zipped the AppPackage you uploaded. If you look inside your zip file, make sure you have a folder with the name PACKAGE_NAME.bundle and the PackageContents.XML file is inside that PACKAGE_NAME.bundle folder.



来源:https://stackoverflow.com/questions/54716079/autodesk-forge-workitem-failing-due-to-apppackage-issues

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!