Snap Bundle Secure ECMAScript (SES) Debugging/Patching #2066
Unanswered
radleylewis
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Overview
I am working on a Snap implementation that uses a number of libraries and specifically implements veramo's did-comm package for the purpose of did-comm messaging.
Problem
When evaluating the build (i.e. the snap.js bundle to be served) with
pnpm mm-snap eval -i dist/snap.js
I encounter errors associated with the SES/lockdown evaluation of the bundle.In some cases this can be overcome through the implementation of a post-process script that parses the bundle and replaces incompatible javascript code with code that is SES compliant.
However, in this specific case, the error provides no detail with respect to where in the bundle the offending code is located. Specifically the error is:
Question
I have approached this problem from a variety of different angles, including:
Object.keys
is provided anull
orundefined
value) and implementing safe-guards within the code.Unfortunately, none of these approaches have worked. The most frustrating part is that the SES error doesn't provide any information (line number within bundle for example).
Is there a better way to approach debugging with respect to
mm-snap
eval? Is there a way to better determine which packages are compatible/ or where specifically they are not compatible as well as how they can be patched?Beta Was this translation helpful? Give feedback.
All reactions