(10-13-2021, 11:32 PM)mark_talluto Wrote:(10-13-2021, 09:28 PM)Hendricus Wrote: I am having the same issues when using LiveCode 9.6.3 with android. But when trying with LiveCode 9.6.5 (rc 1) it doesn't even get to the cdb_auth in my login script. I get an error trying to start up when testing the app on my android phone connected via USB.
Quote:We encountered an error while initializing CanelaDB: 573,33,1,tsNetLibUrlReuseConnection
253,33,1241,30,1,libraryStack
353,0,0,stack "/data/app/~~6iGhweJfYfAE3UYYJfopSw==/com.dricus.jobstarpro-7iYWRkhHuLf3no--Zbyzeg==/base.apk/CanelaDB/libraries/CDB_Starter.lib"
Am I overlooking anything? Any hints and tips are welcome.
Hi Hendricus,
I think going with LC 9.6.5, and newer is required when doing Android builds.
Did you include tsNet in your inclusions in the standalone builder?
(10-14-2021, 04:57 PM)mark_talluto Wrote: Yep, 9.6.3 will not work with LiveCloud thank to the changes on the SSL certs we use. 9.6.5 is the only working version for Android apps.
Are you by chance using the trial version of 9.6.5? There is a bug in LC where it generates standalones that do not work.
If it is not a trial, which tier on the new pricing page are you on? Maybe there are other bugs related to different tiers that may be breaking your app.
Ok. Let's run these LiveCode numerical errors through the paces.
573,33,1,tsNetLibUrlReuseConnection
-573 means "Handler: can't find handler" (This would indicate tsNet is not loaded. That handler is in the tsNet library. We are dead in the water at this point).
253,33,1241,30,1,libraryStack
-253 means "if-then: error in statement" (This is because the tsNet call above is wrapped in an if-then).
353,0,0,stack "/data/app/~~6iGhweJfYfAE3UYYJfopSw==/com.dricus.jobstarpro-7iYWRkhHuLf3no--Zbyzeg==/base.apk/CanelaDB/libraries/CDB_Starter.lib"
-353 means "Object Name:" (This one is less helpful since it did not return any practical value. Since these fired in order, I can ascertain that CanelaDB can not proceed without tsNet in place.)
Here are some facts:
1. You properly setup your initializeCanelaDB code. You would not be able to get this error otherwise.
2. tsNet is not working as expected. It may not be initializing in time to be used. We have a wait 0 at the top of the initializeCanelaDB code to buy the engine time to init is internals.
3. You successfully made an APK for Android and have it running based on your last error code.
4. I am not sure if your tried loading your database before making any cdb calls. cdb_loadTable() - (https://docs.livecloud.io/LoadTable/)
These are my initial thoughts. I am sorry it is not a clear cut answer. If you can get back to me on my questions, we may be able to boil this down a bit. I can tell you that we have working Android APKs that we build once or twice a week here working perfectly well. Knowing this inspires me to get to the bottom of this.
Thank you Mark. I have only tried using LiveCode 9.6.5 RC-1 on my Windows laptop as I do Android testing there. I have activated the LiveCode IDE using an Indy license. I just installed the same version on my MacOS system (Catalina) and testing it on the Simulator (iPhone 8 - 14.4) I get the very same initializing CanelaDB error message, so it is not Android specific then. To answer point 4: I have the initializeCanelaDB script copied into my main stack which is called from the preOpenStack. The error appears before my login card opens. The cdb_loadTable is called after a user has submitted his email and password and the cab_auth was successful.
on preOpenStack
// Use LiveCloud
If the owner of the target is me then initializeCanelaDB
// Mobile settings
if the environment is "mobile" then
mobileSetKeyboardDisplay "pan"
set the fullscreenmode of me to "exactFit"
set the acceleratedrendering of me to true
end if
...
Perhaps worth mentioning, that after the error message is dismissed the login card is shown, but fields are not scaled to fit the screen it this point (as it does when using LiveCode 9.6.3).