Skip to main content

I have been approached to migrate a board app / extension not sure what they are called now which is using V1 SDK to V2

From the documentation on how apps are created in V2 everything seems unchanged in the initialization section, apart from referencing the new SDK url ofcourse

However when I try to fire up the code in a new app which has V2 selected I get this:

Error

Couldn’t find any explanation in docs as to what this could mean.

Are there any auth / security header changes that a server needs to meet when initializing the iframe panel compared to V1?

 

Just for context, I do not expect the functionality of my old V1 code to work at all on V2, but I did expect the iframe to fire up and greet me with errors which I could then debug one by one.

 

I tried adding log calls throughout the code but none display in my browser console, meaning that this error most likely obstructs the script from ever even firing, and the same goes for the HTML, whatever change I make to it does not get shown in the iframe

Hi @Sami Ljimari 

Sorry to hear that you’ve ran into this issue. Could you please first confirm that in your app settings page on developers.miro.com (for the app in question) that the Web SDK version is V2? 

 

 


Hi @Horea Porutiu ,

Yes I have cloned the old app which is running old V1 and created a V2 SDK app, I went through the docs and selected everything that should be selected for V2 in the app settings and referenced the new SDK url as well as the unique keys the new app generated, double checked it again now, and everything is selected as V2

 

Our V1 version is running still with no issues so whatsoever


Hi @Sami Ljimari 

One thing to call out is that in v2, you don't need to call an initialization function like you do in v1, rather, you can place your code inside the async init function in V2. Anything included in here will be run when the app is launched from the side bar.

Generally, it’s easier for developers to create a clean boilerplate in v2 to make sure there aren’t unexpected references to V1. We’ve worked through a similar situation on Discord in this thread.

I would recommend using create-miro-app to generate a boilerplate, make sure that is working fine, and then add in the logic from your v1 app into the boilerplate. You could also clone one of our app-examples apps on GitHub too, since they are all using v2 as well. 

Hope it helps, please let me know if you have additional questions. 


Reply