I am building a mobile app and it works fine within retool with the app user mode but when I try it in the the retool mobile app on android it will open the first, second screen but when I open the detailscreen it will crash the app in total.
I have no idea how to troubleshoot this to be honest. I already tried to change queries to variables, remove logic change screens but it will always crash. What can I do?
Thanks for the tip, don't think that's the case, it's a very small query with just a few records for testing and I am using a samsung s23 so should be ok.
Looks like another user is running into a similar issue. What version of Retool are you using? It appears the issue was resolved for this user by upgrading to the current cloud version.
@suparn not sure why it does work on iOS and the app in user mode online
2024-07-25 10:26:38.905 1791-1791 LayerHistory surfaceflinger I com.retool.retool/com.retool.retool.MainActivity$_27133#17004 Max (can't resolve refresh rate)
2024-07-25 10:26:39.179 27133-27448 LiquidCoreRuntimeEngine com.retool.retool D LOG: Raw Data:,[object Object]
2024-07-25 10:26:39.179 27133-27448 LiquidCoreRuntimeEngine com.retool.retool D LOG: Denominations String:,25,35,50,75,100
2024-07-25 10:26:39.181 27133-27448 LiquidCoreRuntime com.retool.retool E Got unexpected exception exception:Error: JSObject not an array
Error: JSObject not an array
at log (<code>:12:34)
at v (<code>:1376:320)
at Object.log (<code>:1376:606)
at eval (__retool_user_code.js:18:11)
at <code>:1353:1645
at Generator.next (<anonymous>)
at n (<code>:22:70)
at v (<code>:22:281)
at <code>:22:340
at new Promise (<code>:2071:2047)
Error: JSObject not an array
at org.liquidplayer.javascript.JSValue.toJSArray(JSValue.java:388)
at org.liquidplayer.javascript.JSValue.toJavaObject(JSValue.java:440)
at org.liquidplayer.javascript.JSFunction.function(JSFunction.java:504)
at org.liquidplayer.javascript.JSFunction.functionCallback(JSFunction.java:466)
at org.liquidplayer.javascript.JNIJSObject.callAsFunction(Native Method)
at org.liquidplayer.javascript.JNIJSObject.callAsFunction(JNIJSObject.java:58)
at org.liquidplayer.javascript.JSFunction.apply(JSFunction.java:413)
at org.liquidplayer.javascript.JSFunction.call(JSFunction.java:377)
at org.liquidplayer.javascript.JSContext$2$1.run(JSContext.java:175)
2024-07-25 10:26:39.184 27133-27448 AndroidRuntime com.retool.retool E FATAL EXCEPTION: Thread-51
Process: com.retool.retool, PID: 27133
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object[] org.liquidplayer.javascript.JSBaseArray.toArray(java.lang.Class)' on a null object reference
at org.liquidplayer.javascript.JSValue.toJavaObject(JSValue.java:440)
at org.liquidplayer.javascript.JSFunction.function(JSFunction.java:504)
at org.liquidplayer.javascript.JSFunction.functionCallback(JSFunction.java:466)
at org.liquidplayer.javascript.JNIJSObject.callAsFunction(Native Method)
at org.liquidplayer.javascript.JNIJSObject.callAsFunction(JNIJSObject.java:58)
at org.liquidplayer.javascript.JSFunction.apply(JSFunction.java:413)
at org.liquidplayer.javascript.JSFunction.call(JSFunction.java:377)
at org.liquidplayer.javascript.JSContext$2$1.run(JSContext.java:175)
2024-07-25 10:26:39.197 27133-27235 TrafficStats com.retool.retool D tagSocket(161) with statsTag=0xffffffff, statsUid=-1
2024-07-25 10:26:39.200 27133-27197 InputMethodManager com.retool.retool I invalidateInput
2024-07-25 10:26:39.208 2835-4081 PackageManager system_server D setEnabledSetting : userId = 0 packageName = com.retool.retool cmp = androidx.work.impl.background.systemalarm.RescheduleReceiver newState = 1 callingPackage = com.retool.retool
2024-07-25 10:26:39.208 2835-4081 ApplicationPolicy system_server D getApplicationStateEnabled : pkg = com.retool.retool userId : 0
2024-07-25 10:26:39.209 2835-4081 ApplicationPolicy system_server D getApplicationComponentState : pkg = com.retool.retool userId : 0
2024-07-25 10:26:39.212 27133-27133 unknown:WrappingUtils com.retool.retool W Don't know how to round that drawable: com.facebook.react.views.image.ReactImageDownloadListener$EmptyDrawable@95e013
// Fetch data from the getDemoninations query
const rawData = getDemoninations.data;
let denominationsArray = [];
if (rawData && rawData.denominations && rawData.denominations.length > 0) {
const denominationsString = rawData.denominations[0];
denominationsArray = denominationsString.split(',').map(Number);
}
// Return the processed data
return denominationsArray;
@james.lee thanks for the update, I cleared the cache of the app, removed the data, but still the same issue. Any idea how I can change this query to work with android? Sorry my developer skills are limited
// Fetch data from the getDemoninations query
const rawData = getDemoninations.data;
let denominationsArray = [];
if (rawData && rawData.denominations && rawData.denominations.length > 0) {
const denominationsString = rawData.denominations[0];
denominationsArray = denominationsString.split(',').map(Number);
}
// Return the processed data
return denominationsArray;