portal

Alan Birchenough 2023-10-10T21:23:43.000289Z

Suddenly, I am getting this error on attempting to open portal in VS Code with Calva: “Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..” Suggestions?

djblue 2023-10-10T21:29:25.142059Z

What versions do you have? The vs-code extension version and the deps version.

Alan Birchenough 2023-10-10T21:30:51.951579Z

I thought you might ask that, so I should have been prepared. I am loading via an alias, so I’ll have to go find what it calls for.

Alan Birchenough 2023-10-10T21:31:11.044719Z

BTW, I haven’t made any changes in the last few weeks. But I will go look these up.

Alan Birchenough 2023-10-10T21:32:35.772159Z

I’ve got extra deps looking like this: djblue/portal {:mvn/version “0.31.0”}

Alan Birchenough 2023-10-10T21:33:00.177829Z

How do I find out the extension version?

djblue 2023-10-10T21:33:02.250249Z

I think vscode likes to randomly update extension for you 😂

Alan Birchenough 2023-10-10T21:33:09.288779Z

LOL - how kind of it.

Alan Birchenough 2023-10-10T21:33:35.959769Z

You think I need to catch up with my base version of portal? I know 0.31.0 is old.

djblue 2023-10-10T21:33:43.556459Z

If you go to the extensions tab and find portal, it should give you the version

Alan Birchenough 2023-10-10T21:33:51.185389Z

OK

djblue 2023-10-10T21:34:17.874719Z

The code for the host the extension hasn't really changed, so you really shouldn't need to update

Alan Birchenough 2023-10-10T21:34:42.058649Z

It’s 0.48.0.

djblue 2023-10-10T21:34:51.727609Z

Yeah, that's the latest 🤔

Alan Birchenough 2023-10-10T21:35:01.933709Z

I guess I could just try restarting the whole world and seeing if that makes a difference.

Alan Birchenough 2023-10-10T21:35:07.879709Z

It’s obviously a state issue.

Alan Birchenough 2023-10-10T21:36:28.671749Z

And it doesn’t seem like we’re finding a smoking gun to do with versions.

djblue 2023-10-10T21:37:06.500859Z

Did you bump the jar version to the latest?

Alan Birchenough 2023-10-10T21:37:57.705149Z

No bumping has taken place recently. Are you suggesting I update my deps alias to the latest and greatest?

djblue 2023-10-10T21:38:24.462089Z

I would try it real quick to see if that resolves the issue 👌

Alan Birchenough 2023-10-10T21:38:30.531799Z

So up to 0.48.0?

👍 1
Alan Birchenough 2023-10-10T21:38:36.892969Z

Yeah that makes sense.

djblue 2023-10-10T21:40:19.832289Z

I just tried 0.31.0 jar and 0.48.0 extension and it works for me 🤔

Alan Birchenough 2023-10-10T21:40:34.126779Z

That made no difference. I think I should start restarting everything in sight. But thanks for suggestions. At least my deps are a bit less stale now 😄 .

👍 1
djblue 2023-10-10T21:41:33.084299Z

I'm on 1.83.0 for my version of vscode as well

Alan Birchenough 2023-10-10T21:42:00.440449Z

OK. I will check when I bring it back up.

Alan Birchenough 2023-10-10T21:42:28.599669Z

Yep, that’s the one I’m on.

👍 1
Alan Birchenough 2023-10-10T21:44:18.378339Z

Yeah, restarting VS Code fixed it. Sorry, as soon as I saw the word “state” I should have thought of the first commandment of IT: “Did you try switching it off and then on again?”

😆 1
Alan Birchenough 2023-10-10T21:44:46.305519Z

But I’m pleased to have done some spring cleaning on the deps, etc. Thanks for the help.

💯 1
djblue 2023-10-10T21:48:50.247899Z

I just checked, 0.31.0 was released roughly a year ago on Oct 4, 2022. A bunch of cool stuff got added since then, let me know if you want any pointers.

Alan Birchenough 2023-10-10T21:49:49.552169Z

Thanks. I am noticing a new “metadata” button on the portal display. I’m sure there are a lot more changes besides that too. Where would I go to read about them?

djblue 2023-10-10T21:54:56.703569Z

The https://github.com/djblue/portal/blob/master/CHANGELOG.md#0320---2022-10-15 is a good place if you want to skim through the details. The https://cljdoc.org/d/djblue/portal/0.48.0/doc/guides are a good place if you want to setup something specific. I think the https://cljdoc.org/d/djblue/portal/0.48.0/doc/guides/nrepl middleware might be of interest to you if you'd like all evals to automatically tap values to Portal.

Alan Birchenough 2023-10-10T21:55:43.958179Z

Thanks for the suggestions. I will go and refresh my knowledge and see what I could be making better use of. And thanks for portal itself. It is a great boon.

1
🙏 1
djblue 2023-10-10T21:56:50.246129Z

Also, if you want, you can access the docs locally via (portal.api/docs {:launcher :vs-code})

djblue 2023-10-10T21:57:06.595709Z

It has a live showcase of all the available viewers 👌

Alan Birchenough 2023-10-10T21:59:54.656979Z

That’s a great idea. 👍