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

Module API Reference - not describe how to use Promise #28336

Open
vladimir-vucetic opened this issue Apr 20, 2024 · 0 comments
Open

Module API Reference - not describe how to use Promise #28336

vladimir-vucetic opened this issue Apr 20, 2024 · 0 comments
Labels

Comments

@vladimir-vucetic
Copy link

Summary

https://docs.expo.dev/modules/module-api/#asyncfunction
It's not described how to import Promise in kotlin using expo modules.
Using this code:

AsyncFunction("asyncFunction") { message: String, promise: Promise ->
  promise.resolve(message)
}

Gives me error:

Error: Exception in HostObject::get for prop 'PI': expo.modules.kotlin.exception.MissingTypeConverter: Cannot find type converter for 'expo.modules.core.Promise'., js engine: hermes
 ERROR  Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.

Link to the related docs page

https://docs.expo.dev/modules/module-api/#asyncfunction

Anything else?

No response

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

No branches or pull requests

1 participant