Can try yes. The issue is we need it to work for both platforms, otherwise we need to look for another solution.
Chrome remote debugging should provide better errors messages and let us know what’s going on. We’re unable to determine why your app is having issues, but we’d like to understand and get you working.
Continuing on Android, but build fails.
https://apps.volt.build/1787a66f-55c3-4994-8f64-fab90c9d4201/voltbuilder.log
UserError: FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:processDebugResources’.
A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
See log for full details.
Deeper in the logs
Android resource linking failed
de.meinrecycling.app-mergeDebugResources-4:/values/values.xml:1723: error: style attribute ‘android:attr/windowOptOutEdgeToEdgeEnforcement’ not found.
error: failed linking references.
I am able to run a full build with ionic cordova build android --verbose --configuration=production --release
You’re targeting SDK 34, but that style attribute was added in SDK 35. If you target SDK 35, you should be able to move forward.
Thanks that helped! Now with Chrome Debugging I got all this output:
Refused to load the stylesheet 'https://use.fontawesome.com/releases/v5.6.3/css/all.css' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'style-src-elem' was not explicitly set, so 'default-src' is used as a fallback.
Understand this errorAI
cordova.fe622b649fa6d9870308.js:1 Could not find cordova.js script tag. Plugin loading may fail.
device.js:80 [ERROR] Error initializing cordova-plugin-device: Class not found
(anonymous) @ device.js:80Understand this errorAI
network.js:88 Error initializing Network Connection: Class not found
main.eedd44670ab3cca5bd62.js:2 Uncaught EvalError: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "default-src 'self'".
at Function (<anonymous>)
at Object.<anonymous> (main.eedd44670ab3cca5bd62.js:2:653334)
at Object.<anonymous> (main.eedd44670ab3cca5bd62.js:2:653379)
at e (main.eedd44670ab3cca5bd62.js:2:630726)
at Object.<anonymous> (main.eedd44670ab3cca5bd62.js:2:646756)
at e (main.eedd44670ab3cca5bd62.js:2:630726)
at Object.<anonymous> (main.eedd44670ab3cca5bd62.js:2:636575)
at e (main.eedd44670ab3cca5bd62.js:2:630726)
at Object.<anonymous> (main.eedd44670ab3cca5bd62.js:2:634830)
at e (main.eedd44670ab3cca5bd62.js:2:630726)Understand this errorAI
cordova.fe622b649fa6d9870308.js:1 deviceready has not fired after 5 seconds.
cordova.fe622b649fa6d9870308.js:1 Channel not fired: onCordovaInfoReady
cordova.fe622b649fa6d9870308.js:1 Channel not fired: onFileSystemPathsReady
main.eedd44670ab3cca5bd62.js:2 Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.
(anonymous) @ main.eedd44670ab3cca5bd62.js:2Understand this warningAI
index.html:1 Refused to load the stylesheet 'https://use.fontawesome.com/releases/v5.6.3/css/all.css' because it violates the following Content Security Policy directive: "default-src 'self'". Note that 'style-src-elem' was not explicitly set, so 'default-src' is used as a fallback.
Your CSP is too restrictive - that’s what the errors are about. Something like this should allow you to move forward:
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-eval' https://use.fontawesome.com;">
You also seem to be missing the cordova.js
script tag, as per this error: Could not find cordova.js script tag. Plugin loading may fail.
On the one hand, the CSP is probably still too restrictive, but I also see so many plugin warnings.
Is it because in volt builder, you are using newer versions of Cordova for building ?
The app loads in android but has 0 styling and buttons are not working. I wonder if I can reproduce the environment locally.
We are running our build with these versions:
- node @14.16.0
- cordova @10.0.0
- ionic @5.4.16
vendor.js:101823 Native: tried calling FirebaseX.onMessageReceived, but the FirebaseX plugin is not installed.
vendor.js:101829 Install the FirebaseX plugin: 'ionic cordova plugin add cordova-plugin-firebasex'
main.js:28187 MR-LOGGER - 2025-04-15 08:17:28.794 - DEBUG - Initializing deep link navigation service
main.js:28187 MR-LOGGER - 2025-04-15 08:17:28.813 - DEBUG - Detected native environment, subscribing to dynamic links
vendor.js:101823 Native: tried calling FirebaseDynamicLinks.onDynamicLink, but the FirebaseDynamicLinks plugin is not installed.
vendor.js:101829 Install the FirebaseDynamicLinks plugin: 'ionic cordova plugin add cordova-plugin-firebase-dynamiclinks'
main.js:28176 MR-LOGGER - 2025-04-15 08:17:28.813 - ERROR - FIREBASE DYNAMIC LINK: component outer error, "plugin_not_installed"
Array(1)
main.js:28187 MR-LOGGER - 2025-04-15 08:17:28.814 - DEBUG - Initializing app
vendor.js:101823 Native: tried calling StatusBar.styleDefault, but the StatusBar plugin is not installed.
vendor.js:101829 Install the StatusBar plugin: 'ionic cordova plugin add cordova-plugin-statusbar'
vendor.js:101823 Native: tried calling StatusBar.overlaysWebView, but the StatusBar plugin is not installed.
vendor.js:101829 Install the StatusBar plugin: 'ionic cordova plugin add cordova-plugin-statusbar'
vendor.js:101823 Native: tried calling Keyboard.disableScroll, but the Keyboard plugin is not installed.
vendor.js:101829 Install the Keyboard plugin: 'ionic cordova plugin add cordova-plugin-ionic-keyboard'
vendor.js:101823 Native: tried calling Keyboard.hideFormAccessoryBar, but the Keyboard plugin is not installed.
vendor.js:101829 Install the Keyboard plugin: 'ionic cordova plugin add cordova-plugin-ionic-keyboard'
vendor.js:90184 Refused to apply inline style because it violates the following Content Security Policy directive: "default-src 'self' 'unsafe-eval' https://use.fontawesome.com". Either the 'unsafe-inline' keyword, a hash ('sha256-x8lrhw8sW1y4QqYJk5/TpUCQI40bnIB6STdqgFHlqFk='), or a nonce ('nonce-...') is required to enable inline execution. Note also that 'style-src' was not explicitly set, so 'default-src' is used as a fallback.
Yes - you still need to include a less restrictive CSP. The one I included above would help. Additionally you still seem to be missing a reference to cordova.js
. I suspect that’s why your plugins aren’t initialized.
That version of node has been out support for years now and several plugins have dropped support. I would suggest at least updating to v18, if not the latest LTS (v22).
Cordova 10 is over 5 years old, and updating to Cordova 12 shouldn’t break much if anything. The build engine version is generally what’s important here - most of our users have the best luck building with the latest engines (14 for Android and 7 for iOS).
We actually don’t care what version of ionic you use as it’s a front-end library. You are free to use what you wish.