You need to sign in to do that
Don't have an account?
Paulie Peña
Bug In workspace.getAllTabInfo()
Some of our orgs recently got an update (they used to have a bear watering a bonsai tree, but now they have a snorkeling bear). Our Lightning Component's "init" aura:handler has a setTimeout(), which calls workspace.getAllTabInfo(), which is supposed to return a Promise (I need this to workaround this bug https://success.salesforce.com/issues_view?id=a1p3A0000001D3FQAU and I added a comment about the bug in this idea https://success.salesforce.com/ideaView?id=0873A000000E5HMQA0).
Unfortunately, after the update, whenever our Lightning Component's tab is refreshed (using the tab menu, next to the close button), workspace.getAllTabInfo() is returning undefined and therefore causes an exception when our code tries to call then() on what should be a Promise but is instead undefined.
The problem only happens on the second tab that gets loaded, not the first tab that's loaded in the Lightning Console app. We have multiple Lightning components that share the same "init" aura:handler, and if we have two of our Lightning tabs open, only refreshing the one that was loaded second causes the problem.
I traced the issue down to the if (1 !== this.I) in the below code in aura_prod.js, since the old code used to have a value of 0 when I called workspace.getAllTabInfo(), so would actually return a value, but now it has a value of 1 and does not return anything:
E.prototype.get = function(a) {
if (1 !== this.I) {
a = $A.P.normalize(a);
var b = a.split(t)
, c = b.shift()
, d = this.Ic(c, this);
return b.length ? (d || $A.assert(r, Cn + a + dd + c + Zc),
$A.util.M(d.get) ? d.get(b.join(t), this) : $A.P.Mb(b, d)) : d
}
}
BTW, how can I tell what version of Salesforce I'm running, since all of our orgs say Spring '18, but they are clearly different versions? It would be nice to be able to talk about the org version instead of having to say, "they used to have a bear watering a bonsai tree, but now they have a snorkeling bear."
Unfortunately, after the update, whenever our Lightning Component's tab is refreshed (using the tab menu, next to the close button), workspace.getAllTabInfo() is returning undefined and therefore causes an exception when our code tries to call then() on what should be a Promise but is instead undefined.
The problem only happens on the second tab that gets loaded, not the first tab that's loaded in the Lightning Console app. We have multiple Lightning components that share the same "init" aura:handler, and if we have two of our Lightning tabs open, only refreshing the one that was loaded second causes the problem.
I traced the issue down to the if (1 !== this.I) in the below code in aura_prod.js, since the old code used to have a value of 0 when I called workspace.getAllTabInfo(), so would actually return a value, but now it has a value of 1 and does not return anything:
E.prototype.get = function(a) {
if (1 !== this.I) {
a = $A.P.normalize(a);
var b = a.split(t)
, c = b.shift()
, d = this.Ic(c, this);
return b.length ? (d || $A.assert(r, Cn + a + dd + c + Zc),
$A.util.M(d.get) ? d.get(b.join(t), this) : $A.P.Mb(b, d)) : d
}
}
BTW, how can I tell what version of Salesforce I'm running, since all of our orgs say Spring '18, but they are clearly different versions? It would be nice to be able to talk about the org version instead of having to say, "they used to have a bear watering a bonsai tree, but now they have a snorkeling bear."
You can change the API version of a Lex component clicking on "Bundle Version Settings".