As the title says, we are struggling to produce a working release version of our app using our normal pipeline in App Center. When I build the app via command line using the release flags locally, there is no problem with the output APK.
And likewise when the build runs on app center, there is nothing to suggest a problem with the build either, except once installed and ran, the app crashes immediately after the splash screen.
We recently upgraded to gradle 7.3.3 and as a result had to upgrade to JAVA 11 for this, and likewise add the environment key JAVA_HOME : $(JAVA_HOME_11_X64)
to our environment variables on App Center.
Has anyone else encountered this.
The biggest issue is that without being able to replicate this in a locally produced release build, we can't work out how to debug the problem, the app center produced release build has no error logging whatsoever. It silently crashes.
The only concerning part of the app center logs appear to be as below.
EDIT: To make things more interesting, I added debuggable true
to the release config of build.gradle, and that build ran fine.... don't know what that so drastically changed
info Writing bundle output to:, /Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle
info Writing sourcemap output to:, /Users/runner/work/1/s/android/app/build/intermediates/sourcemaps/react/release/index.android.bundle.packager.map
info Done writing bundle output
info Done writing sourcemap output
info Copying 201 asset files
info Done copying assets
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:3242:23: warning: the variable "DebuggerInternal" was not declared in function "__shouldPauseOnThrow"
return typeof DebuggerInternal !== 'undefined' && DebuggerInternal.shouldPauseOnThrow === true;
^~~~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:6950:7: warning: the variable "setTimeout" was not declared in function "logCapturedError"
setTimeout(function () {
^~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:5337:23: warning: the variable "clearTimeout" was not declared in anonymous function " 153#"
cancelTimeout = clearTimeout;
^~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:9717:30: warning: the variable "__REACT_DEVTOOLS_GLOBAL_HOOK__" was not declared in anonymous function " 153#"
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:9735:68: warning: the variable "nativeFabricUIManager" was not declared in anonymous function " 187#"
null != handle._nativeTag && (handle._internalInstanceHandle ? nativeFabricUIManager.dispatchCommand(handle._internalInstanceHandle.stateNode.node, command, args) : _$$_REQUIRE(_dependencyMap[2]).UIManager.dispatchViewManagerCommand(handle._nativeTag, command, args));
^~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:10629:5: warning: the variable "setImmediate" was not declared in function "handleResolved"
setImmediate(function () {
^~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:14139:12: warning: the variable "fetch" was not declared in anonymous function " 352#"
fetch: fetch,
^~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:14140:14: warning: the variable "Headers" was not declared in anonymous function " 352#"
Headers: Headers,
^~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:14141:14: warning: the variable "Request" was not declared in anonymous function " 352#"
Request: Request,
^~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:14142:15: warning: the variable "Response" was not declared in anonymous function " 352#"
Response: Response
^~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:14318:24: warning: the variable "FileReader" was not declared in function "readBlobAsArrayBuffer"
var reader = new FileReader();
^~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:14363:36: warning: the variable "Blob" was not declared in anonymous function " 363#"
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
^~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:14365:40: warning: the variable "FormData" was not declared in anonymous function " 363#"
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
^~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:14367:44: warning: the variable "URLSearchParams" was not declared in anonymous function " 363#"
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
^~~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:14644:23: warning: the variable "XMLHttpRequest" was not declared in anonymous function " 372#"
var xhr = new XMLHttpRequest();
^~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:14151:76: warning: the variable "self" was not declared in anonymous function " 355#"
var global = typeof globalThis !== 'undefined' && globalThis || typeof self !== 'undefined' && self || typeof global !== 'undefined' && global;
^~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:19151:27: warning: the variable "performance" was not declared in anonymous function " 522#"
if ("object" === typeof performance && "function" === typeof performance.now) {
^~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:19166:62: warning: the variable "MessageChannel" was not declared in anonymous function " 522#"
if ("undefined" === typeof window || "function" !== typeof MessageChannel) {
^~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:24720:32: warning: the variable "requestAnimationFrame" was not declared in function "onUpdate"
this._animationFrame = requestAnimationFrame(this.onUpdate.bind(this));
^~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:61349:16: warning: the variable "Intl" was not declared in function "intlFormat"
return new Intl.DateTimeFormat((_localeOptions = localeOptions) === null || _localeOptions === undefined ? undefined : _localeOptions.locale, formatOptions).format(date);
^~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:75869:16: warning: the variable "navigator" was not declared in function "isStandardBrowserEnv"
if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' || navigator.product === 'NativeScript' || navigator.product === 'NS')) {
^~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:76189:51: warning: the variable "btoa" was not declared in function "dispatchXhrRequest"
requestHeaders.Authorization = 'Basic ' + btoa(***name + ':' + password);
^~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:77621:32: warning: the variable "AggregateError" was not declared in anonymous function " 2057#"
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
^~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:77630:25: warning: the variable "Atomics" was not declared in anonymous function " 2057#"
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
^~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:77631:24: warning: the variable "BigInt" was not declared in anonymous function " 2057#"
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
^~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:77644:38: warning: the variable "FinalizationRegistry" was not declared in anonymous function " 2057#"
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
^~~~~~~~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:77669:35: warning: the variable "SharedArrayBuffer" was not declared in anonymous function " 2057#"
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
^~~~~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:77683:25: warning: the variable "WeakRef" was not declared in anonymous function " 2057#"
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
^~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:142236:41: warning: the variable "getComputedStyle" was not declared in function "generateLayersText"
var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);
^~~~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:140522:18: warning: the variable "MutationObserver" was not declared in anonymous function " 3601#"
if (typeof MutationObserver !== 'undefined') _MUTATION_OBSERVER = MutationObserver;
^~~~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:171057:32: warning: the variable "crypto" was not declared in function "rng"
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
^~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:171057:130: warning: the variable "msCrypto" was not declared in function "rng"
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
^~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:225075:18: warning: Direct call to eval(), but lexical scope is not supported.
return eval("(".concat(source, ")"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:225079:19: warning: Direct call to eval(), but lexical scope is not supported.
var f = eval("(".concat(source, ")"));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/runner/work/1/s/android/app/build/generated/assets/react/release/index.android.bundle:227293:17: warning: the variable "__fbBatchedBridge" was not declared in function "getHost"
if ((typeof __fbBatchedBridge === "undefined" ? "undefined" : _typeof(__fbBatchedBridge)) !== 'object' || hostname !== 'localhost' && hostname !== '127.0.0.1') {
^~~~~~~~~~~~~~~~~