Fork me on GitHub
#portal
<
2023-10-10
>
Alan Birchenough21:10:43

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?

djblue21:10:25

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

Alan Birchenough21:10:51

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 Birchenough21:10:11

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

Alan Birchenough21:10:35

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

Alan Birchenough21:10:00

How do I find out the extension version?

djblue21:10:02

I think vscode likes to randomly update extension for you 😂

Alan Birchenough21:10:09

LOL - how kind of it.

Alan Birchenough21:10:35

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

djblue21:10:43

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

djblue21:10:17

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

djblue21:10:51

Yeah, that's the latest :thinking_face:

Alan Birchenough21:10:01

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

Alan Birchenough21:10:07

It’s obviously a state issue.

Alan Birchenough21:10:28

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

djblue21:10:06

Did you bump the jar version to the latest?

Alan Birchenough21:10:57

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

djblue21:10:24

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

Alan Birchenough21:10:30

So up to 0.48.0?

👍 1
Alan Birchenough21:10:36

Yeah that makes sense.

djblue21:10:19

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

Alan Birchenough21:10:34

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
djblue21:10:33

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

Alan Birchenough21:10:00

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

Alan Birchenough21:10:28

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

👍 1
Alan Birchenough21:10:18

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 Birchenough21:10:46

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

💯 1
djblue21:10:50

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 Birchenough21:10:49

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?

djblue21:10:56

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 Birchenough21:10:43

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
awesome 1
djblue21:10:50

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

djblue21:10:06

It has a live showcase of all the available viewers 👌

Alan Birchenough21:10:54

That’s a great idea. 👍