• Secured Signing Developer
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
The issue is when I developing my lightning app and changed files and saved/built on the server,
in the same browser and session, I can not get the latest change, even after few hours.
but if I open a new browser and login, I can get my latest change, however if I changed something again, this browser doen't update any more.
then I have to  switch to another brower. I don't have so many browers and every time login needs code challenge.

It's quite annoying and made my developing so inefficient, anyone else got same issue?
I have a method in Lightning server controller. This method will call an external API. And before calling out, it would check the token. if it's expiring soon, e.g. 1 day, the method will call a method to refresh token. 
The @future method should be very perfect for refreshing token. otherwise it would have a calloutexception error.

But now the problem is even I do nothing ('comment all the code') in the future method, it throws calloutexception error 'You have uncommitted work pending. Please commit or rollback before calling out'. if I remove @future annotation, it would be fine.

So strange!
I have a method in Lightning server controller. This method will call an external API. And before calling out, it would check the token. if it's expiring soon, e.g. 1 day, the method will call a method to refresh token. 
The @future method should be very perfect for refreshing token. otherwise it would have a calloutexception error.

But now the problem is even I do nothing ('comment all the code') in the future method, it throws calloutexception error 'You have uncommitted work pending. Please commit or rollback before calling out'. if I remove @future annotation, it would be fine.

So strange!