Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handlemap error reproduction #40

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

krisbitney
Copy link
Contributor

@krisbitney krisbitney commented Jul 21, 2023

This PR contains a minimal test testSubsequentSubInvokes that reproduces the exception:

uniffi.polywrap_native.FfiException$InvokeException: uri=wrap://embed/asyncify, method=subsequentInvokes, err=``RuntimeError: __wrap_abort: Error loading wrapper, uri: wrap://ens/memory-storage.polywrap.eth: `Failed to create wrapper: ``java.lang.AssertionError: Handle map is not returning the object we just placed there. This is a bug in the HandleMap.```

The reproduction uses the Asyncify test wrap: https://github.com/polywrap/wrap-test-harness/tree/master/cases/asyncify

It invokes this method: https://github.com/polywrap/wrap-test-harness/blob/master/cases/asyncify/implementations/rs/lib.rs#L85

Which subinvokes this plugin: https://github.com/polywrap/kotlin-client/blob/main/src/commonTest/kotlin/MemoryStoragePlugin.kt

I also included three additional tests:

  • testSubsequentSubInvokesToWrapper repeatedly subinvokes a Wasm wrapper
  • testSubsequentInvokesToPlugin repeatedly invokes a plugin directly
  • testSubsequentInvokesToWrapper repeatedly invokes a Wasm wrapper directly

These tests do not encounter any exceptions. They are included to demonstrate that the error occurs when subinvoking a plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant