šŸ’ŗ Introducing Bask: A VS Code extension for building plugins

Excellent! Iā€™d be curious to hear about the solution if would care to share.

1 Like

Rico, Bubble friends,
I am pleased to announce Bask version 0.8.26 fixes our major authentication issue - Bask is operational again :partying_face: As referred to earlier in the thread, our prior releases were broken due to Bubble changing the way their public authentication endpoint worked (Bubble, is in fact, shutting down the endpoint we previously relied on this week). Fixing this required coordination with Bubble to get Bask whitelisted as an Official Bubble Oauth Client. As simple as that may sound, it took several weeks to confirm this approach would work.

From this point forward, when current and new users go to authenticate with Bask, we no longer ask for your Bubble password. Instead, the extension directs you to open a URL to sign in to your bubble.io account. Once you do (this will happen automatically for anyone who is already signed in) you will be redirected to our site that looks like.

The code provided, which is different for everyone, will need to be copy and pasted into the Bask VS Code extension (the input for which will already be open). Once entered, you will be authenticated and Bask will internally refresh your OAuth token whenever it expires (you should not need to authenticate again).

While I know this took some time to get working, this should be a nice improvement over our previous sign in flow.

Finally, I did take some extra time to add improvements for making Bask work better in Github Codespaces - which is a really nice way to isolate code/plugin development. More improvements to come.

Overall, getting these fixes in place took way longer than I would have liked. I really appreciate the folks who showed great patience while we resolved this. As a token of my appreciation and apology to you, I will be offering free access to a new Bubble tool/service I will be launching in the coming months. Itā€™s the least I can do outside of offering refunds to whoever so desires one. Thank you guys!

8 Likes

Great news!

Who could I talk to for this?

2 Likes

Very interested in learning more about how this works.

1 Like

@rico.trevisan just DMd you with those details.

@eli, Github Codespaces is awesome! Itā€™s basically a way to use VS Code on a repo by repo basis. Think of it like Pythonā€™s env, or Nodeā€™s npm init to create isolated development environments which can be loaded with repo specific VS Code extensions/configs.

There are still some things I need to improve in Bask to make using it in Codespaces as easy as possible:

  • how we register Bask licenses to machinesā€¦ so that youā€™re not forced to re-register on different Codespace instances
  • creating a Bask specific codespaces VS Code image tuned for Bubble plugin development.

That said, Bask can be used in Codespaces today if you want to give it a try :slight_smile:

1 Like

Iā€™m getting this error this morning. It fails before it shows me the list of plugins so I can never select anything.

[08:20:39] Extension activated.
[08:20:39] Build mode disabled.
[08:20:48] Bask failed to initialize. Returned error: Error: Failed to fetch plugins: Error fetching url.
[08:20:56] Plugin was not selected.
[08:20:56] Bask failed to Switch plugins. Error: Plugin was not selected.

FYI: Hereā€™s the output from the console

Hey Rico, thank you for that bug report! This ended up being a datatype issue that had the effect of breaking our OAuth token refresh flow. All tested/fixed now in v0.8.27. Thank you again!

Hello!

Excited to get to play with this. I have build mode enabled and get an error Bask could not build your plugin. See the Output window for details. But thereā€™s nothing in the debug console, output and terminal where exactly can i see the error?

Thanks!

For anyone looking for a solution in the future it was because i had build mode on and hadnā€™t properly initialized a package.json (with npm init) also need to make sure to install any packages (node-fetch, esbuild) i still would love to know where the output is should i need to debug further in the future!

1 Like

Hey Lola! Thanks for sharing :slight_smile: Yes, those are exactly the steps needed to resolve that build issue (one certainly cannot use esbuild to build a plugin without first installing it). Iā€™m going to note as much in our docs and add that as a helpful pointer/notification in Bask!

As for your questions about where the output is storedā€¦ I do believe you know it is saved directly to Bubble (so you can check the plugin editor) when we build a pluginā€¦ so thatā€™s one place you can reference. However, we do not currently have a VS Code based place to reference this. The currently empty dist folder that Bask creates was one possible location for this, however this is where I anticipated to output the full plugin json. I have a chance at implementing this next week, so Iā€™ll give it a go then :slight_smile:

Just wanted to highlight a few updates we recently made to Bask.

  • AI is the buzz these days and Bubblers are experimenting with authoring plugins in Cursor, the AI first code editor. Since itā€™s based on VS Code, in theory Bask could work in Cursor. Well, itā€™s theory no more - Bask officially works with and can be installed in Cursor today. Try it out and let us know how much faster you make plugins with code auto-sync + ai!
  • Bug fixes: centered around strange Bask initialization behaviors after pressing escape on the Bask registration window.
7 Likes

Hi guys. I have issues with Bask logging in into Bubble. What is the Registration ID heā€™s asking me? I canā€™t find any info on the documentation

Hey info.laboratoriocam!
To get youā€™re registration ID, youā€™ll need to head over to Scious | Plugins, and tap Start free trial:

Once you sign in and purchase a subscription (we wonā€™t charge your credit card until the 10 day free trial is over), youā€™ll be given a Registration ID. If itā€™s not showing, you can regenerate that key:

So to finish activating Bask, you would enter that key, and then authorize Bask to use your Bubble account by supplying the OAuth code Bubble will display (after youā€™ve signed in).

Hi @zelus_pudding, excited to start using Bask!

Running into a small problem I was hoping you could help me with.

  • I installed the extension
  • Got my API key
  • Ran the ā€˜Bask: Switch Pluginā€™ command and entered the API key

But then got an error. I canā€™t remember what it was specifically - sorry! :frowning:.

I tried to start again, but now every time I run any of the Bask commands Iā€™m getting a ā€˜Bask unable to connect to Bubbleā€™ error code. Have tried uninstalling and reinstalling the plugin but no joy.

I think Bask is expecting me to have logged into Bubble, but I never actually got to the stage where it asked for my credentials.

Hey Alex! Thank you for trying us out :slight_smile:
Letā€™s try this - if you head back to the Bask registration page and tap ā€œReplace Keyā€ on your subscription, you will force Bask to reinitialize things. You should then be able to add that new key and sign into Bubble.

That said, Iā€™m looking at the codebase now to see if there is something I can change so this doesnā€™t happen again. If replacing the API key doesnā€™t do the trick, then let me know so we can hop on a quick debugging call to fix that up for ya!

Thanks for the quick response @zelus_pudding!

I tried that and ran into the same issue Iā€™m afraid. Entered the registration key but never got the stage where I was asked for Bubble credentials. Hereā€™s the error code in case itā€™s useful:

If thereā€™s anything else I can try let me know :slight_smile:

1 Like

That last error message is in interesting one I havenā€™t seen beforeā€¦ but it gives me an idea! Going to release an update in the next 20ish minutes that may resolve this.

1 Like

May take another minute or so for Microsoft to publish it everywhere but v0.8.34 is now deployed and hopefully resolves your error. I made an update assuming that somehow the wrong OAuth code was added to Bask when you registered. If you run into the error again, then try re-initializing Bask one more time. Then if that fails, Iā€™ll DM you to setup a short video chat to debug further.

Thank you @zelus_pudding for the superb support! We got everything up and running.

I sense Iā€™ll be using this quite a lot in my daily workflow.

1 Like

Hey all,
Just released an update v0.8.37 which fixes a couple of issues:

  • Bask ā€œforgetsā€ where a previously initialized plugin is saved locally. This was an issue where the internal sqlite database connection would sometimes fail to close before VS Code shutdown, thus Bask having to recreate the internal db and ā€œforgettingā€ where plugin project files were stored.
  • Running Bask Pull while in Build Mode sometimes overwrote local plugin source files with the minified/built code. While the source of the exact issue is unknown, we think it had to do with Language Server Issues (which we internally use to determine when there was remote code worth pulling). In any case, we can avoid the issue by not pulling a pluginā€™s Javascript code while in Build mode (but pull/sync everything else, like field and state names). We think thatā€™s a reasonable solution since itā€™s uncommon and not recommended to edit built/bundled code.

The fixes for these issues are now live. Happy Basking :slight_smile:

1 Like