Common Package and Deployment Errors

  • 16 February 2021
  • 0 replies
  • 609 views

Badge +5
 

Common Package and Deployment Errors

KB003567

PRODUCT
K2 Cloud
K2 Five
K2 blackpearl

 

This article describes common errors that you may encounter when using the Package and Deployment tool. The table displays the error message, a screenshot of the error where available (click on the thumbnail to view a larger image), why the error occurs, and possible resolutions and troubleshooting steps.

See the Package and Deployment topic in the product documentation for information on using the Package and Deployment tool. You may also want to review the article KB003588: K2 Package and Deployment Scenarios for examples that describe common uses of the Package and Deployment tool. 

Error Error screen Why does this error occur? Troubleshooting steps
Slow performance when packaging or deploying items     Upgrade to the latest version of K2 or install the latest fix pack for your version of K2.
If you are using K2 Cloud obtain the latest version of the P&D tool - see KB002316 for instructions.
Slow performance on the Analyze section of the Package and Deployment tool     An issue was fixed in K2 Cloud Update 11 Fix pack 13 and K2 Five 5.3 April 2020 Cumulative Update Fix Pack 3. Make sure your environments are updated with the latest version of K2.
Form is referencing the [propertyname] property on the [viewname] View that could not be found The referenced property on the view cannot be found because the Form cannot see the property. A possible reason for this is because the View was edited and the property was removed. Ensure that the referenced view exists on the source and target environments. Open the view or form on the source environment designer, and check that there are no validation errors. If there are validation errors, correct the errors, repackage, and deploy.
Missing Reference
  • In general, if there is a missing reference error, check that there are no errors or incorrect mappings on the source, remap accordingly and repackage and deploy
  • For Missing Reference workflow errors, the Workflow could be pointing to the wrong or missing SmartObjects, Views, and Forms
  • If there is a missing reference error, check that there are no errors or incorrect mappings on the source
  • Check if the workflow on the source is referencing the correct SmartObjects, forms, and views. Remap if required, package and deploy again on target
  • Check if the artifacts to be deployed are part of a SharePoint solution (even if only in the form or subform references). In the case where artifacts to be deployed are part of a SharePoint solution, all the SharePoint solution SmartObjects must be included in the package to add the required references. Depending on the scenario, you do not necessarily need to deploy all the SmartObject artifacts included in the package to the target environment, but including all the referenced artifacts will help to mitigate the missing reference error. 
Process is referencing the [SmartObject, view, forms] that could not be found   The process cannot see the referenced SmartObject, view, form, or rule as the item in error has been removed, changed, or disabled. To fix the issue with SmartObject, view, or form: check the items reported in the error in the source environment, fix the broken references on the object and then repackage and deploy again. 
Missing required SharePoint related item

This most likely is the result of having manually removed either the list or library SmartObject, service object, or workflow related items when the package was created.

  • Check the source and target environment SharePoint List or Libraries to make sure no columns or fields were removed. If so, add them back. The SharePoint Lists or Libraries in the package must match the target and source environments SharePoint Lists or Libraries.
    Some columns in SharePoint Lists or Libraries are hidden by default. Check the List or Libraries and make sure hidden columns match on the source and target SharePoint List or Libraries before packaging and deploying.
  • If your SmartObjects are affected, check that the system name is correct for those SmartObjects and point them to the right SharePoint site URL
  • Check if the artifacts to be deployed are part of a SharePoint solution (even if only in the form or subform references). In the case where artifacts to be deployed are part of a SharePoint solution, all the SharePoint solution SmartObjects must be included in the package to add the required references. Depending on the scenario, you do not necessarily need to deploy all the SmartObject artifacts included in the package to the target environment, but including all the referenced artifacts will help to mitigate the error. 
ServiceObject is referencing the [fieldname] Field that could not be found
  • This can happen when creating service objects and their associated service instances and SmartObjects using the SmartObject tester tool
  • For K2 Cloud Package and Deployment objects based on O365 (SharePoint) SmartObjects, Package and Deployment may not have had a Microsoft Online AppOnly token to access SharePoint Online
  • The field may exist in the source environment but not on the target environment. The field may also only be present on new SharePoint Document libraries and may not in older libraries
  • The field may have existed on the SharePoint Document library but no longer does, which can cause the error
  • A possible troubleshooting solution is to restart the K2 Service
  • The issue can be caused when the user running Package and Deployment has not been issued with a Microsoft Online AppOnly Token to access SharePoint Online.
  • To generate a Token, please use the following steps:
    1. Open SmartObject Tester Tool as the same user account attempting to create the Package.
      The SmartObject tester Tool is only available on K2 Five or earlier and K2 Platform Classic
    2. Execute any of the SharePoint Online list/library related SmartObjects.
    3. A prompt should display stating: Please retry the operation after successful OAuth Authorization.
    4. A browser window will display for Microsoft Online Login.
    5. After signing in, an “Authorization Successful” message will display.
    Alternatively use the following steps:
    1. Open SmartObject Tester Tool as the same user account attempting to create the Package.
    2. Create a new SQL Server Service Instance.
    3. For Authentication Mode, Select OAuth.
    4. For OAuth Resource, select the MSOA – [GUID].
    5. For “Database – Required”, enter any text. Click Next
    6. A prompt should display stating: Redirecting for Authorization. Retry after successful authorization.
    7. A browser window will display for Microsoft Online Login.
    8. After signing in, an “Authorization Successful” message will display.
    9. The Add Service Instance can be canceled at this point.
    10. These steps would have created the required AppOnly Token and Package and Deployment will be able to successfully package the SharePoint Online SmartObject.
  • Ensure the source and target SharePoint Document libraries are in sync
  • Refresh and regenerate the SmartObjects on the SharePoint Artifacts page. Make a backup of the SmartObjects before applying this resolution 
Insufficient rights detected. Unable to Continue To package and deploy K2 Solutions you need View rights to all K2 objects you want to package. The Package and Deployment role grants its members global view rights, however, membership in this role does not override any Deny rights. If you have view rights denied to any item in the category system, you are prompted to update permissions to view the item or items. The Package and Deployment role grants its members global view rights, however, membership in this role does not override any Deny rights.
If you have View rights denied on any item in the category system, you are prompted to update permissions to view the item or items.
To set this in K2 Management, go to Categories and select the K2 object. In the Security section, add the user and set View rights to Allow. This ensures that when dependencies are checked, Package and Deployment knows whether items exist (and need to be updated) or do not exist (need to be created). For more information on permissions on K2 objects, see the K2 Objects section in the Authorization Framework Overview topic.
30008 'K2:[Domain][username]' does not have export rights The user attempting to package and deploy  K2 solutions does not have Export rights in the  K2 environment. To package and deploy K2 solutions you need Export rights. To set this in K2 Management, go to the Workflow Server node, and then Server Rights, and assign Export rights to the user.
For more information on Package and Deployment permissions, see the Package and Deploy Considerations topic.
Changes not deployed to the target environment but no errors appear   Referenced Items were not created with the option to include referenced items as Included Items and were created with the Referenced Items option instead. The package on the source environment must be created with the option to include referenced items as Included Items, not Referenced Items.
SmartObject is referencing the [serviceobject name] ServiceObject that could not be found This error occurs when a SharePoint list is renamed.  All SmartObjects and the solution would operate normally at runtime.  There are no error badges in the SmartForms Designer. Revert the renamed SharePoint List name to the original name. If you cannot revert to the original name:
  1. Locate the SharePoint list(s) associated with the error.
  2. Go to the K2 settings page for the list.
  3. Delete all existing SmartObjects.
  4. Regenerate the SmartObjects using the K2 list settings page.
  5. Create the package.  The original error is gone, but any views/forms that reference the original SmartObjects show an error in P&D.  "Form [name] is referencing SmartObject Property [name] on SmartObject Unknown."
  6. Use the designer to edit each affected view and form.  No error badges will appear.
  7. View each rule shown in the P&D error details.
  8. Simply viewing the rules reconnects them with the right SmartObject name.
  9. Save the form/view and check-in each item.
  10. You should now be able to create the P&D package.
The [Process_Name] Process is referencing the [property_name] property on the [SMO_Name] SmartObject that could not be found   Known issue Re-add the property and package and redeploy
Method could not be resolved  
  • Deploying a package to a target environment which has a different K2 version or Fix Pack from the source environment can cause the 'Method could not be resolved' error
  • The Package and Deployment tool could be out of sync with the server where the package is being deployed to
  • Ensure that the source and target environments are on the same K2 version or Fix Pack
  •  Ensure that you have updated Client Machines where the Package and Deployment / Client tools are installed.
  • If you are using K2 Cloud, obtain the latest version of the P&D tool - see KB002316 for instructions.
Property is missing from the selected object  
  • The issue can occur due to a mismatch in the SharePoint Library settings between the source and target machines
  • Using ShareGate to duplicate SharePoint lists from classic to modern templates can cause the issue to occur
  • Enable the Major Version setting on the Library, re-create the package and deploy to the target environment
  • Make sure the target library matches the source library, re-create the package and deploy to the target environment
Does not have SmartObject publish rights   The user does not have publishing rights on the SmartObjects in the package.
  • Use K2 Management site to assign the publishing user Publish rights on the SmartObject/s in the package. 
  • Use K2 Management site to manage SmartObject Security on the SmartObject. 
Pointing to an external reference that does not exist   Known Issue Ensure you have the latest K2 version or Fix Pack installed. If you are using K2 Cloud, obtain the latest version of the P&D tool - see KB002316 for instructions.
Could not load type 'SourceCode.Deployment.Management.ISession' from assembly 'SourceCode.Deployment.Management'   This occurs when you run the Package and Deployment tool on a machine that has K2 or K2 client components installed that are not the same version as the K2 version on the K2 server. You can uninstall the Client Tools to resolve the issue or ensure the Client Tools and K2 are on the same version by installing the correct version of K2 and Client Tools.
The SmartObject SMO_NAME or one of its components could not be resolved. Error Details: ServiceObject definition does not contain method. ServiceObject [SERVICEOBJECT_NAME]: Method : [METHOD_NAME].   This issue occurs when one environment has a lowercase schema in SQL and the other environment has the same schema, but capitalized (i.e. test vs. TEST). Ensure the schema names in both environments are exactly the same. To resolve the issue, delete the problem methods on the SmartObject, and then recreate them.
Object reference not set to an instance of the object   The XML in the packaged objects could be referencing missing objects. An issue was fixed in K2 Cloud Update 11 Fix pack 13 and K2 Five 5.3 Fix Pack 35. Make sure your environments are updated with the latest version of K2.
A type with the same name and namespace already exists in the model. name = '[PropertyFieldName]' and namespace 'urn:[ViewName]#Sources.[GUID.Fields]   An orphaned control on a view in a package can cause this error to display. To resolve this error, change the orphaned control in K2 Designer to another control, for example, a Data Label control. Change the control back to the original control, map the data source for the control if required. Save and check in the view, recreate the package, and deploy to the target environment.
System.Exception: Following properties duplicated: [SmartObject Property Name]. SmartObject: [SmartObject Name]   Different column names between source and target SharePoint environments can cause the error. To resolve this error, ensure column names on the source and target environments are the same. Repackage on the source environment and redeploy to the target environment.
Conflicts: System Name   A mismatch between GUIDs on the source and target environments can cause this error. This happens when the non-SharePoint artifacts are included in a package with SharePoint Lists. There are two options to resolve this error:
  • Don’t include non SharePoint related items in a package with SharePoint artifacts.
  • Include the same SharePoint SmartObjects and don’t include them By Reference. They need to be included in the package. All the other forms and views can be packaged By Reference, but the SharePoint SmartObjects must be packaged. When they are included you see the mapping screen during deployment and the tool refactors the GUIDs and then the system name and GUIDs of the SmartObjects will match and not be in conflict.
Primary Credentials Not Authenticated. Session Not Authenticated   The issue can occur by an incorrect password for the K2SQL account set in the HostServer and WorkflowServer database connection strings

To resolve this error, follow the steps below:

  1. Copy the K2HostServer.exe.config from "K2 blackpearlHost ServerBin" to "C:Temp". Create a Temp folder in C-drive beforehand
  2. Rename the config file to web.config
  3. Open a command prompt and change the directory to "C:WindowsMicrosoft.NETFrameworkv2.0.50727"
  4. Run the following command:
    > aspnet_regiis -pdf "connectionStrings" C:Temp
  5. Open the web.config in "C:Temp"
  6. Locate the following strings under the connectionStrings section and change the password accordingly:

    <add name="HostServer" connectionString="Integrated=False;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=Fals 
    e;Host=BLACKPEARL;Port=5555;UserID=Admin;Password=k2pass;SecurityLabelName=K2SQL;AuthData=1" />

    <add name="WorkflowServer" connectionString="Integrated=False;IsPrimaryLogin=True;Authenticate=True;EncryptedPassword=Fals 
    e;Host=BLACKPEARL;Port=5555;UserID=Admin;Password=k2pass;SecurityLabelName=K2SQL;AuthData=1" />

     

  7. Save the file
  8. Rename web.config to K2HostServer.exe.config and replace the current config file in "K2 blackpearlHost ServerBin"
  9. Restart the K2 Service

 

 


0 replies

Be the first to reply!

Reply