Upgrade Your Add-on to V8 Runtime Explained

About this Tutorial

How to and why to upgrade from V5 Rhino to V8 Runtime in Add-ons

Video Transcript

0:00 So this video is about upgrading to V8 Runtime. In a previous video in this course about creating an add-on, I mentioned that in your Apps Script you have this Runtime version, and if you are needing to do a sidebar or some kind of HTML page inside of the add-on, you're going to need to use version 5
0:23 deprecated. And now, this has sort of come to a head now. Recently, I got an email from Google saying, hey, you need to upgrade everything from that to V8. And then I said, well, my sidebars aren't going to be working.
0:35 The HTML in the sidebar needs to be able to have a button that clicks to run a script. So here in SheetStyles, for example, I have SheetStyles show.
0:48 Sidebar, this is the entire, entire add-on, and we can click this and see it says, like, failed because we're using runtime V8. Now, what I didn't realize, and now I realize, is that this is actually not a problem with Google side, per se, the V8 runtime, but rather, a, a problem with Chrome, and so 
1:15 this actually works, uhm, if we, this is gonna sound weird, if we run this in an incognito tab. So, you can go and take this URL that you're doing your add-on, open an incognito tab, sign in as yourself, but just in an incognito tab, to open this add-on and, the HTML buttons will work.
1:38 So, I've been doing, uhm, these upgrades recently, and so we can go to extensions, Apps Script, this is the actual code that I used for the SheetStyles add-on that I made, and we can see over in Apps Script JSON that we have runtime version v8. We can add that by just going over to anywhere we have runtime
2:00 v8. Maybe this is v5 deprecated. You can delete this whole line. Make sure to delete that, that comma at the end, too, uhm, so that this is only comma, then the next one, comma, then the next one, comma, then the next one, and you don't, don't have any extra commas.
2:16 We can save this, but then go over to Project Settings and click Enable Chrome v8 Runtime. This, let's go back to our editor, will add it automatically.
2:31 See, now we have it automatically here. So, we don't have to type this again. We don't have to edit this.
2:36 We can just delete it, click that button, and it will have this Runtime version v8 in here for you as you need, and then save it.
2:45 And now, if you're updating just this, this is actually a really cool simple update. You need to go to your console.cloud.google.com.
2:56 Here, this is my SheetStyles project. Make sure you go to the exact project that you want to update in the store listing.
3:03 So, here's CPM custom function. Then, we're gonna search for Marketplace SDK. Make sure it's the Marketplace SDK. Manage. And you're gonna do two things in here.
3:17 One is in app configuration. Actually, sorry. One more step before we do that. You have to deploy. You can do manage de- actually, no.
3:26 Just new deployment. Sorry. And then, make sure it's add on. Add on. Deploy. And now, you see, up here, it tells me version 3 on March 7th. This is today, March 7th, 2025. Version 3. This is important.
3:47 To get this number. Go back to our app configuration in our marketplace SDK. Scroll down, and you're going to see where you added that Sheets add on, and this script version.
4:00 We're just gonna do change that to 3. And then, save draft at the bottom, and the second step, it says, right here, your draft was saved to publisher draft.
4:11 Visit the store listing tab. Click OK. If you click this button, I have done this a few times. If I click this button, it opens a new tab, and it doesn't go to the store list.
4:20 It's very confusing. I just click OK, scroll back to the top, and over here, next to app configuration, click store listing.
4:30 Here, you, you don't need to change anything. This is actually a really interesting time if you do want to edit, update any screenshots, anything.
4:39 I, I wouldn't necessarily actually edit anything at this particular moment at the same time. we're just up upgrading our. Runtime, just click publish.
4:51 You can always come back to this later once this happens and runs and you test it. Fine, go back and then update anything you want separately.
5:02 We can view this and what's going to happen is, I've actually done this a couple times just to test and I will edit something else.
5:13 Just a tiny little update, like, uhm, eh, I'll add some punctuation or change the text somewhere from get help to get support.
5:27 Something that shows me on the outside as I test it that it is going to be changed. That does help.
5:35 So, what happens next? This does take a bit of time. It actually says here, listing updated today, March 7th, 2025. It was actually a very quick update.
5:46 But to propagate and actually get out there, it takes one to three days. Uhm, right now it does say listing updated immediately.
5:54 But, if you want to go and install it and try it and see, if you don't see the change right away, then wait one to three days.
6:01 But that's how to upgrade your runtime, and also, just to acknowledge that the actual bug isn't with Google itself. It is with, generally, Google.
6:10 But, if you want to test your sidebars and any HTML you have here and have any buttons that run a script, just do it in incognito mode.
6:21 Like, again, sign into the sheet in incognito mode and into your account and it'll work. Beautifully, perfectly, it does it for me every time, uh, as long as I have the script correct.
6:31 Alright, I hope you enjoyed that upgrade, and if you have any questions about add-ons, feel free to email me over at andrew at bettersheets.co. I'm happy to answer questions.
6:42 We have some interesting questions coming around, uhm, about how to do, like, paid add-ons, how to do, do license keys, how to, uh, do some more interesting automations in there, uhm, hopefully I'll get some videos out soon for that.