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?
What versions do you have? The vs-code extension version and the deps version.
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.
BTW, I haven’t made any changes in the last few weeks. But I will go look these up.
I’ve got extra deps looking like this: djblue/portal {:mvn/version “0.31.0”}
How do I find out the extension version?
I think vscode likes to randomly update extension for you 😂
LOL - how kind of it.
You think I need to catch up with my base version of portal? I know 0.31.0 is old.
If you go to the extensions tab and find portal, it should give you the version
OK
The code for the host the extension hasn't really changed, so you really shouldn't need to update
It’s 0.48.0.
Yeah, that's the latest 🤔
I guess I could just try restarting the whole world and seeing if that makes a difference.
It’s obviously a state issue.
And it doesn’t seem like we’re finding a smoking gun to do with versions.
Did you bump the jar version to the latest?
No bumping has taken place recently. Are you suggesting I update my deps alias to the latest and greatest?
I would try it real quick to see if that resolves the issue 👌
So up to 0.48.0?
Yeah that makes sense.
I just tried 0.31.0 jar and 0.48.0 extension and it works for me 🤔
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 😄 .
I'm on 1.83.0 for my version of vscode as well
OK. I will check when I bring it back up.
Yep, that’s the one I’m on.
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?”
But I’m pleased to have done some spring cleaning on the deps, etc. Thanks for the help.
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.
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?
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.
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.
Also, if you want, you can access the docs locally via (portal.api/docs {:launcher :vs-code})
It has a live showcase of all the available viewers 👌
That’s a great idea. 👍