dashevo / js-dash-sdk

DEPRECATED Dash client-side library for wallet payment/signing and application development. (Wallet, DAPI, Primitives, BLS, ...)
https://dashevo.github.io/platform/SDK/
MIT License
35 stars 21 forks source link

Using webpack breaks v21 sdk, blocking browser based dapps #297

Closed dashameter closed 2 years ago

dashameter commented 2 years ago

Trying v21 with vue the first message that greets me in the browser debug console is:

core_grpc_web_pb.js?a73b:105 Uncaught TypeError: Cannot read properties of undefined (reading 'MethodInfo')
    at eval (core_grpc_web_pb.js?a73b:105)
    at Object../node_modules/@dashevo/dapi-grpc/clients/core/v0/web/core_grpc_web_pb.js (chunk-vendors.js:1256)
    at __webpack_require__ (app.js:854)
    at fn (app.js:151)
    at eval (browser.js?6173:1)
    at Object../node_modules/@dashevo/dapi-grpc/browser.js (chunk-vendors.js:1245)
    at __webpack_require__ (app.js:854)
    at fn (app.js:151)
    at eval (broadcastTransactionFactory.js?ed7d:6)
    at Object../node_modules/@dashevo/dapi-client/lib/methods/core/broadcastTransactionFactory.js (chunk-vendors.js:640)
markin-io commented 2 years ago

@dashameter hello, and nice to meet you!

We fixed the underlying issue in the dapi-grpc.

However, we shall update corresponding versions of the dapi-client, wallet-lib, and SDKa bit later on, as this might be quite time-consuming.

As a quick fix I would like to suggest you remove node_modules and yarn.lock/package-lock.json in your project, and install all the dependencies from scratch. This way package manager should pick an updated version of the dapi-grpc (which is v0.21.1) and the issue should be gone.

How does that sound to you?

SamKirby22 commented 2 years ago

Thanks @dashameter & @markin-io. I've added this issue to the triage sheet for tracking. @dashameter, let me know the outcome of the retest. Thanks.

dashameter commented 2 years ago

passed retest, thanks @markin-io