Bug 1888870 - JS error when using autocomplete in YAML editor
Summary: JS error when using autocomplete in YAML editor
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.7
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.7.0
Assignee: Josh Pinkney
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-10-16 02:02 UTC by Yadan Pei
Modified: 2021-02-24 15:26 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-24 15:26:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 7167 0 None closed Bug 1888870: Remove resolveCompletionItem from yaml editor since it's not needed 2021-01-14 12:43:49 UTC
Red Hat Product Errata RHSA-2020:5633 0 None None None 2021-02-24 15:26:53 UTC

Description Yadan Pei 2020-10-16 02:02:18 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Launch a testing cluster with cluster-bot, login to console after cluster is ready
launch https://github.com/openshift/console/pull/6483 aws
2. Try to add some content via + 'Import YAML' function, add following lines, and use autocompletion(Ctrl + Space) for some property, such as 'kind' , 'metadata'
apiVersion: v1
kind: Secret
metadata:
  name: testsecret
  namespace: test


Actual results:
2. We can see JS errors: e.completion.label is undefined and e.item is undefined

Uncaught Error: e.completion.label is undefined
getAriaLabel@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2217938
6218/Z</e.prototype.renderElement@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:770708
6218/G</e.prototype.renderElement@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:770184
6219/x</e.prototype.insertItemInDOM@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:793325
6219/x</e.prototype._splice@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:789544
6219/x</e.prototype.splice@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:788073
8750/i</e.prototype.splice/<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:1865660
8750/i</e.prototype.splice@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:1865631
6218/X</e.prototype.splice/<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:777055
4137/g</e.prototype.bufferEvents@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:15959
6218/X</e.prototype.splice@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:777011
8834/Y</e.prototype.onListFocus/<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2222571
promise callback*a/</e.prototype.then@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:83909
8834/Y</e.prototype.onListFocus@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2222483
e/<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2218842
4137/h</e.prototype.fire@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:13681
n/</<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:8180
4137/g</e.prototype.wrapEvent/</<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:15863
4137/h</e.prototype.fire@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:13681
6218/k</e.prototype._set@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:754739
6218/k</e.prototype.set@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:754540
6218/X</e.prototype.setFocus@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:778238
8834/Y</e.prototype.showSuggestions@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2225162
e/<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2172065
4137/h</e.prototype.fire@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:13681
8831/v</e.prototype._onNewContext@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2197458
8831/v</e.prototype.trigger/<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2195500
    unexpectedErrorHandler 6-chunk-996ea856c3e53afc4be2.min.js:1
    setTimeout handler*e/this.unexpectedErrorHandler 6-chunk-996ea856c3e53afc4be2.min.js:1
    onUnexpectedError 6-chunk-996ea856c3e53afc4be2.min.js:1
    o 6-chunk-996ea856c3e53afc4be2.min.js:1
    promise callback*8834/Y</e.prototype.onListFocus 6-chunk-996ea856c3e53afc4be2.min.js:1
    e 6-chunk-996ea856c3e53afc4be2.min.js:1
    fire 6-chunk-996ea856c3e53afc4be2.min.js:1
    n 6-chunk-996ea856c3e53afc4be2.min.js:1
    wrapEvent 6-chunk-996ea856c3e53afc4be2.min.js:1
    fire 6-chunk-996ea856c3e53afc4be2.min.js:1
    _set 6-chunk-996ea856c3e53afc4be2.min.js:1
    set 6-chunk-996ea856c3e53afc4be2.min.js:1
    setFocus 6-chunk-996ea856c3e53afc4be2.min.js:1
    showSuggestions 6-chunk-996ea856c3e53afc4be2.min.js:1
    e 6-chunk-996ea856c3e53afc4be2.min.js:1
    fire 6-chunk-996ea856c3e53afc4be2.min.js:1
    _onNewContext 6-chunk-996ea856c3e53afc4be2.min.js:1
    trigger 6-chunk-996ea856c3e53afc4be2.min.js:1
6-chunk-996ea856c3e53afc4be2.min.js:1


Uncaught Error: e.item is undefined
8841/s</e.prototype._onItem@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2250318
e/<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2249955
4137/h</e.prototype.fire@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:13681
8834/Y</e.prototype.show/<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2228399
4165/f</e.prototype.cancelAndSet/this._token<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:86031
setTimeout handler*4165/f</e.prototype.cancelAndSet@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:85997
8834/Y</e.prototype.show@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2228323
8834/Y</e.prototype.setState@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2223942
8834/Y</e.prototype.showSuggestions@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2225118
e/<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2172065
4137/h</e.prototype.fire@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:13681
8831/v</e.prototype._onNewContext@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2197458
8831/v</e.prototype.trigger/<@https://console-openshift-console.apps.ci-ln-ywvhbm2-d5d6b.origin-ci-int-aws.dev.rhcloud.com/static/6-chunk-996ea856c3e53afc4be2.min.js:1:2195500
    unexpectedErrorHandler 6-chunk-996ea856c3e53afc4be2.min.js:1
    setTimeout handler*e/this.unexpectedErrorHandler 6-chunk-996ea856c3e53afc4be2.min.js:1
    onUnexpectedError 6-chunk-996ea856c3e53afc4be2.min.js:1
    o 6-chunk-996ea856c3e53afc4be2.min.js:1
    fire 6-chunk-996ea856c3e53afc4be2.min.js:1
    show 6-chunk-996ea856c3e53afc4be2.min.js:1
    _token 6-chunk-996ea856c3e53afc4be2.min.js:1
    setTimeout handler*4165/f</e.prototype.cancelAndSet 6-chunk-996ea856c3e53afc4be2.min.js:1
    show 6-chunk-996ea856c3e53afc4be2.min.js:1
    setState 6-chunk-996ea856c3e53afc4be2.min.js:1
    showSuggestions 6-chunk-996ea856c3e53afc4be2.min.js:1
    e 6-chunk-996ea856c3e53afc4be2.min.js:1
    fire 6-chunk-996ea856c3e53afc4be2.min.js:1
    _onNewContext 6-chunk-996ea856c3e53afc4be2.min.js:1
    trigger 6-chunk-996ea856c3e53afc4be2.min.js:1
6-chunk-996ea856c3e53afc4be2.min.js:1


Expected results:
2. No js errors

Additional info:

Comment 1 Aurélien Pupier 2020-10-21 09:28:21 UTC
unassigning the issue from me as I have no plan to work on it and it is really not in the core of my competencies so would take longer than Open Shift Developer Console developer or Yaml Language Server developer.

Comment 2 Aurélien Pupier 2020-10-21 09:32:12 UTC
note: the issue is not specific to the mentioned PR, it was already there with previous versions https://github.com/openshift/console/pull/6483#issuecomment-713314312

Comment 5 Yadan Pei 2020-11-12 07:11:15 UTC
add YAML content and use auto-complete, no js errors in browser console

Verified on 4.7.0-0.nightly-2020-11-11-220947

Comment 7 Josh Pinkney 2021-01-15 12:57:56 UTC
Is someone able to add doc text for this, it seems that I'm unable to change it (or I just don't know how)

Comment 9 errata-xmlrpc 2021-02-24 15:26:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5633


Note You need to log in before you can comment on or make changes to this bug.