The first question that comes to mind: why is the plugin using this camera: https://github.com/shaithana/cordova-plugin-wezka-nativecamera
This is obviously a fork. You may have a good reason. It is also out of date. The last installment was a year ago.
Perhaps you want to give a shot to the "official" plugin: https://github.com/apache/cordova-plugin-camera
Going into details, not knowing more about your testing environment (which device is the Android version using it) and not being able to view all the code related, is not possible, and the answers cannot give any reliable recommendations for change.
Have you ensured that the camera plug-in cannot be called before "deviceready" has been started? Is cordova.js loaded?
Update: You can also switch from raw warnings to console output. I have learned several times that warnings in callbacks caused by plugins can cause some problems.
Typically, use console.log() instead of alert() and connect to Chrome (chrome: // inspect) on the emulator or device to see what happens. You can optionally use adb logcat to view the device log.
source share