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

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
downover
Regular
Posts: 38
Joined: Sun Feb 25, 2024 1:36 am
Contact:

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

#1 Post 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.
Attachments
log.txt
(7.68 KiB) Downloaded 4 times
update_log.txt
(29.17 KiB) Downloaded 4 times
Last edited by downover on Tue Mar 19, 2024 12:36 am, edited 1 time in total.

downover
Regular
Posts: 38
Joined: Sun Feb 25, 2024 1:36 am
Contact:

Re: Downloader for Large Games on Mobile keeps cycling

#2 Post 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.

downover
Regular
Posts: 38
Joined: Sun Feb 25, 2024 1:36 am
Contact:

Re: Downloader for Large Games on Mobile keeps cycling

#3 Post 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.

downover
Regular
Posts: 38
Joined: Sun Feb 25, 2024 1:36 am
Contact:

Re: Downloader for Large Games on Mobile keeps cycling

#4 Post 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.

downover
Regular
Posts: 38
Joined: Sun Feb 25, 2024 1:36 am
Contact:

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

#5 Post 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.

downover
Regular
Posts: 38
Joined: Sun Feb 25, 2024 1:36 am
Contact:

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

#6 Post by downover »

Never mind, that's actually what the example app says to do. Still an issue.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot], Milkymalk