AltStore icon indicating copy to clipboard operation
AltStore copied to clipboard

AltJIT timeouts too early while attempting to connect to device, resulting in python3 timed out. AltServer.ProcessError 0

Open RedstoneGithub opened this issue 1 year ago • 11 comments

For performing JIT on macOS sonoma 14.0 (M1 Pro) and iOS 17.1.1 (iPhone 14 Pro), it would take ~32 seconds and ~20 seconds to connect to pymobiledevice3 and start the debugger, using the terminal (./python3 -m pymobiledevice3 remote start-quic-tunnel and ./python3 -m pymobiledevice3 developer debugserver start-server respectively) but AltStore times out at 20 and 10 seconds respectively, resulting in an error while trying to enable JIT: The process python3 timed out.

Screenshot 2023-11-13 at 7 40 03 PM

After downloading the repo and, in the EnableJIT swift file, increasing the rsdTunnel timeout to ~~40~~ 80 seconds and the debugserver timeout to ~~40~~ 80 seconds, it works perfectly fine. The exact time may need to be changed, but 20 and 10 seconds was definitely too short for my device.

func startRSDTunnel() async throws -> RemoteServiceDiscoveryTunnel
    {
        do
        {
            Logger.main.info("Starting RSD tunnel...")
            
            let process = try Process.launch(.python3, arguments: ["-u", "-m", "pymobiledevice3", "remote", "start-quic-tunnel", "--udid", self.udid], environment: self.processEnvironment)
            
            do
            {
                let rsdTunnel = try await withTimeout(seconds: 80) {
                    let regex = Regex {
                        "--rsd"
                        
func startDebugServer(rsdTunnel: RemoteServiceDiscoveryTunnel) async throws -> Int
    {
        do
        {
            Logger.main.info("Starting debugserver...")
            
            return try await withTimeout(seconds: 80) {

Edit: clarify which file I edited Edit 2: I have tried a few more times and this time it took around 60 seconds. The timeout should be increased to about 80.

RedstoneGithub avatar Nov 14 '23 03:11 RedstoneGithub

I'm having this same issue, looking forward to when a fix is released

clintebbesen avatar Nov 16 '23 03:11 clintebbesen

I'm having the same issue, hoping the team will fix it soon

Kimcheesee avatar Nov 16 '23 21:11 Kimcheesee

@RedstoneGithub after changing the timeout duration, what other steps did you take in order to workaround this issue for now?

Kimcheesee avatar Nov 17 '23 03:11 Kimcheesee

@RedstoneGithub Is it possible to change it easily without compiling entire app?

Kuba799500 avatar Nov 22 '23 12:11 Kuba799500

@RedstoneGithub Greetings. Sorry to bother you but would you mind sharing your build ? I have issues building my own and I have a free developper account. Thanks in advance and have a great day. Best regards.

Kowken avatar Nov 27 '23 12:11 Kowken

@RedstoneGithub Hi, I would interested in the build as well would you mind sharing it?

Lambdacreator avatar Nov 27 '23 23:11 Lambdacreator

If anyone here wants to test this, we'll be releasing an extended timeout version if everything works as it should AltServer.zip

shanegillio avatar Nov 28 '23 15:11 shanegillio

@shanegillio Thanks for sharing now it works perfectly!

Lambdacreator avatar Nov 29 '23 22:11 Lambdacreator

Still not working for me even after the switch to 80 seconds.

HDevApps avatar Dec 04 '23 15:12 HDevApps

same here... tried the zip file posted above but still getting the same issue (and indeed, performing the connection in terminal does work)

DigNeurosurgeon avatar Dec 22 '23 15:12 DigNeurosurgeon

When i pasted that code into terminal all it gave me is this: zsh: parse error near do' Can someone please tell me why this is?

CrediblePigeon7 avatar Apr 19 '24 10:04 CrediblePigeon7