[AEROGEAR-9750] Document Cordova 9 workaround

            Seems like Cordova 9.0.0 had issues a year ago and they needed and update. I haven't followed up since

            Feel free to close since it hasn't been bothering anyone for a year

            Summers Pittman (Inactive) added a comment - Seems like Cordova 9.0.0 had issues a year ago and they needed and update. I haven't followed up since Feel free to close since it hasn't been bothering anyone for a year

            Paul Wright added a comment -

            I think it's a known issue, that Push doesn't work with Cordova 9, as you suggested above. supittma@redhat.com wdyt?

            Paul Wright added a comment - I think it's a known issue, that Push doesn't work with Cordova 9, as you suggested above. supittma@redhat.com wdyt?

            pwright@redhat.com ok to close this?

            Brian Dooley added a comment - pwright@redhat.com ok to close this?

            Current policy is that we dont document workarounds. Likely to say we dont support cordova 9.

            Brian Dooley added a comment - Current policy is that we dont document workarounds. Likely to say we dont support cordova 9.

            bdooley@redhat.com could you take a look

            Paul Wright added a comment - bdooley@redhat.com could you take a look

            pwright@redhat.com I'm not a good writer I have added some ideas around what we need to document on release here. Feel free to rephrase it.

            Daniel Passos (Inactive) added a comment - pwright@redhat.com I'm not a good writer I have added some ideas around what we need to document on release here. Feel free to rephrase it.

            Cordova 9

            Failed to restore plugin

            There is a knowledge issue on Cordova 9 which make `cordova prepare` fail to restore plugins

            Example of the error message:

            Failed to restore plugin "cordova-plugin-..." from config.xml. You might need to try adding it again.
            

            There are two possible workarounds:

            • Downgrade to Cordova 8, and re-add all the plugins
            • Use cordova platform add ... and cordova plugin add ... for each platforms and plugins each time you need to restore them instant of cordova prepare

            Android

            Conflict in AndroidManifest.xml

            This is difficult to detect, but while adding a new plugin or building the app you may see this more warning message:

            Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes
            

            this message appear also if there is no real conflict, but it still prevent the plugin configuration to be applied.

            When the conflict is caused by one or more configurations that should be applied to the `AndroidManifest.xml`, as for example for the cleartext traffic option `android:usesCleartextTraffic="true"`, the workaround is to use the full path, like this: <edit-config file="app/src/main/AndroidManifest.xml" ... instant of only the file name ... file="AndroidManifest.xml" ... (even if suggested in the Cordova edit-config documentation). The final result should look like this:

            <widget xmlns:android="http://schemas.android.com/apk/res/android">
              <platform name="android">
                <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
                    <application android:usesCleartextTraffic="true" />
                </edit-config>
              </platform>
            </widget>
            

            Daniel Passos (Inactive) added a comment - Cordova 9 Failed to restore plugin There is a knowledge issue on Cordova 9 which make `cordova prepare` fail to restore plugins Example of the error message: Failed to restore plugin "cordova-plugin-..." from config.xml. You might need to try adding it again. There are two possible workarounds: Downgrade to Cordova 8, and re-add all the plugins Use cordova platform add ... and cordova plugin add ... for each platforms and plugins each time you need to restore them instant of cordova prepare Android Conflict in AndroidManifest.xml This is difficult to detect, but while adding a new plugin or building the app you may see this more warning message: Conflict found, edit-config changes from config.xml will overwrite plugin.xml changes this message appear also if there is no real conflict, but it still prevent the plugin configuration to be applied. When the conflict is caused by one or more configurations that should be applied to the `AndroidManifest.xml`, as for example for the cleartext traffic option `android:usesCleartextTraffic="true"`, the workaround is to use the full path, like this: <edit-config file="app/src/main/AndroidManifest.xml" ... instant of only the file name ... file="AndroidManifest.xml" ... (even if suggested in the Cordova edit-config documentation ). The final result should look like this: <widget xmlns:android= "http: //schemas.android.com/apk/res/android" > <platform name= "android" > <edit-config file= "app/src/main/AndroidManifest.xml" mode= "merge" target= "/manifest/application" > <application android:usesCleartextTraffic= " true " /> </edit-config> </platform> </widget>

              bdooley@redhat.com Brian Dooley
              pwright@redhat.com Paul Wright
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: