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 when deployed to Google Play Console Internal Testing #796

Closed
promie opened this issue Sep 25, 2022 · 2 comments
Closed

App crash when deployed to Google Play Console Internal Testing #796

promie opened this issue Sep 25, 2022 · 2 comments

Comments

@promie
Copy link

promie commented Sep 25, 2022

Good morning,

We have attempted to deploy our app to Google Play Internal Testing. The branch that we are trying to deploy is not the latest with the master branch.

The code on this branch still generates the .apk extension in the sign_and_align_keys.sh script, whereas the new Google standard now only accepts the .aab extension to upload to the Play Console. Understandably there has been an update to this script file to accomodate that change.

The workaround approach we took to tackle this was to borrow the above script when running the Android build hoping that the .aab extension will be generated instead of the .apk.

However, the change in that script alone still does not generate the .aab extension. The next step we tried was to "borrow" the setup and bin folders from the latest code as well as package.cordovabuild.json to get the latest version of cordova and then ran the build script. The .aab extension was successfully generated as per our expectation in which we were able to upload to Google Play Console for Internal Testing.

We also did refer to this issue: #680

Once deployed, we tested the app on a physical Android device but it kept crashing. When checking the logs on the Crashes and ANRs report, below screenshot of the stack trace.

image

Please advise if there is any step configuration step that was missed that is causing the app to crash.

@promie
Copy link
Author

promie commented Sep 25, 2022

One thing to also note is that on our main branch (which is up-to-date) with the master branch has no issue with the app crashing and we can deploy successfully. It is just this particular branch we want to release on the app store as it includes our own custom TimeUse functionality.

We are also in the process of applying the TImeUse functionality to the main branch but encountered a separate issue we are vigorously looking into. So we figured we want to (re)deploy the working app (which is out of date) for the users to use.

Any assistance and guidance is appreciated. Thank you so much in advance.

@shankari
Copy link
Contributor

shankari commented Sep 27, 2022

The error is right there - it is missing the ACTIVITY_RECOGNITION permission.
Make sure you have the version of the e-mission-data-collection plugin that has that permission.
And that the permission is reflected in the AndroidManifest.xml in the platforms/android directory.

grep -r ACTIVITY_RECOGNITION platforms/android/ in my working directory
platforms/android//app/build/intermediates/merged_manifest/release/AndroidManifest.xml:    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/merged_manifest/release/AndroidManifest.xml:    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/merged_manifest/debug/AndroidManifest.xml:    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/merged_manifest/debug/AndroidManifest.xml:    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/bundle_manifest/release/AndroidManifest.xml:    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/bundle_manifest/release/AndroidManifest.xml:    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/merged_manifests/release/AndroidManifest.xml:    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/merged_manifests/release/AndroidManifest.xml:    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/merged_manifests/debug/AndroidManifest.xml:    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/merged_manifests/debug/AndroidManifest.xml:    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
Binary file platforms/android//app/build/intermediates/module_bundle/release/base.zip matches
Binary file platforms/android//app/build/intermediates/project_dex_archive/release/out/edu/berkeley/eecs/emission/cordova/tracker/verification/SensorControlConstants.dex matches
Binary file platforms/android//app/build/intermediates/project_dex_archive/debug/out/edu/berkeley/eecs/emission/cordova/tracker/verification/SensorControlConstants.dex matches
Binary file platforms/android//app/build/intermediates/javac/release/classes/edu/berkeley/eecs/emission/cordova/tracker/verification/SensorControlConstants.class matches
Binary file platforms/android//app/build/intermediates/javac/debug/classes/edu/berkeley/eecs/emission/cordova/tracker/verification/SensorControlConstants.class matches
platforms/android//app/build/intermediates/manifest_merge_blame_file/release/manifest-merger-blame-release-report.txt:37    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/manifest_merge_blame_file/release/manifest-merger-blame-release-report.txt:38    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt:37    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/manifest_merge_blame_file/debug/manifest-merger-blame-debug-report.txt:38    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
Binary file platforms/android//app/build/intermediates/intermediary_bundle/release/intermediary-bundle.aab matches
Binary file platforms/android//app/build/intermediates/dex/release/mergeDexRelease/classes.dex matches
Binary file platforms/android//app/build/intermediates/dex/debug/mergeProjectDexDebug/14/classes.dex matches
platforms/android//app/build/intermediates/packaged_manifests/release/AndroidManifest.xml:    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/packaged_manifests/release/AndroidManifest.xml:    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/packaged_manifests/debug/AndroidManifest.xml:    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/intermediates/packaged_manifests/debug/AndroidManifest.xml:    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/build/outputs/logs/manifest-merger-debug-report.txt:uses-permission#com.google.android.gms.permission.ACTIVITY_RECOGNITION
platforms/android//app/build/outputs/logs/manifest-merger-debug-report.txt:uses-permission#android.permission.ACTIVITY_RECOGNITION
platforms/android//app/build/outputs/logs/manifest-merger-release-report.txt:uses-permission#com.google.android.gms.permission.ACTIVITY_RECOGNITION
platforms/android//app/build/outputs/logs/manifest-merger-release-report.txt:uses-permission#android.permission.ACTIVITY_RECOGNITION
platforms/android//app/src/main/AndroidManifest.xml:    <uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/src/main/AndroidManifest.xml:    <uses-permission android:name="android.permission.ACTIVITY_RECOGNITION" />
platforms/android//app/src/main/java/edu/berkeley/eecs/emission/cordova/tracker/verification/SensorControlConstants.java:    public static String MOTION_ACTIVITY_PERMISSION = Manifest.permission.ACTIVITY_RECOGNITION;
platforms/android//android.json:              "xml": "<uses-permission android:name=\"com.google.android.gms.permission.ACTIVITY_RECOGNITION\" />",
platforms/android//android.json:              "xml": "<uses-permission android:name=\"android.permission.ACTIVITY_RECOGNITION\" />",

Note that only changing the package.json is not enough to get the new version of cordova plugins
You need to remove and re-add, or delete all plugins and reinstall
Please see previous issues or search for "cordova plugin not updated"

@promie promie closed this as completed Oct 8, 2022
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

2 participants