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

Fix #614. "onError" method needs to be declared #630

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

DavidBertet
Copy link
Contributor

Summary

Fix the error Unsupported top level event type "onError" dispatched, js engine: hermes, raised by #614

When Android can't access the camera, it throws an error.
On v13 we were logging the error. On v14 we are forwarding it to the app
73bd920

While doing it, we forgot to declare the method. Hence hermes raises an error for method unknown.

Fix

Declare the method "onError"

How did you test this change?

On an emulator without camera, it doesn't raise the error anymore.

And if "onError" is added on the application

<Camera
  onError={(e) => console.log('error', e.nativeEvent)}

It does forward it.

 LOG  Running "CameraKitExample" with {"rootTag":11}
 LOG  error {"errorMessage": "Provided camera selector unable to resolve a camera for the given use case"}

@scarlac scarlac merged commit a7413aa into teslamotors:master Apr 30, 2024
3 checks passed
@scarlac
Copy link
Collaborator

scarlac commented Apr 30, 2024

Thanks again :)

@DavidBertet DavidBertet deleted the feature/fix_event_error branch May 1, 2024 00:32
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.

2 participants