activeTab permissions not working as expected - Chrome Extension
Reported by
sandeepk...@gmail.com,
Jan 29 2018
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36 Steps to reproduce the problem: 1. Load the attached extension zip 2. Open extension, click "Refresh Page" (This would refresh page). This button uses content script. 3. Try clicking the button again while extension is open. Additional information : Refer this link also - https://stackoverflow.com/questions/48493219/activetab-permissions-not-working-as-expected-chrome-extension What is the expected behavior? The button functionality should work on second time also. What went wrong? Button is able to run the content script only once. Second time onwards we get error Unchecked runtime.lastError while running tabs.executeScript: Cannot access contents of the page. Extension manifest must request permission to access the respective host. If we reload chrome extension and then try, button works fine. Did this work before? No Does this work in other browsers? Yes Chrome version: 64.0.3282.119 Channel: stable OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: I tried to investigate on this issue. Also checked on stackoverflow.com. Contributer there suggested to file a bug. This link can help understand the issue in more detail - https://stackoverflow.com/questions/48493219/activetab-permissions-not-working-as-expected-chrome-extension
,
Jan 29 2018
Able to reproduce this issue on reported version 64.0.3282.119 and on latest canary 66.0.3334.0 using Windows 7/10, Mac 10.13.1 and Ubuntu 14.04 with extension given in comment#0. i.e; Refresh button doesn't work from second click. This issue is seen from M60. Hence considering this issue as Non-Regression and marking as Untriaged.
,
Jan 29 2018
Looks like this is how activeTab permissions are supposed to work. Those are getting revoked on refresh of page. Found this from stackoverflow post linked in bug, also reading the documentation closely (https://developer.chrome.com/extensions/activeTab). "The activeTab permission gives an extension temporary access to the currently active tab when the user invokes the extension - for example by clicking its browser action. Access to the tab lasts until the tab is navigated or closed." If this understanding is correct, we can close this as not a bug or as designed.
,
Feb 6 2018
,
Feb 9 2018
@3 Yep, activeTab is only intended to work while the user is on that specific page - not across navigations or refreshes. Closing this out. |
||||
►
Sign in to add a comment |
||||
Comment 1 by susanjun...@techmahindra.com
, Jan 29 2018