Page 1 of 1

Android Game Freezes in "Downloading assets"

Posted: Fri Feb 23, 2024 7:54 pm
by stwkun
I have created a game for android and uploaded it to googleplay but when I run it (on my mobile) it freezes at "Downloading assets..."

I am using renpy 8.2.0, my phone has enough space to download and it has andorid 10

any solution?

Image

Re: Android Game Freezes in "Downloading assets"

Posted: Wed Feb 28, 2024 11:19 am
by stwkun
The game also does not work when Google does internal tests to verify the operation of the application

Image

Re: Android Game Freezes in "Downloading assets"

Posted: Wed Feb 28, 2024 11:55 am
by downover
I think you and I are trying to do the same thing at the same time! I did not run into this issue, but I've found this useful when debugging android updater issues:

You can find the log.txt in the game's files. For me, I had to adb shell into the device, then navigate to storage/emulated/0/android/<bundle id>/files. From there you can cat the log.txt (and errors.txt/traceback.txt if there is one).

Here's an example of how I do it from the windows command line, assuming your device is listed in `adb devices`:

Code: Select all

adb shell
panther:/ $ cd storage/emulated/0/android/data
panther:/storage/emulated/0/android/data $ cd com.downover.helloworld/
panther:/storage/emulated/0/android/data/com.downover.helloworld $ ls
files
panther:/storage/emulated/0/android/data/com.downover.helloworld $ cd files
panther:/storage/emulated/0/android/data/com.downover.helloworld/files $ ls
log.txt  saves
panther:/storage/emulated/0/android/data/com.downover.helloworld/files $ cat log.txt

Re: Android Game Freezes in "Downloading assets"

Posted: Wed Mar 06, 2024 8:44 pm
by stwkun
I have tried creating a new game, using renpy version 8.2.1. Renpy creates the .aab file and I upload this file to googleplay. When I test it on my phone it still stays on the "Downloading assets..." screen.

I have windows 10 and I have installed OpenJDK21U-jdk_x64_windows_hotspot_21.0.2_13


This is the log file, in case it helps

Code: Select all

2024-03-07 00:17:24 UTC
Windows-10-10.0.19041
Ren'Py 8.2.1.24030407

Early init took 0.20s
Loading error handling took 0.11s
Loading script took 3.15s
Loading save slot metadata took 0.05s
Loading persistent took 0.00s
Set script version to: None (alternate path)
 - Init at launcher/game/android.rpyc:24 took 0.30556 s.
 - Init at launcher/game/installer.rpyc:6 took 0.34519 s.
Running init code took 1.50s
Loading analysis data took 0.04s
Analyze and compile ATL took 0.01s
Reloading save slot metadata took 0.03s
Index archives took 0.00s
Backing up script files to 'C:\\Users\\stw\\AppData\\Roaming/RenPy/backups\\renpy-8.2.1-sdk':
Dump and make backups took 0.04s
Cleaning cache took 0.00s
Making clean stores took 0.00s
Initial gc took 0.12s
DPI scale factor: 1.000000
nvdrs: Loaded, about to disable thread optimizations.
nvdrs: Disabled thread optimizations.
Creating interface object took 1.36s
Cleaning stores took 0.00s
Init translation took 0.10s
Build styles took 0.00s
Load screen analysis took 0.00s
Analyze screens took 0.03s
Save screen analysis took 0.05s
Prepare screens took 0.21s
Save pyanalysis. took 0.05s
Save bytecode. took 0.05s
Running _start took 0.00s
Interface start took 0.16s

Initializing gl2 renderer:
primary display bounds: (0, 0, 1920, 1080)
swap interval: 1 frames
Windowed mode.
Vendor: "b'NVIDIA Corporation'"
Renderer: b'GeForce GT 730/PCIe/SSE2'
Version: b'4.6.0 NVIDIA 391.35'
Display Info: None
Screen sizes: virtual=(800, 600) physical=(651, 488) drawable=(651, 488)
Maximum texture size: 4096x4096
Eliminating __pycache__...

Re: Android Game Freezes in "Downloading assets"

Posted: Thu Mar 07, 2024 1:32 am
by downover
I am also 100% blocked on using the updater on android. As soon as I have time off from work I'll make example projects demonstrating the problem. One of my projects starts the downloaded game twice, causing errors anywhere 'default' is used. The other, a much larger project, simply cycles through the download over and over again, each time thinking that 3 files have been modified.

It's really frustrating debugging this because the log file is written to protected storage, so I have to modify Ren'Py to get it to write in an accessible location.

Re: Android Game Freezes in "Downloading assets"

Posted: Sat Mar 09, 2024 1:13 am
by PyTom
The log comes out over logcat, so you can get access to it that way.

Re: Android Game Freezes in "Downloading assets"

Posted: Sat Mar 09, 2024 5:17 pm
by downover
That's good to know, thank you! I'll use that from now on.

Working on this today. I'll set something up in github with both the downloader and the downloaded game as minimal as possible and work up from there until I hit the problems!

Re: Android Game Freezes in "Downloading assets"

Posted: Sat Mar 09, 2024 5:31 pm
by PyTom
A couple things:

* Make sure you're on 8.2.1 or the fix branch, as there have been a lot of fixes to this.
* There's also a known problem with Google Play. Your best bet is to contact @GooglePlayBiz on X, and see if they can fix it.

Re: Android Game Freezes in "Downloading assets"

Posted: Sat Mar 09, 2024 7:48 pm
by downover
PyTom wrote: Sat Mar 09, 2024 1:13 am The log comes out over logcat, so you can get access to it that way.
I don't think it does. I'm specifically talking about the logging in 00updater.rpy. I should see either "Verifying with ECDSA." or "Verifying with RSA." and I see neither. I also inserted a log into the start of the download() function and it does not display in ADB.

The only way I've been able to access that log is changing this line:

Code: Select all

                self.log = open(os.path.join(self.updatedir, "log.txt"), "w")
to:

Code: Select all

                self.log = open(os.path.join(os.environ["ANDROID_PUBLIC"], "updater_log.txt"), "w")
When I make that change, a file updater_log.txt appears next to log.txt and has a ton of info that's not in logcat.

I'll attach adb_logcat.txt, log.txt, and updater_log.txt to this post. adb_logcat.txt is filtered to the package name "com.example.downloader".

Re: Android Game Freezes in "Downloading assets"

Posted: Sat Mar 09, 2024 7:58 pm
by downover
PyTom wrote: Sat Mar 09, 2024 5:31 pm A couple things:

* Make sure you're on 8.2.1 or the fix branch, as there have been a lot of fixes to this.
* There's also a known problem with Google Play. Your best bet is to contact @GooglePlayBiz on X, and see if they can fix it.
8.2.2 nightly fixed the issue that I was currently blocked on, but only on an actual android phone, not on an emulated phone - even an emulated version of the same phone!

I'll open a new post on the issue I see in emulator.

Re: Android Game Freezes in "Downloading assets"

Posted: Sat Mar 09, 2024 9:23 pm
by downover
8.2.2 nightly fixed EVERYTHING for me! I'm not uploading to google play so maybe the bug you're seeing doesn't apply to my game stwkun.

Only issue I see is the emulation issue which is not a big deal for me. I logged an issue on github for it: https://github.com/renpy/renpy/issues/5403

Re: Android Game Freezes in "Downloading assets"

Posted: Wed Mar 13, 2024 1:24 pm
by Tentopanga
I am very interested in knowing how to solve this problem. I am also trying to upload a game to Android and this problem is not letting me (and I have already tried a thousand things), in my case the 8.2.2 nightly patch has not solved the problem, the game continues to show a “download of assets” infinite when I upload the game to Android it downloads it as an internal test.

I am going to provide a little extra information that may help you solve the error: if I make a new project in renpy from 0 and try to upload it to Google, this error also appears. I insist, a new project without any extra information, just the base with the phrase "You have created a new Ren'Py game."


If someone manages to solve it, please share the solution. Thank you.