-
Notifications
You must be signed in to change notification settings - Fork 34
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
⬆️ Track upgrade to cordova [email protected] and [email protected] #554
Comments
There are a few plugins that don't install correctly:
|
Let's first fix our plugins, so that we know what the correct format should look like |
There is also a workaround: We can first install the "broken" plugin using
And then if we try to install the dependent plugin, it finds the "fetched" plugin and installs it.
|
For the non-emission plugins, they don't list their dependencies in
|
For the e-mission plugins, there are two issues:
|
Next steps:
Depending on the responses to the cordova-lib bug, decide whether to upgrade to [email protected] or not
|
Ended up resolving https://github.com/apache/cordova-lib/issues/845 instead because I got sucked into it. The issue was with an old version of phonegap in the dependencies. Upgrading to a newer version of phonegap fixes everything in #554 (comment) Our plugins still fail because of
So modified next steps:
|
Switch to the most recent version of all pluginsInstalled and ran It detected and applied the following updates
|
While comparing the changes, the newly added plugin had removed |
After these upgrades, iOS compiles. Making the hook changes first so that we can get android to compile as well and start checking in partial updates. |
Made hook changes and fixed all names. Was able to add all plugins.
The only plugin that appears to currently use AndroidX is
Downgrading it to 5.6.8, upgrading gradle version to 6.5 and retrying. |
both android and iOS now compile successfully. Current status:
Next step: Edit the data collection plugin |
Actually, next step: trying to run the app 😄 app runs fine in android, but basically hangs in iOS. This is really weird because it gets to
But the intro template is not displayed. I should probably revert to the older version of the webview, ensure that it works and then roll forward. |
ios combinations are below:
So basically, the upgrade to [email protected] breaks ionic webview. |
Created MCVE Let's stay on [email protected] until this is resolved. Now, next step is to edit the data collection plugin |
while editing the data collection plugin, one thought is whether we should send the incoming data directly as an int or as text. Right now, we get it as text and convert to int. But the default parameter on android is int, so we could just sent the int directly. Decision is to send the int directly. Pros:
As long as the ints are stable (and they have been for many years now), this should be stable. |
done editing the data collection plugin, but can't yet confirm that it works because I can't install the apk on the phone. Let's upgrade to the most recent version of the google play services library and test everything together. |
Switching to the most recent version of the google play services library (17.0.0) introduces androidx. Searching for
We can fix all of our plugins. For the other plugins:
If it is hard to fix the first two, we can just use https://github.com/dpa99c/cordova-plugin-androidx-adapter which uses a cordova hook to fix the source code dynamically. |
Removed all our android.support dependencies EXCEPT in Going back to the working version of the AppAuth library since I am not sure who (if anybody) is using AppAuth. Might remove OpenID support if nobody steps up to test it. Also, the new Fortunately, it looks like setting
According to the docs:
So maybe this will automagically work for these few holdouts. |
Remaining instances of
|
jetifier did not work
... Let's try the workaround plugin next https://github.com/dpa99c/cordova-plugin-androidx-adapter |
that did work. Woo!
We can still migrate plugins or submit PRs, but this seems like it is close to being done. |
Current status:
Next steps: Fixing local notification + testing |
Switching to the most recent version of This simplifies the code for the services significantly and can probably simplify it even further if we had the daring to refactor further. Performed first level of simplification: switching from PendingResult to Task and handling all the resulting code refactoring. Will remove all references to |
While testing this in the emulator, we get ~ 7-8 location intents and then we stop getting them. Need to test on real phones before proceeding with the refactoring. |
Trying to test on an older emulator. Alas, it generates a WSOD. Upgrading the emulator's chrome to the most recent version to retry... Note that there are multiple apk sites and we may need to use multiple of them to find an apk that works with our desired API level. |
I think that this is a problem with the emulator since it happens on pre-O as well. Will test on real phones later. Let's test some corner cases wrt enabling and disabling location. Tried turning location permissions on/off and location type to device-only. We don't get the promised Geofence exit with error if the phone is in "waiting_for_trip_start". But on initialize, we get the proper prompts to turn everything on. Moving on to second round of refactoring and then trying to fix trip end notifications. |
Second round of refactoring also done. Moving on to trip end notification fixing (at least on android). |
After some minor fixes, trip end notifications on both android and iOS work. iOS doesn't seem to have actions, though. Not sure how much time I have to fix that though. |
Fixed iOS actions - this was basically javascript fixes for the new spec format. Now, time to configure for a real server and for push notifications, and then publish an alpha version for people to start testing at least the tracking. |
On android, we get an error saying "String resource ID #0x0" from the push plugin. The push plugin generates this error from
where
From the android documentation, there needs to be a resource file with that key, but we don't have it. Do we need to create a fork that includes phonegap/phonegap-plugin-push#2873? Why doesn't the existing cordova-plugin-google-services work? |
ok, so the
So we don't seem to have this xml file in the prior upgrade as well, but I know that the push plugin worked there. Let's try to re-run it and confirm. |
Hm, so I got the same error in the previous build too. But I know that it worked when I tested it on my older laptop. Going back to check that... |
ok, so I checked the repo in my old (UC Berkeley laptop) and there is a |
Even on the old laptop, if I check out a fresh repo, the file doesn't show up. That is good in a way, because it indicates that the build process is indeed reproducible. But it is bad because I don't understand why it doesn't work now when it did earlier. |
I went back to commit e-mission/e-mission-phone@59c9ae4 before the script fixes, and have the SAME outcome. According to https://developers.google.com/android/guides/google-services-plugin, we can recreate the XML files with the correct values and everything Should Just Work. Using that workaround to publish this initial version using the files from the old laptop. |
ionic-team/cordova-plugin-ionic-webview#594 resolved, moved back up to [email protected] |
SSL issues again while connecting on iOS, resolved on connecting without VPN |
android still has issues with the google play services. The google play services xml file is not recognized by the build process, is not merged, and is not included in R.java. Trying to figure out where to put the xml file so that it will be recognized. Last step! |
|
Uploaded beta versions to the Play store and to TestFlight. Current status:
|
+ enable androidX (e-mission/e-mission-docs#554 (comment)) + remaining instances of `android.support e-mission/e-mission-docs#554 (comment) + add the androidx adapter plugin to fix them Everything compiles now
Only real bug reported from beta testing is #555. |
#555 is caused by an incompatible change in the emailComposer plugin. |
One sec, before creating the new release, we need to commit and release all the plugins and fix the URLs. |
`android.support` is now deprecated https://developer.android.com/jetpack/androidx Changes tracked in e-mission/e-mission-docs#554 (comment)
`android.support` is now deprecated https://developer.android.com/jetpack/androidx Changes tracked in e-mission/e-mission-docs#554 (comment)
`android.support` is now deprecated https://developer.android.com/jetpack/androidx Changes tracked in e-mission/e-mission-docs#554 (comment)
`android.support` is now deprecated https://developer.android.com/jetpack/androidx Changes tracked in e-mission/e-mission-docs#554 (comment)
`android.support` is now deprecated https://developer.android.com/jetpack/androidx Changes tracked in e-mission/e-mission-docs#554 (comment)
`android.support` is now deprecated https://developer.android.com/jetpack/androidx Changes tracked in e-mission/e-mission-docs#554 (comment)
wrt e-mission/e-mission-docs#554 (comment) the native instructions suggest adding it to build.gradle So I looked at `build.gradle` and found ``` if (cdvHelpers.getConfigPreference('GradlePluginGoogleServicesEnabled', 'false').toBoolean()) { apply plugin: 'com.google.gms.google-services' } ``` That just clarified that we don't have to wait for the plugins to edit the config file, we can just edit the config file directly. After adding the preferences, I don't get the push notification error on startup, AND ``` platforms/android/app//build/generated/res/google-services/debug/values/values.xml ``` has the appropriate value. This should be the last pending issue
This bug is a follow on to #519, tracking the upgrade to the even more recent versions of cordova.
The text was updated successfully, but these errors were encountered: