Support crx protocol in remote sessions
samuelmaddock opened this issue · 2 comments
v3.9.0 introduced a crx://
protocol to serve extension icons. If the icons are loaded in a session separate from where the extensions are loaded, they will fail with net::ERR_UNKNOWN_URL_SCHEME
.
Electron's protocol
API is unique to each session.
A protocol is registered to a specific Electron session object. If you don't specify a session, then your protocol will be applied to the default session that Electron uses.
Registering the protocol when the remote session is interested in receiving browserAction updates is too late and would require the page to be reloaded.
This bug may be what's causing a test to fail:
not ok 17 chrome.browserAction <browser-action-list> element lists actions in remote partition
expected [] to deeply equal [ 'admpllddodedaonjnppghnfjboamdmfn' ]
AssertionError: expected [] to deeply equal [ 'admpllddodedaonjnppghnfjboamdmfn' ]
at Context.<anonymous> (spec/chrome-browserAction-spec.ts:212:36)
Thank you, @samuelmaddock. I temporarily reverted the changes: webcatalog/neutron#593. Hopefully, we can figure out a good solution for this.
How about also attaching crx
protocol to the defaultSession
?
An alternative is not using crx://
at all, such as in fvulich@33f5c64 which circumvents the issue.