[Solved]Downloader for Large Games on Mobile key.pem inconsistencies

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:

[Solved]Downloader for Large Games on Mobile key.pem inconsistencies

#1 Post by downover »

I've been working on using the Downloader to download a very large game onto Android. I've created a downloader app that looks at an updates.json I'm hosting locally. I've then created two different apps - one based on the ren'py example tutorial (4mb download), the other the full game I'm working on exporting (7gb total) and exported their update through ren'py.

When I download either app using the ren'py launcher, they both download, then launch. When I download the smaller test app on android, it downloads, then launches. When I download the enormous game on android, it refuses to load. I see the error "Could not verify update signature."

Looking at the source code, one thing that jumps out at me is that if the key.pem file has not been downloaded/extracted yet, the entire validation is bypassed. So I began to suspect a race condition.

I edited my Ren'Py source to include a new log line right above line 994:

Code: Select all

            self.log.write("Seeing if we have a key at : " + str(key) + ". Exists: " + str(os.path.exists(key)) + "\n")
Sure enough, when launched through the ren'py launcher, both apps log that no key.pem was found, despite it being in that folder. The small test app on Android also shows no key.pem. But the huge 7GB app does find a key, and uses it to verify the signature, and that fails.

As soon as I have time I'll make an example app and write up a github issue but I wanted to get thoughts. Is there something I'm missing? Is there anyone with the updater who could suggest why, when it DOES find the file, it fails validation?
Last edited by downover on Fri Mar 01, 2024 11:09 pm, 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 key.pem inconsistencies

#2 Post by downover »

Looks like it's fixed in the nightly build!

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Ocelot, TiagoRocha