Errors Starting App in Android 4.1 and 4.4

I recently built a new version of a mobile app, the first time since late 2019. One unexpected problem is no longer does the app work on Android 4 (specifically complaints about 4.1 and 4.4), which correspond to API 16-19. I can’t find a minimum supported version of Android in the Trigger documentation. The config.json file doesn’t specify a minimum version. The Google Play store indicates the minimum API is 16. As of the last version I build in late 2019, it still functioned on Android 4.1.

Below is a console log with errors from trying to start up the add in the Android emulator running OS 4.1.

[ INFO] E/Forge ( 2077): Uncaught SyntaxError: Unexpected token = – From line 2374 of https://localhost:31929/src/scripts/scripts.js
[ INFO] E/Forge ( 2077): Uncaught Error: [$injector:modulerr] Failed to instantiate module kidreports2App due to:
[ INFO] E/Forge ( 2077): Error: [$injector:nomod] Module ‘kidreports2App’ is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
[ INFO] E/Forge ( 2077): http://errors.angularjs.org/1.3.20/$injector/nomod?p0=kidreports2App
[ INFO] E/Forge ( 2077): at https://localhost:31929/src/scripts/modules.js:52:14
[ INFO] E/Forge ( 2077): at https://localhost:31929/src/scripts/modules.js:1611:19
[ INFO] E/Forge ( 2077): at ensure (https://localhost:31929/src/scripts/modules.js:1540:40)
[ INFO] E/Forge ( 2077): at module (https://localhost:31929/src/scripts/modules.js:1609:16)
[ INFO] E/Forge ( 2077): at https://localhost:31929/src/scripts/modules.js:3594:24
[ INFO] E/Forge ( 2077): at forEach (https://localhost:31929/src/scripts/modules.js:292:22)
[ INFO] E/Forge ( 2077): at loadModules (https://localhost:31929/src/scripts/modules.js:3581:7)
[ INFO] E/Forge ( 2077): at createInjector (https://localhost:31929/src/scripts/modules.js:3515:13)
[ INFO] E/Forge ( 2077): at https://localhost:31929/src/scripts/modules.js:1319:22
[ INFO] E/Forge ( 2077): at bootstrap (https://localhost:31929/src/scripts/modules.js:1341:14)
[ INFO] E/Forge ( 2077): http://errors.angularjs.org/1.3.20/$injector/modulerr?p0=kidreports2App&p1=Error%3A%20%5B%24injector%3Anomod%5D%20Module%20’kidreports2App’%20is%20not%20available!%20You%20either%20misspelled%20the%20module%20name%20or%20forgot%20to%20load%20it.%20If%20registering%20a%20module%20ensure%20that%20you%20specify%20the%20dependencies%20as%20the%20second%20argument.%0Ahttp%3A%2F%2Ferrors.angularjs.org%2F1.3.20%2F%24injector%2Fnomod%3Fp0%3Dkidreports2App%0A%20%20%20%20at%20https%3A%2F%2Flocalhost%3A31929%2Fsrc%2Fscripts%2Fmodules.js%3A52%3A14%0A%20%20%20%20at%20https%3A%2F%2Flocalhost%3A31929%2Fsrc%2Fscripts%2Fmodules.js%3A1611%3A19%0A%20%20%20%20at%20ensure%20(https%3A%2F%2Flocalhost%3A31929%2Fsrc%2Fscripts%2Fmodules.js%3A1540%3A40)%0A%20%20%20%20at%20module%20(https%3A%2F%2Flocalhost%3A31929%2Fsrc%2Fscripts%2Fmodules.js%3A1609%3A16)%0A%20%20%20%20at%20https%3A%2F%2Flocalhost%3A31929%2Fsrc%2Fscripts%2Fmodules.js%3A3594%3A24%0A%20%20%20%20at%20forEach%20(https%3A%2F%2Flocalhost%3A31929%2Fsrc%2Fscripts%2Fmodules.js%3A292%3A22)%0A%20%20%20%20at%20loadModules%20(https%3A%2F%2Flocalhost%3A31929%2Fsrc%2Fscripts%2Fmodules.js%3A3581%3A7)%0A%20%20%20%20at%20createInjector%20(https%3A%2F%2Flocalhost%3A31929%2Fsrc%2Fscripts%2Fmodules.js%3A3515%3A13)%0A%20%20%20%20at%20https%3A%2F%2Flocalhost%3A31929%2Fsrc%2Fscripts%2Fmodules.js%3A1319%3A22%0A%20%20%20%20at%20bootstrap%20(https%3A%2F%2Flocalhost%3A31929%2Fsrc%2Fscripts%2Fmodules.js%3A1341%3A14) – From line 3617 of https://localhost:31929/src/scripts/modules.js

The error occurs in an initialization method that is getting some data from an Ajax call.

Do you have any tips on the source of the problem?
Is Android API 16 still supported?

We try to sync the minimum versions supported by Forge to what Google and Apple support. For Android this is currently API 14.

That said, some modules may force this to be higher. For instance the oauth module relies on API’s that are only available on API 16 or higher.

In your specific case I’d start by attaching the Chrome remote debugger to your device and looking at why the ajax call is failing.

Where is the ajax call being made to? Are you using the device WebView’s built-in xhr implementation to make the ajax call or something else?

Sometimes you can also get useful information if you also check the Android debug log output with:

adb logcat