3DViewer Widget Initialization Error (registerPlaneSelectionEvent) and TC Connector JSON Parse Failure during JT File Retrieval

0
Hi Team,We are encountering issues while initializing the custom 3DViewer widget in our Mendix application (Studio Pro 10.24.27 connected to Teamcenter via TC Connector - 2512.1.3).1. Frontend Issue (enableSectionManipulator)When enabling "enableSectionManipulator": true in the advanced configuration for the 3DViewer widget, the viewer fails during initialization with the following JavaScript error:- Error: TypeError: this[al].registerPlaneSelectionEvent is not a function- Location: viewer.js?639300020028473388:112:1880662. Backend Issue (GetFileReadTickets / TC Connector)When attempting to load JT files from the Teamcenter server, a backend error occurs during the GetFileReadTickets SOAP/SOA call- Error: Failed to parse JSON from Teamcenter / File download failed- Studio Pro Logs: Visible under the viewer3d_httpRouter and TcConnector log nodes showing failed service operations.Could you please help us investigate both root causes? We can share more logs or jump on a quick sync if needed.Thanks!
asked
2 answers
0

Hey Rohith,

"registerPlaneSelectionEvent is not a function" usually means the widget and the viewer library underneath it are different versions. Make sure your 3D Viewer widget and Teamcenter modules are versions that work together. Turn off enableSectionManipulator to check that this is the cause.

For the JSON parse error, Teamcenter is probably sending back an error page instead of JSON. That often happens when the login session has expired or the URL is wrong. Turn on debug logs to see what actually comes back.

answered
0

Hi Rohith,

I would troubleshoot these as two independent issues because the frontend initialization error and Teamcenter file retrieval failure occur in different components.

1. 3DViewer – registerPlaneSelectionEvent is not a function

The error appears when enableSectionManipulator is enabled.

According to the Mendix 3D Viewer documentation, this setting enables the trihedron drag handle for section planes.

First, test the following configuration:

{
  "enableSectionManipulator": false
}

If the viewer initializes successfully, this isolates the issue to the SectionManipulator initialization path.

If you still need section-plane manipulation, try the documented alternative:

{
  "enableSectionManipulator": false,
  "enableSectionHandle": true
}

enableSectionHandle provides a different drag-handle mechanism, although it is not a full replacement for the trihedron manipulator.

Since registerPlaneSelectionEvent is not available on the object being called, verify that the installed 3DViewer widget and its underlying viewer libraries are compatible.

I would avoid modifying the generated viewer.js bundle directly. If the error persists with the supported configuration, report the widget version and JavaScript stack trace to the 3DViewer maintainers.

Reference:
https://docs.mendix.com/appstore/industry/3d-viewer/advanced-configuration/

2. Teamcenter Connector – JSON parsing and JT file download

The error:

Failed to parse JSON from Teamcenter
File download failed

needs to be investigated at the Teamcenter service-response level.

The connector uses Teamcenter's getFileReadTickets service for file retrieval.

I recommend these checks:

  1. Verify that the Dataset object has a valid Teamcenter UID and that the requested JT file is accessible to the authenticated user.

  2. Check the Teamcenter Host URL and Teamcenter FMS URL in the connector configuration.

  3. Confirm that the Mendix runtime can reach both the Teamcenter web tier and the configured FMS endpoint.

  4. Check the HTTP status code and response content of the failing Teamcenter service call. An authentication redirect, HTML error page, or proxy response can cause JSON parsing to fail.

  5. Enable detailed logging temporarily for TcConnector and Web_TierRest_httpRouter, then reproduce the issue.

  6. Add error handling to the Teamcenter service microflow and capture the complete exception, including any nested cause.

3. Important check for Connector 2512.1.3

The 2512.1.3 release includes changes to Teamcenter file download handling and FMS client libraries.

If you use Teamcenter X authentication, this release also includes a fix for file downloads.

Therefore, verify the actual authentication method and FMS configuration before changing connector versions.

Recommended isolation test:

First, disable SectionManipulator and confirm that the viewer initializes.

Then test the same JT file through the Teamcenter Connector's file-download functionality independently of the 3DViewer.

  • If the file download fails independently, focus on Teamcenter authentication, service responses, and FMS connectivity.

  • If the download succeeds but the viewer still fails, focus on the 3DViewer integration and widget compatibility.

  • If both tests succeed separately, investigate the integration flow between the connector and viewer.

This will identify which component needs correction without introducing unrelated changes.

References:

Hope this helps! If you find this answer helpful, please mark it as the accepted answer.

answered