KNowledgeOnWebScale / solid-authentication-browser-extension

10 stars 1 forks source link

Error when adding new profile #45

Open pheyvaer opened 1 year ago

pheyvaer commented 1 year ago

When trying the code on extension-as-remote I get the following errors:

image image
rafael-mindreau commented 1 year ago

I'm trying to replicate this, but I've run into a set of my own problems 😵‍💫

Could you attempt to remove the dist/ folder and run npm start again?

I'll have a further look at the massive issues branch jumping is causing me atm

pheyvaer commented 1 year ago

Now I get another error when loading the extension:

image
rafael-mindreau commented 1 year ago

Hey @pheyvaer

I've pushed some updates and it should not longer complain about this.

pheyvaer commented 1 year ago

With the latest version I can install it again, but I get the first error again now. This happens when I try to add a new profile:

  1. I click on "+ Add".
  2. Fill in name and IDP.
  3. Hit Enter.
  4. Nothing happens and the error is present.
rafael-mindreau commented 1 year ago

Do you get the issue that externalPort is undefined or the cloneInto issue? The cloneInto issue should not occur. The content.js content script triggered this but has been removed in the branch extension-as-remote. If it still occurs it's because it is still in your filesystem and adopted into the dist folder by the webpack reloading. I had to explicitly remove all of the src files and git reset --hard the latest commit.

Now if what you're describing is the other issue: externalPort is not defined then that's the issue I'm trying to replicate on my own machine, but having to trouble to. I recall having this issue exactly once before though, so I'm pretty sure it could occur easily, but just haven't found out which parameters trigger this exactly.

pheyvaer commented 1 year ago

I get the error about the external port.

rafael-mindreau commented 1 year ago

OK, I've been able to replicate this entirely by accident when the showcase app was not running. So in other words it's caused by a missing connection to any external party (such as the solid app). The way the connections are hydrated and managed will probably be optimized in the future, but for now I've put flow control in place to ensure the error does not occur.

When creating a profile, it's normal for the popup and the extension to close when it has been completed. I'm planning to add perhaps a success message at the end of this flow for better UX. If you open the extension after profile creation, you should find the profile you've just created.

Unrelated to this issue, I did find that there's sometimes (not always) a bug where - if you open the extension.- there are no profiles even when you've created some before. I'm trying to figure out how this happens but I'm guessing it has something to do with the way the connection hydration has been set up.

rafael-mindreau commented 1 year ago

This should no longer occur at the latest commit of extension-as-remote