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

App crash after installing the package in android #12

Closed
3 of 8 tasks
DeepikaSharma5 opened this issue Sep 7, 2022 · 18 comments
Closed
3 of 8 tasks

App crash after installing the package in android #12

DeepikaSharma5 opened this issue Sep 7, 2022 · 18 comments
Assignees
Labels
bug Something isn't working image labeling

Comments

@DeepikaSharma5
Copy link

What happened?

I insalled the package using npm like this
npm install @react-native-ml-kit/image-labeling --save

It is making the app crash. The I tried to link the main branch directly to package,json like this
"@react-native-ml-kit/image-labeling": "https://github.com/a7med-mahmoud/react-native-ml-kit/tree/main/image-labeling#main",

That doesn't event install

Version

1.2.0

Which ML Kit packages do you use?

  • @react-native-ml-kit/barcode-scanning
  • @react-native-ml-kit/face-detection
  • @react-native-ml-kit/identify-languages
  • @react-native-ml-kit/image-labeling
  • @react-native-ml-kit/text-recognition
  • @react-native-ml-kit/translate-text

What platforms are you seeing this issue on?

  • Android
  • iOS

System Information

System: OS: Windows 10 10.0.22000 CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-11370H @ 3.30GHz Memory: 3.95 GB / 15.74 GB Binaries: Node: 16.15.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.18 - C:\Program Files\nodejs\yarn.CMD npm: 8.5.5 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Version 2021.1.0.0 AI-211.7628.21.2111.8193401 Visual Studio: Not Found Languages: Java: 11.0.15.1 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.4 => 0.69.4 react-native-windows: Not Found npmGlobalPackages: *react-native*: Not Found

Steps to Reproduce

Install the package using npm install @react-native-ml-kit/image-labeling --save
Try run the project using npm run android

@DeepikaSharma5 DeepikaSharma5 added the bug Something isn't working label Sep 7, 2022
@a7medev a7medev self-assigned this Sep 8, 2022
@a7medev
Copy link
Owner

a7medev commented Sep 8, 2022

Thanks for reporting this issue @DeepikaSharma5, I'll look into it and let you know.

@a7medev
Copy link
Owner

a7medev commented Sep 8, 2022

Can you share the error that you see so I can better understand the problem?

@DeepikaSharma5
Copy link
Author

@a7med-mahmoud That's the main issue. I don't see any errors, warnings or info. Just when you install the package and run the project the app is crashing. There is no information in the console.

@DeepikaSharma5
Copy link
Author

Any update @a7med-mahmoud ?

@a7medev
Copy link
Owner

a7medev commented Sep 10, 2022

I created a new React Native 0.69.4 app and installed @react-native-ml-kit/image-labeling and ran the app on Android and it does work properly.
What Android API of the emulator are you using?

@DeepikaSharma5
Copy link
Author

DeepikaSharma5 commented Sep 10, 2022

I am also using the same react -native version. And I am running on a real device (Samsung galaxy A03)

I tried everything I could. I clean the project and rebuilt it, Deleted the node modules and re installed it. But nothing works for me.

@a7medev
Copy link
Owner

a7medev commented Sep 10, 2022

Does it work when you uninstall it?

@DeepikaSharma5
Copy link
Author

DeepikaSharma5 commented Sep 10, 2022

Yes. My app is working fine before install the package and after uninstall it

These are the other packages I am using. May be @react-native-ml-kit/image-labeling is not supported when one of these package is installed....

`"dependencies": {

"@miblanchard/react-native-slider": "^2.1.0",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-community/netinfo": "^9.3.0",
"@react-navigation/bottom-tabs": "^6.3.3",
"@react-navigation/native": "^6.0.12",
"axios": "^0.27.2",
"react": "18.0.0",
"react-native": "0.69.4",
"react-native-app-intro-slider": "^4.0.4",
"react-native-circular-progress-indicator": "^4.4.0",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "^2.5.0",
"react-native-image-crop-picker": "^0.38.0",
"react-native-image-pan-zoom": "^2.1.12",
"react-native-pager-view": "^5.4.25",
"react-native-progress": "^5.0.0",
"react-native-reanimated": "^2.10.0",
"react-native-safe-area-context": "^4.3.3",
"react-native-screens": "^3.16.0",
"react-native-svg": "^13.1.0",
"react-native-tab-view": "^3.1.1",
"react-native-uuid": "^2.0.1",
"react-native-vector-icons": "^9.2.0",
"react-native-vision-camera": "^2.14.1",
"vision-camera-face-detector": "https://github.com/DeepikaSharma5/vision-camera-face-detector#master",
"vision-camera-image-labeler": "^0.1.6"

},`

` "devDependencies": {

"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"@tsconfig/react-native": "^2.0.2",
"@types/jest": "^26.0.23",
"@types/react-native": "^0.69.3",
"@types/react-native-vector-icons": "^6.4.11",
"@types/react-test-renderer": "^18.0.0",
"@typescript-eslint/eslint-plugin": "^5.29.0",
"@typescript-eslint/parser": "^5.29.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "^0.70.3",
"react-test-renderer": "18.0.0",
"typescript": "^4.4.4"

},`

@a7medev
Copy link
Owner

a7medev commented Sep 10, 2022

Most likely it's conflicting with vision-camera-image-labeler since they both depend on the com.google.mlkit:image-labeling Android package. Looking at their GitHub repo. RN ML Kit uses version 17.0.7 while Vision Camera uses version 17.0.5.

@DeepikaSharma5
Copy link
Author

Oh I'll try removing that package and use @react-native-ml-kit/image-labeling directly. But will this package work for iOS also? (Because vision-camera-image-labeler is not working well with iOS)

@a7medev
Copy link
Owner

a7medev commented Sep 10, 2022

Yes, it will. Let me know if you have any issues.

@DeepikaSharma5
Copy link
Author

Sure. I'll update you soon. Thankyou for your support

@a7medev a7medev closed this as completed Sep 11, 2022
@DeepikaSharma5
Copy link
Author

Hi. I uninstalled vision-camera-image-labeler and checked. But still the app is crashing without and error or warning message

@DeepikaSharma5
Copy link
Author

I think the issue is vision-camera-face-detector. That is also using RN ML Kit. That's why it's conflicting

@a7medev
Copy link
Owner

a7medev commented Sep 12, 2022

Is it working now after removing conflicting packages?

@DeepikaSharma5
Copy link
Author

@a7med-mahmoud I think it will work. I need to chage a lot of code if I remove that package. I am working on that.

But when I tried your face detection example project I am getting the values like this.
image

Can I know why the contours value is always showin as this without value.

@a7medev
Copy link
Owner

a7medev commented Sep 12, 2022

What do you mean by shown like this? You mean that "Object" thing in the values?
Can you try printing it with this instead?

console.log(JSON.stringify(result, null, 2));

@DeepikaSharma5
Copy link
Author

Oh sorry I mistakenly passed the faces value. I'll remove other conflice packages and try both these packages. I'll check it in android and IOS and let you know. Thankyou for the support 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working image labeling
Projects
None yet
Development

No branches or pull requests

2 participants