Bad intermodule interactions: Okapi-Console breaks other UI modules
Description
CSP Request Details
CSP Rejection Details
Potential Workaround
Checklist
hideTestRail: Results
Activity

Mike Taylor April 3, 2017 at 12:24 PM
I tried temporarily removing the Users module from my stripes.config.js
to see how it affected the JS console output.
... and here's where it gets really weird ...
The JS warning is exactly the same, even though the Users module is not even loaded.

Mike Taylor April 3, 2017 at 12:18 PM
Note the simple, direct pattern of component containment described by the warning:
Root -> Provider -> Router -> MainContainer -> ModuleContainer -> Switch -> Route -> Users.
This is what Root.js in stripes-core does. There are a couple of aberrations in what's reported:
<BrowserRouter> gets injected. I assume this is some magic that <Router> does.
There is a spare <div> inside <ModuleContainer>, which is the one that ModuleContainer.js makes.
But what's clear is that <Users> in that trace really is the top-level component of ui-users, directly invoked by a <Route> created in stripes-core.

Mike Taylor April 3, 2017 at 12:03 PM
(I renamed this issue to convey its much broader implications.)

Mike Taylor April 3, 2017 at 12:03 PM
It's referring to a component <Users>
– but there no component of that name in the Okapi Console. There is such a component (of course) in the Users module, and it does indeed assert in its proptypes validation that the pathname
element of the location
property is required. But why would loading the Okapi Console touch on this at all?
Stranger still: when starting a new Stripes session that the Okapi Console is part of, I can go to the Users module and it works fine. Only when I go to the Okapi Console is this warning emitted.
Why is the Okapi Console doing anything to the Users module? Why Users and not Items?

Mike Taylor April 3, 2017 at 11:50 AM
Hmm, no, it's weirder than that. HEre is the first of the warnings:
Details
Assignee
Mike TaylorMike TaylorReporter
Hongwei JiHongwei JiLabels
Priority
P3Development Team
Stripes ForceTestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee

Reporter

On March 18th, noticed that clicking "Okapi Console" on http://folio-uidemo.aws.indexdata.com/ made whole UI not working (except Log out). The js error is "Uncaught TypeError: Cannot read property 'pathname' of null". Per slack request from Mike on March 20, create a ticket and assign to him for now.