Page 1 of 1

Downloader for Large Games on Mobile keeps reloading downloader game instead of downloaded game

Posted: Mon Mar 18, 2024 10:50 pm
by downover
I'm continuing to struggle with the Downloader for Large Games on Mobile. The 8.3.0 nightly fixed most of my issues, but I'm having an issue now where the game will download all 7 GB of my update, then restart and re-download 5 files (3 changed, 2 new). This process repeats and the downloaded game never loads.

Code: Select all

254 files are unchanged.
5 files are new/changed.
Created a plan with 7 entries.

  changed game/cache/bytecode-39.rpyb
  changed game/cache/py3analysis.rpyb
  changed game/cache/screens.rpyb
  new     update/current.json
  new     update/key.pem
It's been pretty hard to diagnose, since the log for 00updater.rpy writes to a private folder and doesn't broadcast to logcat. I changed the logger to write to update_log.txt next to log.txt, and changed it to append instead of write mode. The logs I've attached are both from the same session and represent one session which repeats the download cycle 2 times.

Code: Select all

Old:
            # The logfile that update errors are written to.
            try:
                self.log = open(os.path.join(self.updatedir, "log.txt"), "w")

Code: Select all

New:
            # The logfile that update errors are written to.
            try:
                self.log = open(os.path.join(os.environ["ANDROID_PUBLIC"], "update_log.txt"), "a")
I'm having trouble finding exactly what is happening. In my sample project, which works fine, after the download completes, I never even see the downloader game - the downloaded game launches immediately instead. Where is the code responsible for that, so I can try to figure out what's going wrong? I'm going through and adding logging to 00updater.rpy in an attempt to figure it out.

Re: Downloader for Large Games on Mobile keeps cycling

Posted: Mon Mar 18, 2024 11:30 pm
by downover
I've tried deleting the game/cache folder but it's regenerated on build.

current.json and key.pem are created during the update process.

Re: Downloader for Large Games on Mobile keeps cycling

Posted: Tue Mar 19, 2024 12:02 am
by downover
get_alternate_base() is returning "/data/user/0/com.altosandherdone.headmaster.downloader/files/base". That looks right to me - when I play in launcher it creates a folder called /base/ in the base directory for the (simulated) downloaded game.

Re: Downloader for Large Games on Mobile keeps cycling

Posted: Tue Mar 19, 2024 12:36 am
by downover
I'm going to have to leave it at here for the night. Would appreciate any tips/thoughts!

My best guess is that it's just loading the wrong game in a loop. I don't see bootstrap happening and I don't see any errors indicating that it's TRYING to load the downloaded game and failing - it just appears to keep launching the downloader game.

Re: Downloader for Large Games on Mobile keeps reloading downloader game instead of downloaded game

Posted: Tue Mar 19, 2024 4:52 pm
by downover
I think I found it. Stupid mistake on my part - I put the downloader in label splashscreen. With that in mind, what I'm seeing makes total sense! Will post again once verified fixed.

Re: Downloader for Large Games on Mobile keeps reloading downloader game instead of downloaded game

Posted: Tue Mar 19, 2024 5:39 pm
by downover
Never mind, that's actually what the example app says to do. Still an issue.