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 crashes on Android with java.lang.IllegalStateException: DeepAR not yet initialized! #44

Open
javelwill opened this issue Apr 20, 2024 · 3 comments

Comments

@javelwill
Copy link

Hello, I am currently working on an app that crashes on startup with the error below. Could anyone provide insights on what might be causing this error? Any help would be greatly appreciated. Thank you!

Your app just crashed. See the error below.
java.lang.IllegalStateException: DeepAR not yet initialized! Can't call this method before the DeepAR is initialized.
ai.deepar.ar.DeepAR.checkValidState(DeepAR.java:662)
ai.deepar.ar.DeepAR.receiveFrame(DeepAR.java:680)
com.reactnativedeepar.CameraXHandler$1$1.analyze(CameraXHandler.java:112)
androidx.camera.core.ImageAnalysis.lambda$setAnalyzer$2(ImageAnalysis.java:476)
androidx.camera.core.ImageAnalysis$$ExternalSyntheticLambda2.analyze(Unknown Source:2)
androidx.camera.core.ImageAnalysisAbstractAnalyzer.lambda$analyzeImage$0$androidx-camera-core-ImageAnalysisAbstractAnalyzer(ImageAnalysisAbstractAnalyzer.java:285)
androidx.camera.core.ImageAnalysisAbstractAnalyzer$$ExternalSyntheticLambda1.run(Unknown Source:14)
android.os.Handler.handleCallback(Handler.java:942)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loopOnce(Looper.java:226)
android.os.Looper.loop(Looper.java:313)
android.app.ActivityThread.main(ActivityThread.java:8741)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)

@AshishhIMG
Copy link

AshishhIMG commented Apr 22, 2024

hey @javelwill you found the solution ?? , m also stuck on this issue

@javelwill
Copy link
Author

Hey @AshishhIMG I couldn't pinpoint the source of the error, but it started working for me after I closely followed the example provided in the repository

@Fang-dev73
Copy link

Instead of giving width and height in percentage, give it in pixels or using Dimensions it will start working

hey @javelwill you found the solution ?? , m also stuck on this issue

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

No branches or pull requests

3 participants