sdefresne / gerrit-monitor

Source for Gerrit Monitor Chrome extension
Apache License 2.0
21 stars 16 forks source link

Requests permissions with no clear way to grant them #49

Open danaradg opened 1 year ago

danaradg commented 1 year ago

I'm a long time user of this amazing extension, thank you! Today, the extension refused to connect to my hosts, and instead showed the following message: image Clicking on "Grant permissions" sends me to the extension settings page with no clear action to take. I tried reinstalling but it didn't help.

sdefresne commented 1 year ago

This is likely related to the recent change to use Manifest V3.

It appears to work when running the extension in an unpackaged fashion, but fails with the attached error when packaged and delivered via the store. I've reverted the CL that added the support for Manifest V3 and redeployed the old version (even though the store does not allow to rollback, so the version number has been increased).

Screenshot 2023-07-31 at 10 37 20
sdefresne commented 1 year ago

@patrickkettner

Do you have an idea of what causes this error when using Manifest V3 and shipping the app through the store? There is no additional error message, nor any call stack, so this is really difficult to debug. I guess the runtime refers to chrome.runtime object, but I don't know why it works when unpackaged but not when running from the extension store.

patrickkettner commented 1 year ago

That error happens when you try to send a message via chrome.runtime.sendMessage but there isn't a listener set up for it. I will grab the last version in the store and try to figure out whats going on

patrickkettner commented 1 year ago

I am not able to replicate with the 1.3.0 (the mv3 build), at least the default flow. Would @danaradg or @sdefresne be able to share more about their config? My hunch is that setOverlayText being called with undefined, so either setGrantPermissionsButtonVisible has an error that is undefined (which seems extremely unlikely), or setLogginButtonVisible has errors who don't map to the current logic to get the error message. Since I am not able to reproduce it, I would assume that there is an issue with the call to gerrit.fetchAllowedInstances, and that it is happening for some but not others. Hence, a config would be very helpful to debug.

danaradg commented 1 year ago

First of all, the extension is indeed working again. Thanks for the quick response. I'm using default settings and have 3 hosts defined and enabled. Not sure what other information I can provide, but let me know if I can be of assistance. I'm not an expert on extensions, so please provide instructions if you want me to downgrade or collect logs.

patrickkettner commented 1 year ago

Thanks @danaradg! Are the 3 hosts all custom ones? Or are they the default ones?

danaradg commented 1 year ago

Custom ones.

patrickkettner commented 1 year ago

Would you be open to me contacting you directly to give further debugging steps?

danaradg commented 1 year ago

Sure. You can contact me at danarad@google.com