Skip to content

fix: unblock extension activation issue for air-gapped instances

Administrator requested to merge bee/fix-hashcode into main

Created by: abeatrix

Close: https://github.com/sourcegraph/sourcegraph/issues/33286

Sourcegraph extensions do not run on instances with HTTP connections because the Crypto.subtle feature we are using in our hashCode function is only available in secure contexts (HTTPS), which would cause the whole activation process to fail when trying to log the event:

Screen Shot 2022-03-31 at 5 53 28 PM

The PR adds error handling for the event logging step so that failing to log the event would not stop the extension from activating:

Screen Shot 2022-03-31 at 6 11 05 PM

Test plan

Added error handling

App preview:

Merge request reports

Loading