Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Openshift Kuberenetes failing with java script Exeception - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Openshift Kuberenetes failing with java script Exeception
KB0851914

Openshift Kuberenetes failing with java script Exeception


637 Views Last updated : Apr 8, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

1.Login into the application as admin user.
2.Run openshift kubernetes discovery.
3.Check OpenShift Kubernetes discovery works fine.

Actual:
OpenShift Kubernetes discovery fails with JAVASCRIPT_CODE_FAILURE due to getcredentials function not having enough arguments.
Make YAML Extension last one to execute.

Expected:
OpenShift Kubernetes discovery works fine.
except YAML extension all extensions should be participate in discovery along with main pattern.

Release

app-itom-patterns-1.0.65-app.zip

Cause

The following function at line 13 in the script include KubernetesCommandMetadata expecting following arguments.

getCredentials: function(managementIp, credId, tag,contentType) 

But in the OpenShift Get Call Custom operation having only 3 arguments.

getCredentials(host, null, credsAlias);

This is causing Java script Error in custom operation


Resolution

  1. Login into the application as admin user.
  2. Go to Pattern Designer --> Custom Operations.
  3. Open OpenShift Get Call Custom operation.
  4. Replace line number 41 with following workaround code snippet.

Line Number 41:

var creds = scriptInit.getCredentials(host, null, credsAlias);

workaround code snippet :

var contentType = "accept:application/json";
var creds = scriptInit.getCredentials(host, null, credsAlias,contentType);



The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • Cookie Preferences
  • © 2025 ServiceNow. All rights reserved.
We use cookies on this site to improve your browsing experience, analyze individualized usage and website traffic, tailor content to your preferences, and make your interactions with our website more meaningful. To learn more about the cookies we use and how you can change your preferences, please read our Cookie Policy and visit our Cookie Preference Manager. By clicking “Accept and Proceed,” closing this banner or continuing to browse this site, you consent to the use of cookies.