T.get() Not loading values after on-enable / authorization

I have a class where I am loading a board/shared value in an async function:

const value = await t.get(“board”,“shared”,“someSetting”, null);

The workflow is this:
0) FIRST USER: Has run the Power-Up before, and the shared setting is set by them.

  1. SECOND USER: Add Trello Power-Up to the board as a new user (never been run as this user before)
  2. ‘on-enable’ fires, and Welcome page with an Auth button appears
  3. User clicks the auth button and Trello Authentication dialog appears, they click Allow.
  4. ‘board-buttons’ fires on the update in an async call
  5. settings are read

RESULT: Getting the “default” value of null for the shared board setting, Power-Up flakes out… bad experience.

EXPECT: The shared setting to be there in this flow, Power-Up to know shared setting on first load

  1. User presses F5 (good luck in the Windows/Mac App)

RESULT: Everything is happy, ‘board-buttons’ fires and the shared value is read, everything is copasetic.

Why is this happening? My Power-Up has worked in this context before, so something must have changed. Is anyone else seeing an issue with reading values on first load of a Power-Up?

Revisiting this… I think I solved it.

The issue was the on-enable was sometimes returning undefined to the callback because I was not always settings the value. Very weird behavior but if Trello does not get something like an expected return t.modal() in ‘on-enable’ it seems to lose reference to context.

Lesson learned there, is to make sure the callback on ‘on-enable’ returns SOMETHING that comes off a t. It seems critical.