I have been trying to test the openmrs android client and after building the new apk of the version 2.9.0 I managed to push it to my device and log in.
Reproduction of the error:
1- Log in to your instance with your credentials
2- Click on Register patient
3- Fill out the form with mockup data
4- Click submit
5- Error occurs as:
Error occurred
Sorry! An Unknown error has occurred. Please report the details to developers so that it can be resolved as soon as possible.
This error prevents from creating the patient. The same happens when clicking on Find Patients.
I am using ngrok to connect to my localhost instance.
@magp it works fine for me for API level 25, could you reproduce the error while connecting to the demo server ? and can you share the logs for this crash !!
cc @rishabh997@f4ww4z
I uninstalled and installed it again but the problem remains for some reason. I used android studio to build the apk from this source code because as per last friday the application from the play store was still crashing and I did not find an apk that was not crashing other than the one generated from the link provided here. Before uninstalling and installing again I tried to clean cache and check again but without success. cc @saurabh
@magp dont uninstall and reinstall instead try invalidating the Android studio cache on your PC and rebuild the application it should work .
just to help, you can find this option under the menu option in android studio, then clean build the app.
@magp just one more step delete the apk from the debug or release folder based on the build variant you are using and then clean build using android studio, and let me know if it works !!
Here is the log when using the application connected to android studio: https://pastebin.com/GRhcSkXA (although the error is rather at the end)
Yes I used the task clean which deletes the whole build folder and then used Build -> Build Bundle / APK -> Build APK (because using the task âbuildâ does create the build folder and its content but fails with the error: Keystore file âopenmrs-contrib-android-client-2.9.0/release.keystoreâ not found for signing config âreleaseâ )
Lastly I just connected my device to the laptop and used openmrs-client configuration and hit run to push the application to the device and test it while seeing the log in the terminal which logged the error shown in the pastebin link.
looking at this error could you check if you are building a debug version of the app or the release version in the android studio, and could you share the API level in which you are testing the app?
It definitely did, you were right about it being on debug. I have changed it to release now but I have a similar issue as before with the key when buidling:
What went wrong:
Execution failed for task â:openmrs-client:validateSigningReleaseâ.
Keystore file not set for signing config release
This does not build an apk in the outputs folder.
However I am confident that it is because of the store file for the keystore, I then used ârelease.keystore.gpgâ which led to this error:
What went wrong:
Execution failed for task â:openmrs-client:packageReleaseâ.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
SigningConfig âreleaseâ is missing required property âstorePasswordâ.
The store file is definitely right and I just ran it for the debug variant and it runs.
Do you have any emulator available on android studio on your local machine, could you test on API level 25 or more and see if this problem still presists. thanks.
I can try that, however no release apk is being built with this error. Not even with Build â Build Bundle / APK â Build APK (trying like this gives me the error: âSigningConfig âreleaseâ is missing required property âstorePasswordââ)