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
common:474] panicked at '!window', mm2s rc/mm2 db/src/indexed db/drivers/builder. rs: 76: 40 and common: 474] panicked at '!window', mm2src/mm2 net/src/wasm http. rs: 148:40
on a side-note: faced/facing a similar issue with wasm-timer in our deps tree, which will be resolved with #1878 (thanks @ozkanonur - confirmed/tested with https://github.com/KomodoPlatform/komodo-defi-framework/tree/ca_dev) and by removing the wasm-timer dependency - was/is a similar issue (lack of worker context support) - err: common: 474] panicked at 'not in a browser', Lgithub/home/cargo/registry/src/github.com-1ecc6299db9ec823/wasm-timer-0.2.5/src/wasm.rs:58:19.
Thank you for the comprehensive report and the ref work. If there isn't anyone available in the team to take on this task at the moment, I can allocate time to work on it the week after next week.
In addition, this makes me think why we don't have E2E tests for gui platforms including WASM with +80% coverage.
These tests could be seamlessly integrated into cross-test pipelines with frameworks such as https://zuul-ci.org. By this approach, we could ensure that pull requests causing problems to our official mm2 clients, which are challenging to identify through manual means, are never merged.
test-environment:
Chrome
116.0.5845.96 (Official Build) (x86_64)
and116.0.5845.110 (Official Build) (arm64)
issue:
https://github.com/KomodoPlatform/komodo-defi-framework/blob/main/mm2src/mm2_db/src/indexed_db/drivers/builder.rs#L76 and https://github.com/KomodoPlatform/komodo-defi-framework/blob/main/mm2src/mm2_net/src/wasm_http.rs#L148 assume we are executing within a browser window context. However, the code can also be executed in a "background" context, such as a (service) worker or potentially other wasm runtimes ("server-side wasm"). Thus if triggered from such a background context, we face the following panics:
common:474] panicked at '!window', mm2s rc/mm2 db/src/indexed db/drivers/builder. rs: 76: 40
andcommon: 474] panicked at '!window', mm2src/mm2 net/src/wasm http. rs: 148:40
on a side-note: faced/facing a similar issue with
wasm-timer
in our deps tree, which will be resolved with #1878 (thanks @ozkanonur - confirmed/tested with https://github.com/KomodoPlatform/komodo-defi-framework/tree/ca_dev) and by removing thewasm-timer
dependency - was/is a similar issue (lack of worker context support) - err:common: 474] panicked at 'not in a browser', Lgithub/home/cargo/registry/src/github.com-1ecc6299db9ec823/wasm-timer-0.2.5/src/wasm.rs:58:19
.p.s. pushed a "experimental fix-attempt" in ae4a809 / f7b7f15 into https://github.com/KomodoPlatform/komodo-defi-framework/commits/ca_dev_wasm (for inspiration)
The text was updated successfully, but these errors were encountered: