Home Search

DriveWorks Pro 22
How To: Troubleshoot The Integration Theme (KB21060901)

Send Feedback

How To: Troubleshoot The Integration Theme

This article gives common errors and solutions when running the Integration Theme.

Before Starting To Troubleshoot

Before modifying any files, try the following to ensure your browser is serving the latest version:

  • In your browser, type Ctrl + F5 to hard refresh.

    This will make sure any external files are updated with the latest changes.

  • Try in an incognito window for a fresh cache.

    If this resolves the issue there will be a file cached in the main browser.

  • Check for trailing slashes in URLs written to the config.js file.

    In older versions of DriveWorks (before v18.1), a trailing slash in the supplied server url (serverUrl in config.js of the examples) can trigger errors, by doubling up in requests (for example //api).

    Remove the slash at the very end in the config values.

  • Check the DriveWorksConfigUser.xml file is valid by restarting DriveWorks Live.

    If any validation errors are found, a warning will be logged on-screen (Live) or in the console (manually running the .exe)

    To resolve errors, review C:\ProgramData\DriveWorks\<version>\Live\Themes\Integration\DriveWorksConfigUser.xml

  • Manually clear any locally stored session id:
    1. In your browser, open Dev Tools (F12).
    2. Click "Application", and expand "Cookies" from the Storage section.
    3. Click the current url in the list, and select "s" from the cookie list.
    4. Press the Delete key to remove this entry.
    5. Refresh the page to generate a new sessionId.
    6. For some of our shipped multi-page examples, the session id may also be stored under "Local Storage" (usually as "sessionId").
    7. As with cookies, select the item and press the Delete key to remove it.

Common Console Errors

When encountering issues with the Integration Theme, we recommend checking your browser's console (F12) for any error messages.

If no error message is shown, refresh the page (F5) with dev tools open to ensure any errors are being captured.

These messages help to determine root causes of any issues.

Search this page (Ctrl + F) for the error message you are presented with in the console (F12).

Partial string searches may be required (not every possible error message is listed, but most overlap).

The characters '###', listed in the messages below, refer to names that are specific to your implementation. Do not include any implementation specific naming when searching for the error.

Key

The messages below are prefixed with the following icons:

- denotes a console error.

- denotes a console warning

GET DriveWorksLiveClient.min.js - "EER_SSL_PROTOCOL_ERROR"

Cause:

The file is being requested over HTTPS where HTTPS is not supported.

Solution:

Try the following to resolve:

  • Ensure your server is configured correctly to serve over HTTPS.
    This is the recommended secure protocol.
  • Try using http:// rather than https:// in the <script> tag src attribute.
    A good way to test this is to open the URL in your browser, and see what loads.

POST /login - "EER_SSL_PROTOCOL_ERROR"

Cause:

The server is being requested over HTTPS where HTTPS is not supported.

Solution:

Try the following to resolve:

  • Ensure your server is configured correctly to serve over HTTPS.
    This is the recommended secure protocol.
  • Check the path to the serverUrl is also using the correct protocol.

    This protocol should match the <script> loading DriveWorksLiveClient.min.js to avoid a warning.

    A good way to test this is to open the URL in your browser, and see what loads.

POST /login - "ERR_CONNECTION_TIMED_OUT"

Cause:

A connection cannot be made to the supplied server url, being either invalid or offline.

Solution:

Try the following to resolve:

  • Confirm the correct server url is being used for new DriveWorksLiveClient (serverUrl in config.js of examples).
  • Check DriveWorks Live or PWE is running and has not crashed.

POST /login - "EER_NAME_NOT_RESOLVED"

Cause:

The serverUrl declared in the config.js file is incorrect.

Solution:

Try the following to resolve:

  • Confirm the correct server url is being used for new DriveWorksLiveClient (serverUrl in config.js of examples).

"The DriveWorks Live client library and Integration Theme host URL protocols do not match. This may lead to mixed content warnings and errors."

Cause:

The protocol (http/https) used for the client library (DriveWorksLiveIntegrationClient.min.js) does not match the server url provided to the client.

Solution:

  • Ensure these protocols match by checking the <script> tag and serverUrl in your config/passed directly into the client constructor - new DriveWorksLiveClient(serverUrl).

"Error: Cannot create connection without logging in first."

Cause:

A method has been run without a valid connection (for example createSpecification BEFORE loginGroup).

Solution:

Try the following to resolve:

  • Ensure loginGroup has been run and a valid session created before attempting to run further methods.
  • Ensure the serverUrl passed to loginGroup is correct, and available.

"Uncaught TypeError: window.DriveWorksLiveClient is not a constructor"

Cause:

DriveWorksLiveIntegrationClient.min.js could not be loaded, so the browser does not understand new window.DriveWorksLiveClient(). This is required to run any SDK function.

Solution:

Try the following to resolve:

  • Check the protocol in the <script> tag loading this. Is it HTTPS when it should be HTTP?
  • Check the domain/url in the <script> tag. Is it correct?
  • Is the right port being used?

    PWE Default: http://localhost:5000

    Note: do not confuse this with 5500, which is the port for VS Code's Live Server plugin.

    Live Default: http://your-machine-name:8020

  • Try opening the path you are trying to load in a browser. If it is correct, you should see a large code file.

"Uncaught TypeError: Failed to construct 'URL': Invalid URL at new e (DriveWorksLiveIntegrationClient.min.js:2)"

Cause:

The Application Pool is not running.

Solution:

  • Ensure the Application Pool associated to the site has been started.

    This can be done from:

    • Internet Information Services (IIS) Manager in Windows.

      Select Application Pools, then select the pool associated to the site and click Start from the Actions pane.

    • IIS Management in DriveWorks Live.

      Launch DriveWorks Live and select IIS Mangement from the task explorer. Select the tile for the Application Pool associated to the site and click the Start button.

"The Integration Theme host URL is null or empty. Please ensure that the DriveWorks Live client is initialized correctly and try again."

Cause:

The Application Pool is not running.

Solution:

  • Ensure the Application Pool associated to the site has been started.

    This can be done from:

    • Internet Information Services (IIS) Manager in Windows.

      Select Application Pools, then select the pool associated to the site and click Start from the Actions pane.

    • IIS Management in DriveWorks Live.

      Launch DriveWorks Live and select IIS Mangement from the task explorer. Select the tile for the Application Pool associated to the site and click the Start button.

"401 (Unauthorized) / Error: 401 Unauthorized The session was not found for the supplied group."

Cause:

One or a combination of any of the following could be occurring.

  • Never logged in

    Solution:

    Ensure to login at least once before any other requests.

  • Session-id no longer valid (If your session timeout kicked-in, live restarted, an admin kicked you out, etc.)

    Solution:

    Need to login again or clear any locally stored session (see Handy Tips above) and refresh the page.

  • Session-id could not be stored due to cross-domain cookies being blocked

    Solution:

    Fix persistent 401 Unauthorized errors (SameSite errors).

  • Session-id was not sent over in headers

    Solution:

    Ensure session-id is sent as part of requests headers if making manual requests (for example via Postman).

  • Site and Config.js URL do not match

    Solution:

    Ensure the site URL matches the one specified in the Config.js serverURL setting. LocalHost will not resolve to machine name.

  • If you are using IIS it will resolve to local host

POST /login 404 - "Error: 404 A group could not be found with the alias provided."

Cause:

  • The Group Alias passed is incorrect or does not exist.
  • Connection between the machine hosting the site and DriveWorks Pro Server is blocked.

Solution:

  • Check your DriveWorksConfigUser.xml is valid, and contains the Group Alias being used.

    Restart DriveWorks Live to check XML is valid.

    See Integration Theme Settings - Connection Settings for more information.

  • Confirm connection to the DriveWorks Pro Server machine is not blocked by launching DriveWorks Live (on the machine hosting the site) and opening the required Shared Group.

POST /login 404 - "Error: 404 Unable to find a group with the name '###'."

Cause:

Invalid XML config, or .drivegroup moved (different path for individual or different Pro Server for shared) specified in DriveWorksConfigUser.xml.

Solution:

POST /Specifications/'###' 404 / "Error: 404 The Project could not be found. Please ensure that the Project still exists."

Cause:

Invalid Project name supplied to method.

Solution:

Try the following to resolve:

  • Check the Project name provided (inline or from a config file) is correct, and is available to the current user's team permissions.

    See Integration Theme Settings - Permissions for more information.

  • Check normal DriveWorks security.

GET /Specifications/'###' 404 / "Error: 404 A Specification could not be found with the Id provided."

Cause:

A Specification could not be found with the Id provided.

Solution:

Try the following to resolve:

  • Supply a valid Specification id. This is a numerical value, e.g. 3245, and does not include the 'name' of the Specification.
  • Check normal DriveWorks security.
  • Check Specification Flow security.

"Error: 404 The action '###' could not be found." "Failed to load resource: the server responded with a status of 404 ()" - /Transitions/'###'

Cause:

That action (Transition/Operation) is no longer available server side - as the state of the Specification has changed.

Solution:

Try the following to resolve:

  • Grab the latest Actions (getSpecificationActions) and run one of the available actions returned.
  • Check normal DriveWorks security.
  • Check Specification Flow security.

"Error: The HTTP request cannot be sent as you do not have the latest version of '###'. The request has been cancelled. You must have the latest version to update the requested resource."

Cause:

The Constant/Transition/Operation has never been requested, or has changed server side since it was last requested, so it's eTag does not exist or no longer matches the locally stored copy.

Solution:

  • Get the latest value (and up-to-date eTag) BEFORE updating/invoking.
    • Constant - getSpecificationConstantByName
    • Transition - getSpecificationTransitionByName
    • Operation - getSpecificationOperationByName

GET /Constants/'###' 404 - "Error: 404 Not Found A Constant could not be found with the name provided."

Cause:

A Constant with that name could not be found - either due to not existing, or access not being permitted.

Solution:

  • Ensure the Constant name is valid and exists in the Project, and that the Constant is permitted for access (read/write) through DriveWorksConfigUser.xml.

    See Integration Theme Settings - Permissions for more information.

POST /Constants/'###' 403 (Forbidden) - "Error: 403 Forbidden You do not have permission to edit the Constant 'DWConstant123'."

Cause:

The Constant exists and is available, but editing is not permitted (via updateConstantValue).

Solution:

Try the following to resolve:

  • Set canEdit="true" for the Constant in the DriveWorksConfigUser.xml.
  • Ensure the team of the current user has edit access to this Constant.

    See Integration Theme Settings - Permissions for more information.

POST runMacro/'###' 404 - "Error: 404 Not Found The Macro name is unknown or invalid."

Cause:

A Macro with that name could not be found - either due to not existing, or running not being permitted.

Solution:

  • Ensure the Macro name is valid and exists in the Project, and that the Macro is permitted to be run through DriveWorksConfigUser.xml.

    See Integration Theme Settings - Permissions for more information.

GET /DriveWorksLiveClient.min.js - "ERR_CONNECTION_REFUSED"

Cause:

The site cannot locate the Integration Theme API endpoint.

Solution:

Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure stylesheet

Cause:

Resources are being loaded over HTTP when the site is using HTTPS.

Solution:

Try the following to resolve:

  • Ensure all resource URLs are returned using the HTTPS scheme, this is applied in the DriveWorksConfigUser.xml file with the setting httpsForceSslOnResources.

Mixed Content: The page at '<URL>' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint

Cause:

Resources are being loaded over HTTP when the site is using HTTPS.

Solution:

Try the following to resolve:

  • Ensure all resource URLs are returned using the HTTPS scheme, this is applied in the DriveWorksConfigUser.xml file with the setting httpsForceSslOnResources.

Page Errors

Service Unavailable HTTP Error 503. The service is unavailable.

Cause:

The web page will display the following when the Application Pool (in IIS) is not running or has incorrect permissions.

Solution:

  • Open Internet Information Services (IIS) Manager on the machine hosting the site.

    Select Application Pools and then select the Application Pool created for the site from the main window.

    Select Start from the Actions list on the right hand side.

  • To check permissions:

    Open Internet Information Services (IIS) Manager on the machine hosting the site.

    Select Application Pools, right click the Application Pool created for the site from the main window, and select Advanced Settings.

    Ensure the identity field is a user with valid permissions.

Implementation Errors

3D Preview Box displays the message "Object reference not set to an instance of an object."

Cause:

The 3D Preview Box control will display the above message when the property Enable Image Mode is set set to True and the Application Pool Identity (in IIS) has incorrect permissions.

Solution:

Ensure the Application Pool Identity is a Windows User that does not have administrative privilege's.

A problem occurred running the task Create Preview Image. The 3D Preview was unable to generate a screenshot. This may be caused by an unsupported environment.

Cause:

The Create Preview Image task will cause the above message (in a Specification Report) when the Application Pool Identity (in IIS) has incorrect permissions.

Solution:

Ensure the Application Pool Identity is a Windows User that does not have administrative privilege's.


Knowledge Base Article Ref:KB21060901