Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updater unable to download files on Android emulator #5403

Open
do10HM opened this issue Mar 10, 2024 · 5 comments
Open

Updater unable to download files on Android emulator #5403

do10HM opened this issue Mar 10, 2024 · 5 comments

Comments

@do10HM
Copy link
Contributor

do10HM commented Mar 10, 2024

I'm working on setting up a huge game using the Downloader for Large Games on Mobile. I've run into lots of issues so I tried making as bare-bones an implementation as possible. It's hosted here:

https://github.com/do10HM/renpy-android-downloader-example/tree/main

When I follow the steps listed in the readme, I'm able to launch the downloaded game without issue. However, when I follow them on an emulator, even if it's the exact same hardware, I get this issue:

https://github.com/do10HM/renpy-android-downloader-example/tree/issue/protocol-error?tab=readme-ov-file#issue-protocol-error

ProtocolError: (
'Connection broken: IncompleteRead(3952381 bytes read, 219 more expected)', 
IncompleteRead(3952381 bytes read, 219 more expected)) 
This game cannot be run until the game data has been downloaded.

Every time I try 'retry', the exact bytes change.

Not a big issue and it's not blocking me, but ideally emulator should work.
Tested on Ren'Py renpy-8.2.2.24030501+nightly-sdk. Pixel 7 API 30

@qTich
Copy link
Contributor

qTich commented Mar 10, 2024

I think the problem is possible on your side, because I have everything working correctly according to your test.
Or maybe it fixed this problem, try the latest nightly build.

image
image

@do10HM
Copy link
Contributor Author

do10HM commented Mar 10, 2024

Thought I was on latest! I'll try the 8.3 stream. Thank you!

@do10HM
Copy link
Contributor Author

do10HM commented Mar 10, 2024

Hmm. Still happening in 8.3. I'll grab the updater log.txt tomorrow and see if I can find any clues.

@do10HM
Copy link
Contributor Author

do10HM commented Mar 10, 2024

Got the full stacks from the base/update/log.txt but not much other info in there. I'm not very familiar with this system but it looks like it's streaming chunks and somehow the last chunk is not being read. No idea why that would differ on emulator vs device. I'll try putting some logging in tomorrow as I don't think there's any way to breakpoint and step through the python.

Traceback (most recent call last):
  File "lib/python3.9/urllib3/response.py", line 710, in _error_catcher
  File "lib/python3.9/urllib3/response.py", line 835, in _raw_read
urllib3.exceptions.IncompleteRead: IncompleteRead(2087789 bytes read, 81 more expected)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "lib/python3.9/requests/models.py", line 816, in generate
  File "lib/python3.9/urllib3/response.py", line 940, in stream
  File "lib/python3.9/urllib3/response.py", line 911, in read
  File "lib/python3.9/urllib3/response.py", line 835, in _raw_read
  File "lib/python3.9/contextlib.py", line 137, in __exit__
  File "lib/python3.9/urllib3/response.py", line 727, in _error_catcher
urllib3.exceptions.ProtocolError: ('Connection broken: IncompleteRead(2087789 bytes read, 81 more expected)', IncompleteRead(2087789 bytes read, 81 more expected))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "renpy/common/00updater.rpy", line 549, in fetch_files_rpu
  File "lib/python3.9/requests/api.py", line 73, in get
  File "lib/python3.9/requests/api.py", line 59, in request
  File "lib/python3.9/requests/sessions.py", line 589, in request
  File "lib/python3.9/requests/sessions.py", line 747, in send
  File "lib/python3.9/requests/models.py", line 899, in content
  File "lib/python3.9/requests/models.py", line 818, in generate
requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(2087789 bytes read, 81 more expected)', IncompleteRead(2087789 bytes read, 81 more expected))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "renpy/common/00updater.rpy", line 404, in run
  File "renpy/common/00updater.rpy", line 451, in update
  File "renpy/common/00updater.rpy", line 1096, in check_versions
  File "renpy/common/00updater.rpy", line 1069, in add_dlc_state
  File "renpy/common/00updater.rpy", line 552, in fetch_files_rpu
store.updater.UpdateError: Could not download file list: ('Connection broken: IncompleteRead(2087789 bytes read, 81 more expected)', IncompleteRead(2087789 bytes read, 81 more expected))

@do10HM
Copy link
Contributor Author

do10HM commented Mar 10, 2024

Yeah, not sure what's going on. None of this code is in ren'py except the requests.get. Must either be a bug in python 3.9, which seems unlikely, or something in my local setup.

I'll leave this open for a bit longer while I investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants