keep getting the following js error in my lightning component after the Salesforce Spring19 release: Can any one help please

contextService.js:2 Uncaught (in promise) TypeError: Cannot read property 'setParams' of undefined
    at w.get (contextService.js:2)
    at l (contextService.js:2)
    at Object.a.getCacheableContextValue (contextService.js:2)
    at c (navigationService.js:2)
    at new Promise (<anonymous>)
    at d (navigationService.js:2)
    at g.navigateTo (navigationService.js:2)
    at Object.navigate (navigation.js:3)
    at navigate (navigation.js:2)
    at J.Tc (aura_prod.map.js:22316)


<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,forceCommunity:availableForAllPageTypes,force:lightningQuickAction" access="global" controller="newOrderController">

<lightning:navigation aura:id="navLink"/>

<lightning:button label="test" title="test" onclick="{!c.goToRec}" variant="success"/>


goToRec : function(component, event, helper) {
        var navLink = component.find("navLink");

        var pageRef = {
            type: 'standard__recordPage',
            attributes: {
                actionName: 'view',
                objectApiName: 'Order',
                recordId : '80161000002kILkAAM'  

        navLink.navigate(pageRef, true);
  • Formatting tip: to make your code look right, including brackets, select the entire region and press Ctrl-K or click the {} button. You can add the brackets on your Lightning component if you use the formatting tool. – David Reed Jan 15 '19 at 1:35
  • @Liang if you are sure that this worked prior to Spring '19, have you tried reaching out to Salesforce Support? – Jayant Das Feb 17 '19 at 18:12
  • To me this seems more of like a browser bug. I have posted a similar question - salesforce.stackexchange.com/questions/248360/…. This got fixed on its own after few days – Monalisa Das Feb 19 '19 at 9:05
  • which browser are you using or operating system? do you have any other tips or guidelines how other people can reproduce your issue? – Patlatus Feb 19 '19 at 20:26
  • how do you open this lightning component, do you open it from community or from flexi page or from lightning standalone app from from direct lightning tab or from visualforce lightning out or other lightning out or by other means? – Patlatus Feb 19 '19 at 20:28

I enabled some critical updates in the system and that resolved it. I can't remember which exact one I did though.

Setup -> Critical Updates

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.