You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on a firefox extension meant to integrate with polycentric and I've run into a few issues preventing it from working. Loading with a <script> tag works fine, but there are a couple issues specific to extensions.
cross-fetch doesn't work. I forgot the exact error message, but I believe it had something to do with assigning to fetch (or some other variable), which is treated as readonly in extension scripts.
The function getKeyFromHash from @noble/ed25519 throws an error when calling hashed.slice. Due to globalThis != window in the content script sandbox, calling slice attempts to create an object with incorrect permissions. I haven't checked newer versions of this library, but the issue might be fixed in those.
These are all easily fixed using sed in the generated JS, but firefox extensions require dependencies to not be modified as a submission criterion.
I'm working on a firefox extension meant to integrate with polycentric and I've run into a few issues preventing it from working. Loading with a <script> tag works fine, but there are a couple issues specific to extensions.
evalin protobufjs violates csp: Use of eval is strongly discouraged protobufjs/protobuf.js#1754. It seems the codepath that hits this eval is entirely unnecessary. This code is extremely suspicious in the first placefetch(or some other variable), which is treated as readonly in extension scripts.getKeyFromHashfrom@noble/ed25519throws an error when callinghashed.slice. Due to globalThis != window in the content script sandbox, calling slice attempts to create an object with incorrect permissions. I haven't checked newer versions of this library, but the issue might be fixed in those.These are all easily fixed using sed in the generated JS, but firefox extensions require dependencies to not be modified as a submission criterion.