Skip to main content

Plugin widget.create() promise never complete

  • October 23, 2020
  • 6 replies
  • 800 views

Hi,

 

I seem to be having an issue in getting the miro.board.widgets.create() promise to complete. The widgets are created but the returned promise never changes from “pending”. I have tried creating widgets one at a time and in batches but with no luck.

 

As I say the widgets do create but without the promise completing or even erroring there is no way for my code to complete… it just hangs forever :(

 

Anyone else has this issue? My code block is wrapped in the miro.onReady() callback so I don’t think i need to do anything else?

 

Thanks.

Was it helpful?

6 replies

Hmm seems to be due to the size for the metadata i was setting. Reducing this appears to have fixed the issue


Max Harper
Forum|alt.badge.img+6
  • Miro Hero
  • 373 replies
  • October 23, 2020

@Craig Hardcastle   Good find!

 

I recall that here in the API docs they specify 6KB per widget per app:

Metadata is available via REST API and SDK as well.
Please note that metadata was designed to store a small amount of data. It is limited by 6KB of data per widget for all applications.

Metadata field is shared for reading across all apps which have access to board widgets

 

But its not in the SDK docs here (plugin side of docs).  So that would be helpful to have over there …

 

@Sultan perhaps you can support in updating the SDK docs with the text above? 

 


farbodsaraf
Mironeer
Forum|alt.badge.img+1
  • Mironeer
  • 22 replies
  • October 23, 2020

Thanks for pointing this out @Max Harper & @Craig Hardcastle. We’ll update the SDK docs to reflect this.


It might also be good for the promise to error with a message staying something like max metadata exceeded 


Max Harper
Forum|alt.badge.img+6
  • Miro Hero
  • 373 replies
  • October 23, 2020
Craig Hardcastle wrote:

It might also be good for the promise to error with a message staying something like max metadata exceeded 

 @Craig Hardcastle I sometimes wish my brain would send that error: ‘max metadata exceeded’  :nerd:   Would make me a better …. conversationalist LOL. 


Daniela Gavidia
Mironeer
Forum|alt.badge.img
Craig Hardcastle wrote:

It might also be good for the promise to error with a message staying something like max metadata exceeded 

You are right, Craig. Thanks for pointing this out. I’ll make a note of this so that we fix it in the future.
Kind regards.


Reply