The smart contract code in David Pradellâs tutorial âUnity Web3 for Beginners - Smart Contract Interaction, Solidity, Hardhat, Moralis, C#, WebGLâ is not working in Android. It successfully runs in the Unity Editor on my PC and also when I build for WebGL . When I build and run on my Android phone, the dapp works almost to completion - it writes a proper record in the MoriaGatesEvent table but then pauses with the message âWaiting for Contract EventâŚâ. Interestingly, it eventually continues, but only when the record is âconfirmedâ in the database, which has taken typically about 10-12 minutes, but it continues, unfortunately, by closing itself in Android - yes, the app shuts down . Has anyone else observed this behavior?
Is there an error log of the crash, so maybe someone can relate to the errors.
Hi John - yes, I have a logcat file and would be glad to share it with anyoneâŚ
Yes share the log here please - if it is too long to post, cut out any non errors or info related to the crash. Does it happen on an emulated Android device?
Hi glad - I cleared the logcat, then filtered the adb logcat command to only show Moralis logs, then fired up the app, waited until it crashed, the copied the logs - thereâs about 2500 logged lines of Moralis info. Is there another way to sent the text file? Iâve created a shared Google drive and put it there - can you dm me so I can share it with you?
Btw, I donât have an emulated Android device installedâŚ
You can use something like https://www.codepile.net/
Btw, I donât have an emulated Android device installedâŚ
I see, was wanting to see if the same issue happens on another device/phone.
Right. Iâve been meaning to dig out one of my older Android phones an use it for testing as well. I currently use a Samsung Galaxy S20 FE 5G running Android 11. Thanks for the codepile tip, I put the logcat output here: https://www.codepile.net/pile/vPDXWzPy
Hi glad - I dragged out my OnePlus 7T Android phone and installed MoriaGates and it behaves exactly as it does on my Samsung Galaxy S20, both running Android 11, as described earlier.
I see, there are a few crash errors in the log but Iâm not sure what they mean exactly.
Yes. I downloaded the repo and built without any changes. It works perfectly when run in the PC Unity Editor environment and when built and run in WebGLâŚ