Bug 1467869

Summary: Many errors dumped to the console: "Minified React error #31", "Invariant Violation"....
Product: Red Hat OpenStack Reporter: Udi Kalifon <ukalifon>
Component: rhosp-director-uiAssignee: Honza Pokorny <hpokorny>
Status: CLOSED CURRENTRELEASE QA Contact: Udi Kalifon <ukalifon>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 12.0 (Pike)CC: beth.white, dtrainor, hpokorny, rhel-osp-director-maint, ukalifon
Target Milestone: ---Keywords: Triaged
Target Release: 12.0 (Pike)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-26 11:53:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Udi Kalifon 2017-07-05 11:36:13 UTC
Description of problem:
When navigating to the Nodes page and the Deployment page, lots of errors are poured to the console:


logger.js:63 Error: Minified React error #31; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=31&args[]=%5Bobject%20XMLHttpRequest%5D&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.(…)i.value @ logger.js:63(anonymous function) @ logger.js:150i.value @ logger.js:143t.(anonymous function) @ logger.js:111window.onerror @ logger.js:156


unhandledRejection.js:23 Potentially unhandled rejection [71] Invariant Violation: Minified React error #31; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=31&args[]=%5Bobject%20XMLHttpRequest%5D&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at r (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:32:10989)
    at o (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:72:24226)
    at a (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:72:24356)
    at Object.l.instantiateChildren (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:113:12911)
    at h.m.Mixin._reconcilerInstantiateChildren (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:114:14260)
    at h.m.Mixin.mountChildren (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:114:14467)
    at h.Mixin._createInitialChildren (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:113:29160)
    at h.Mixin.mountComponent (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:113:27304)
    at Object.a.mountComponent (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:40:12113)
    at h.m.Mixin.mountChildren (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:114:14601)


logger.js:63 Error in RolesAction.fetchRoles Invariant Violation: Minified React error #31; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=31&args[]=%5Bobject%20XMLHttpRequest%5D&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at r (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:32:10989)
    at o (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:72:24226)
    at a (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:72:24356)
    at Object.l.instantiateChildren (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:113:12911)
    at h.m.Mixin._reconcilerInstantiateChildren (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:114:14260)
    at h.m.Mixin.mountChildren (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:114:14467)
    at h.Mixin._createInitialChildren (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:113:29160)
    at h.Mixin.mountComponent (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:113:27304)
    at Object.a.mountComponent (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:40:12113)
    at h.m.Mixin.mountChildren (https://puma49.scl.lab.tlv.redhat.com/tripleo_ui.js:114:14601)


Version-Release number of selected component (if applicable):
openstack-tripleo-ui-7.1.1-0.20170627161345.68e8684.el7ost.noarch


How reproducible:
100%


Steps to Reproduce:
1. Navigate the GUI


Additional info:
The GUI seems to work and the actions succeed, despite the many errors that are logged.

Comment 1 Honza Pokorny 2017-07-05 14:45:31 UTC
I can't reproduce this locally using latest master --- which I think is the same version as yours.

Comment 2 Udi Kalifon 2017-07-05 15:16:07 UTC
Hi Honza, would you like to see it on my setup?

Comment 3 Honza Pokorny 2017-07-06 11:52:47 UTC
I had a look at your setup.  Initially, I thought the issue was related to minification of the source code for production use.  I pulled the minified code from your setup to mine, and couldn't reproduce the bug either.  This eliminates any build-related bugs, I think.

The errors seem to be triggered by making requests to the two Ironic endpoints.  Ironic returns 404s so I'm wondering if it's misconfigured.

Comment 4 Udi Kalifon 2017-07-06 12:49:26 UTC
Ironic works from the CLI and tripleo_ui_config.js seems to be configured correctly. I curled the endpoint and got a response, too. What else can I check ?

Comment 5 Dan Trainor 2017-07-06 17:40:14 UTC
There appears to be a configuration error in tripleo_ui_config.js.  I changed it from:

     10   'ironic-inspector': 'https://puma49.scl.lab.tlv.redhat.com:443/ironic',

to:

     10   'ironic-inspector': 'https://puma49.scl.lab.tlv.redhat.com:443/ironic-inspector',

...and am no longer able to reproduce this.

Had line 10 of tripleo_ui_config.js been programatically configured or was that done by hand?  Either way, we should either improve the documentation that describes these configuration endpoints or fix the process that implements this configuration.

For thoroughness, I looked at Honza Pokorny's configuration and see that his configuration is more development-centric, and there is no use of Apache proxies to handle these requests - the requests go straight to the service endpoint port.  This explains why Honza was not able to reproduce the error.

Comment 6 Udi Kalifon 2017-07-09 09:35:23 UTC
I checked on another setup (where the file wasn't touched) and the error is at the source:

  'ironic': 'http://192.168.24.1:3000/ironic',
  'ironic-inspector': 'http://192.168.24.1:3000/ironic',

So please fix the ironic-inspector line to point to the path /ironic-inspector.

Comment 7 Honza Pokorny 2017-07-25 12:47:18 UTC
Fixed in https://review.openstack.org/#/c/470057/, which merged on June 12

Comment 8 Udi Kalifon 2017-07-26 11:53:27 UTC
Already works.