Using Solid with a chrome extension

Hi I want to use solid in chrome extension but i’m confused about how the login would work.

I’ve already tried opening the login popup from a content script. After entering my ID and pressing enter, I was presented with a blank screen with the following message in the console “Uncaught (in promise) TypeError: Cannot read property ‘childNodes’ of null at Object.g [as render] (popup.js:8)”. I wouldn’t know where to start debugging the popup code.

It’s also a bit strange because it appears to log me in (it stores the session data) even though I didn’t enter my password and i cleared localstorage beforehand.

I also need to figure out how to sync the session data across tabs. I’ve briefly looked at a few solutions but i’d like to sort the above issue out first.

Any ideas about this? It is possible to use Solid with a chrome extension?

1 Like

I’m not sure if it will help, but @kidehen has built some browser extensions for use with RDF / RDFa, though not Solid explicitly AFAIK.

We have a Chrome Extension that already supports “Save As” operations to a Solid Pod i.e., it uses the Solid Auth Client for authentication at the point of data persistence.

There’s also a YouTube screencast demo that showcases how it works.

2 Likes

OK looking at the vid i see you are doing the write operations from an “options” page. Yeh this is probably the way to go as it has a fixed url. I guess I can just pass messages from the content script to the options page and back, which also solves the issue having to sync the session data. I would have preferred the login box to be in a popup but it adds unnecessary complication.

I’ll give it a go. cheers :wink:

1 Like