Skip to content

Error: Exception in HostFunction: Component class com.reactnativehce.services.CardService does not exist #41

Description

@deva-Irfan

I am getting erro [Error: Uncaught (in promise, id: 3) Error: Exception in HostFunction: Component class com.reactnativehce.services.CardService does not exist in com.example.hce] Uncaught (in promise, id: 3) Error: Exception in HostFunction: Component class com.reactnativehce.services.CardService does not exist in com.example.hce when i start the session

I am using following dep versions:
"expo": "~54.0.29"
"react-native": "0.81.5"
"react-native-hce": "^0.3.0"

and I am using development build.

`import { Pressable, Text, View } from "react-native";
import {
HCESession,
NFCTagType4,
NFCTagType4NDEFContentType,
} from "react-native-hce";

export default function Index() {
let session;

const startSession = async () => {
const tag = new NFCTagType4({
type: NFCTagType4NDEFContentType.Text,
content: "Hello world",
writable: false,
});

session = await HCESession.getInstance();
session.setApplication(tag);
await session.setEnabled(true);

};
return (
<View
style={{
flex: 1,
justifyContent: "center",
alignItems: "center",
}}
>
<Pressable
onPress={startSession}
style={{ padding: 10, backgroundColor: "blue" }}
>
<Text style={{ color: "white" }}>Start session


);
}
`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions