Troubleshooting¶
Symptoms are grouped by where they show up: the administration UI, the view in the browser, and HTTP calls.
Administration¶
No Applications entry in Global Administration¶
The feature is disabled. Set the global configuration property polarionapp.enabled=true in Global Administration → Configuration Properties and reload. See Enable Applications.
Upload fails with Application's zip structure is incorrect¶
The ZIP does not have exactly one top-level folder named like the identifier, or manifest.json is not directly inside it. Inspect the archive:
unzip -l com.example.hello.zip
The first entries must be com.example.hello/ and com.example.hello/manifest.json. See Package and upload.
Upload fails with Application validation failed¶
A field in manifest.json is missing or a referenced folder/file does not exist. Compare with the manifest reference. Common causes: trailing commas in JSON, rootDirectory not matching the folder name, script not present in server-scripts/.
The Next button stays disabled¶
No file selected, or the selected file is not a .zip.
Views¶
The panel is empty or shows Loading… forever¶
Open the browser console and the network panel, select the iframe.
- 404 on
assets/…: Vite built with absolute URLs. Setbase: './'invite.config.tsand rebuild. - Refused to load … Content Security Policy: the view loads a script or style from an external CDN that the server's CSP blocks. Bundle the dependency.
- No error, page blank: JavaScript crashed before rendering. Look for the exception in the console.
The view says it cannot reach Polarion (Timeout waiting for response to get-context)¶
The page is not embedded by Polarion (opened directly, or on the dev server), or the host page has not initialized the bridge. In Polarion, reload the page. If it persists in a form, check that the applicationView id matches <identifier>.<viewId> exactly.
The form layout was saved but the panel does not appear¶
- Reload the work item page; layouts are cached per session.
- Make sure you edited the layout of the right work item type and the right Polarion View (hat).
- The layout editor ignores text set programmatically (browser extensions, automation). Type or paste the change by hand.
The sidebar is missing from the Show Sidebar menu¶
The application's manifest has no sidebars entry, or the upload failed. Check Properties of the installed application and the manifest in the ZIP.
Already subscribed to event: selection-changed¶
Two subscribe() calls for the same event in one view. Subscribe once at the top level; in React make sure the effect cleanup unsubscribes and calls destroy().
HTTP calls¶
Polarion shows X-Rest-Token generation is not allowed on the server!¶
The dialog appears as soon as an application view opens, because Polarion could not create the REST token for the view. Set com.siemens.polarion.rest.security.restApiToken.enabled=true (and com.siemens.polarion.rest.enabled=true) in polarion.properties and restart. The view still loads, but context.restToken is empty and REST calls fail.
REST call returns 401¶
restTokenis empty: token authentication is not enabled. An administrator must setcom.siemens.polarion.rest.security.restApiToken.enabled=true(andcom.siemens.polarion.rest.enabled=true) inpolarion.propertiesand restart.- The token expired: call
fetchContext()again and retry. - Header name typo: it is
X-Polarion-REST-Token.
REST call returns 403¶
The user is not allowed to perform the operation. Test the same action in the UI with that user. Nothing in the application can change this.
A relationship is missing from a REST response (Cannot read properties of undefined)¶
Sparse field sets filter relationships as well as attributes. Add the relationship name to fields[<type>], for example fields[linkedworkitems]=role,suspect,workItem, otherwise relationships.workItem is absent.
REST call returns 400¶
Usually a malformed query string or an unknown field in fields[…]. Read errors[].detail in the response. Use URLSearchParams to encode parameters.
Server script returns success: false¶
The error string is the message from your script's catch block or from the uncaught exception. Typical: objectId not passed, wrong parameter location (POST parameters must be in the JSON body), or a Java method name that does not exist (check the javadoc).
Endpoint returns HTTP 400 with Argument objectId is missing in workflow definition¶
Every endpoint call needs an objectId parameter (PROJECT/WI-ID). Add it to the query string (GET) or the JSON body (POST).
Endpoint returns arguments.getAsString is not a function¶
The script reads arguments inside a function, where the name means the function's own arguments. Capture Polarion's object at the top level: const scriptArguments = arguments;.
Endpoint returns HTTP 400 with Argument … is missing in workflow definition¶
The script called arguments.getAsString('x') for a parameter the view did not send. Either send it, or read optional parameters through a guarded helper (try { … } catch { return fallback; }), as the traceability example does.
Endpoint POST fails before the script runs¶
POST requests need Content-Type: application/json and a JSON body, even if it is {}. The body must be a flat object whose values are strings: {"objectIds": ["a","b"]} is rejected with HTTP 500 and Expected a string but was BEGIN_ARRAY; send {"objectIds": "[\"a\",\"b\"]"} and parse it in the script.
SELF_SIGNED_CERT_IN_CHAIN when installing the SDK¶
Node.js does not trust the server's certificate. Point NODE_EXTRA_CA_CERTS at your CA bundle, or download the tarball with a browser and install it from disk.
Where to look¶
| Place | What you find |
|---|---|
| Browser console (iframe frame) | JavaScript errors, CSP violations, your own logs |
Browser network panel, filter apps/ | Static file 404s, endpoint responses |
https://<host>/polarion/apps/<identifier>/views/<viewId> | The raw view outside Polarion |
Polarion server log (data/logs/main/log4j-*.log) | Server script exceptions, upload validation details |
| Global Administration → Applications → Properties | What is actually installed |
