Closed radleylewis closed 7 months ago
Thanks for the comment! As far as our experience goes, MM snap development is still in its infancy because it's very hard to work with sometimes especially when debugging errors. What we usually do is always build the snap, run the built version and then if we get any errors, we take a look at the error in detail and try to find the code in the built dist.js. It's very cumbersome sometimes though but this seems to work most of the time for us because of the way our snap is built.
Hi @kpachhai. Thanks for the response and for clarifying your approach. We have been essentially following the exact steps that you have outlined. However, in the case of the error I linked above, there is no information with respect to where in the bundle the issue is. I've been trying many different approaches, and in other cases the post-processing was more straightforward (e.g. the function name was available in the error so isolating the offending code was easier).
Not sure if you had any specific approaches with respect to debugging or identifying the exact line of offending code? In any case, thanks for your response and the great work you have done.
Hi @kpachhai. Thanks for the response and for clarifying your approach. We have been essentially following the exact steps that you have outlined. However, in the case of the error I linked above, there is no information with respect to where in the bundle the issue is. I've been trying many different approaches, and in other cases the post-processing was more straightforward (e.g. the function name was available in the error so isolating the offending code was easier).
Not sure if you had any specific approaches with respect to debugging or identifying the exact line of offending code? In any case, thanks for your response and the great work you have done.
I would encourage you to ask your question on the metamask snap discussion board - https://github.com/MetaMask/snaps/discussions
Overview
The
post-process.js
code included in your snap is a well executed approach to addressing theses eval
errors on the bundle. We are looking to build a snap which uses additional@veramo/did-comm
packages and are encountering errors onmm-snap eval
.Question
Are you able to outline your approach with respect to isolating offending code? In our specific case, the bundle size is > 147,000 lines and therefore makes it difficult to inspect. The specific error we are encountering is as per the below: