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

pymobiledevice3 update to 2.31.0 breaks enabling JIT #1345

Open
hscumbie opened this issue Nov 30, 2023 · 79 comments
Open

pymobiledevice3 update to 2.31.0 breaks enabling JIT #1345

hscumbie opened this issue Nov 30, 2023 · 79 comments
Assignees
Labels
bug Something isn't working

Comments

@hscumbie
Copy link

hscumbie commented Nov 30, 2023

After the new release of pymobiledevice3 (Version 2.31.0), JIT is now failing with error:

The process 'altjit' failed with code 1. Could not connect to device <udid>. The process 'python3' returned unexpected output. Error: No such command 'start-quic-tunnel'.

It seems pymobiledevice3 no longer supports the start-quic-tunnel command and now requires start-tunnel instead.

A workaround is to downgrade pymobiledevice3 to Version 2.30.0 by executing python3 -m pip install pymobiledevice3==2.30.0.

EDIT: Also, when downgrading pymobiledevice3, you'll also need to downgrade pip package construct to version 2.10.69 by executing python3 -m pip install construct==2.10.69. This fixes the stream.tell() issues.

EDIT 2: The CommandLineTools version of Python needs to be explicitly called when downgrading pymobiledevice3 and construct. This can be done by executing:

/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install pymobiledevice3==2.30.0 construct==2.10.69

EDIT 3: DolphiniOS users: Use the beta version of DolphiniOS (4.0.0b1 or greater) from AltStore to fix the random crashing issue when launching a game.

EDIT 4: Kudos to @orhid for finding a fix for KeyError: <Epoch.INITIAL: 0>. The solution is to force pip package qh3 to version 0.15.1 (qh3==0.15.1).

@hscumbie hscumbie changed the title pymobiledevice3 breaks enabling JIT pymobiledevice3 update to 2.31.0 breaks enabling JIT Nov 30, 2023
@leixu2txtek
Copy link

Not working for me.

iPad OS 7.1.1

M2 Mac mini

Python 3.9.6

downgrade pymobiledevice3 to Version 2.30.0 got

Error Description
The process 'altjit' failed with code 1. The process 'python3' failed with code 1. stream.tell() failed

Failure Reason
The process 'altjit' failed with code 1. The process 'python3' failed with code 1. stream.tell() failed

Title
JIT could not be enabled for UTM SE.

Source Line
96

executableURL
file:///private/var/folders/jw/z5_wnf7j24zfv9pmm4xczk_m0000gn/T/AppTranslocation/A48E8316-48F6-4C49-BCFC-2B9EBBC5B280/d/AltServer.app/Contents/MacOS/altjit

exitCode
1

output
Mounting personalized developer disk...
❌ Unable to mount personalized Developer Disk.
The process 'python3' failed with code 1. stream.tell() failed

@hscumbie
Copy link
Author

hscumbie commented Dec 1, 2023

A small detail I forgot to add. construct 2.10.70 breaks pymobiledevice3 2.30.0 (pymobiledevice3 2.31.0 was actually pushed to fix this issue with construct but broke other things). Downgrade construct by executing python3 -m pip install construct==2.10.69.

@leixu2txtek
Copy link

A small detail I forgot to add. construct 2.10.70 breaks pymobiledevice3 2.30.0 (pymobiledevice3 2.31.0 was actually pushed to fix this issue with construct but broke other things). Downgrade construct by executing python3 -m pip install construct==2.10.69.

It's done. nice workaround.

@JoshuaGOB
Copy link

Still getting this error:

Source Line
61
executableURL
file:///Applications/AltServer.app/Contents/MacOS/altjit
exitCode
1
output
Usage: python -m pymobiledevice3 remote [OPTIONS] COMMAND [ARGS]...
Try 'python -m pymobiledevice3 remote -h' for help.
Error: No such command 'start-quic-tunnel'.
❌ Unable to enable JIT for AltStore on device 00008101-001164660E80001E.
Could not connect to device 00008101-001164660E80001E. The process 'python3' returned unexpected output. Error: No such command 'start-quic-tunnel'.

Tried downgrading construct first, then downgrading construct and pymobiledevice3, reinstalling AltServer on the M2 and on an iPhone 12 iOS 17.1.

@hscumbie
Copy link
Author

hscumbie commented Dec 2, 2023

Still getting this error:

Source Line
61
executableURL
file:///Applications/AltServer.app/Contents/MacOS/altjit
exitCode
1
output
Usage: python -m pymobiledevice3 remote [OPTIONS] COMMAND [ARGS]...
Try 'python -m pymobiledevice3 remote -h' for help.
Error: No such command 'start-quic-tunnel'.
❌ Unable to enable JIT for AltStore on device 00008101-001164660E80001E.
Could not connect to device 00008101-001164660E80001E. The process 'python3' returned unexpected output. Error: No such command 'start-quic-tunnel'.

Tried downgrading construct first, then downgrading construct and pymobiledevice3, reinstalling AltServer on the M2 and on an iPhone 12 iOS 17.1.

Try executing which python3 and report back what it says. I think AltStore uses the Xcode version of Python and won’t work with user installed Python. This will tell us what your system is defaulting to when downgrading construct and pip.

@bryycee
Copy link

bryycee commented Dec 3, 2023

Hey i’m having the same problem and i’ve been following along and Im getting the exact error do I did the command which python3`` and i’m getting /usr/bin/python3 any help?

image

@romanhmln
Copy link

romanhmln commented Dec 3, 2023

Had the same issue yesterday, but went with @hscumbie workaround and now it fires fine.

python 3.9.6
construct 2.10.69
pymobiledevice3 2.30.0

Try using the versions above and restarting AltServer after you're done.
Also make sure that you've updated the XCode Command Tools in the first place.

@bryycee
Copy link

bryycee commented Dec 3, 2023

what should i do then what commands do i run ?

@hscumbie
Copy link
Author

hscumbie commented Dec 3, 2023

Make sure you have Xcode command line tools installed by running xcode-select —install (that’s a double minus btw idk why my iPhone won’t let me type it). The terminal response will either say they’re installed and up to date, or prompt an install. Also, see what Python binary your PATH variable is pointing to (echo $PATH). My issue was I installed Python 3.12 from python.org. If you run the “update shell” script that comes with the installer, it will alter your $PATH to now point to the python.org binary when executing python3 rather than the Xcode Command line python.

@bryycee
Copy link

bryycee commented Dec 4, 2023

Im still confused on what to do. I did all of this and I need specific instructions can you guys tell me what to run so I can fix this issue thanks

@bryycee
Copy link

bryycee commented Dec 4, 2023

or please add me on discord i need help ill pay anyone my user is fizzrld

@FightMan01
Copy link

Hi! After downgrading I'm getting a new error. Can anyone help me out?
image

@hscumbie
Copy link
Author

hscumbie commented Dec 4, 2023

Im still confused on what to do. I did all of this and I need specific instructions can you guys tell me what to run so I can fix this issue thanks

or please add me on discord i need help ill pay anyone my user is fizzrld

Try this in terminal: /Library/Developer/CommandLineTools/usr/bin/python3 --version. It should return Python 3.9.6, indicating that you have CommandLineTools Python installed. If this fails, try executing xcode-select --install and install the CommandLineTools.

Once you have verified the CommandLineTools Python is installed, now run:

/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install pymobiledevice3==2.30.0 construct==2.10.69

^ The above command explicitly calls the CommandLineTools version of Python that is used by AltServer for enabling JIT.

@boatImpish
Copy link

Im still confused on what to do. I did all of this and I need specific instructions can you guys tell me what to run so I can fix this issue thanks

or please add me on discord i need help ill pay anyone my user is fizzrld

Try this in terminal: /Library/Developer/CommandLineTools/usr/bin/python3 --version. It should return Python 3.9.6, indicating that you have CommandLineTools Python installed. If this fails, try executing xcode-select --install and install the CommandLineTools.

Once you have verified the CommandLineTools Python is installed, now run:

/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install pymobiledevice3==2.30.0 construct==2.10.69

^ The above command explicitly calls the CommandLineTools version of Python that is used by AltServer for enabling JIT.

Thanks, it worked for me.

@shanegillio
Copy link
Collaborator

Is anyone getting this issue where it says it failed to start service?
Screenshot 2023-12-04 at 11 21 42 AM

@hscumbie
Copy link
Author

hscumbie commented Dec 4, 2023

Did you check if the DeveloperDiskImage was mounted with python3 -m pymobiledevice3 mounter auto-mount?

@bryycee
Copy link

bryycee commented Dec 4, 2023

Is anyone getting this issue where it says it failed to start service?

Screenshot 2023-12-04 at 11 21 42 AM

we all are same as me

@bryycee
Copy link

bryycee commented Dec 5, 2023

Im still confused on what to do. I did all of this and I need specific instructions can you guys tell me what to run so I can fix this issue thanks

or please add me on discord i need help ill pay anyone my user is fizzrld

Try this in terminal: /Library/Developer/CommandLineTools/usr/bin/python3 --version. It should return Python 3.9.6, indicating that you have CommandLineTools Python installed. If this fails, try executing xcode-select --install and install the CommandLineTools.

Once you have verified the CommandLineTools Python is installed, now run:


/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install pymobiledevice3==2.30.0 construct==2.10.69

^ The above command explicitly calls the CommandLineTools version of Python that is used by AltServer for enabling JIT.

new issueimage

@shanegillio
Copy link
Collaborator

Not sure why the last comment never uploaded, but anyway! I have this version of AltServer working for me, so curious if it will work for everyone here
AltServer.zip

@shanegillio shanegillio added the bug Something isn't working label Dec 7, 2023
@shanegillio shanegillio self-assigned this Dec 7, 2023
@shanegillio shanegillio moved this to In Development in AltStore Project Board Dec 7, 2023
@mbrown0603
Copy link

After a while of trying to enable JIT I found this forum, tried everything... and IT WORKED!!! Thank you so much!

@hscumbie
Copy link
Author

hscumbie commented Dec 8, 2023

After a while of trying to enable JIT I found this forum, tried everything... and IT WORKED!!! Thank you so much!

Would you mind sharing what system you're on and what version of macOS you're using? I'm still trying to get mine to work without much luck. I think my hardware is too old.

@mbrown0603
Copy link

After a while of trying to enable JIT I found this forum, tried everything... and IT WORKED!!! Thank you so much!

Would you mind sharing what system you're on and what version of macOS you're using? I'm still trying to get mine to work without much luck. I think my hardware is too old.

Using a (I believe 2020) iMac running MacOS 14.1.2 and ipad air 5 running iOS 17.1.2

@hovikgas
Copy link

Not sure why the last comment never uploaded, but anyway! I have this version of AltServer working for me, so curious if it will work for everyone here AltServer.zip

@shanegillio I tried it, and it didn't work... at first I thought it did, because there was no error message, but after waiting for like 2 minutes, I finally tried to load up the Wii menu in Dolphini, which gave the same old screen of "Waiting for JIT" -- and eventually it it finally gave the timeout error of not being able to connect to device... "The process 'python3' timed out."

I'm on a 2019 MBP 16" on macOS 14.1.2 and an iPhone 14 Pro Max on 17.1.1. I downgraded construct and pymobiledevice3 like everyone else mentioned. I double checked to make sure pymobiledevice3 is activated, as well as making sure that the DeveloperDiskImage was mounted successfully by running python3 -m pymobiledevice3 mounter auto-mount

Still doesn't work. Any thoughts?

@shanegillio shanegillio moved this from In Development to In Beta in AltStore Project Board Dec 19, 2023
@GorgonUK
Copy link

So in conclusion, you shall do the following:

  • sudo python3 -m pip install -U pymobiledevice3
  • sudo python3 -m pymobiledevice3 mounter auto-mount
  • sudo python3 -m pymobiledevice3 remote start-tunnel

@shanegillio
Copy link
Collaborator

shanegillio commented Feb 7, 2024

After again having similar issues to ones I've seen in this thread, I noticed that my devices were appearing in Finder but not in Console. Restarted a few times and eventually it did show up in Console and I could successfully enable JIT. If anyone knows why devices don't appear in Console though, I think this would be a helpful troubleshooting tip.

@alexchandel
Copy link

Please support the latest pymobiledevice3. Installing 2.30 is not longer supported by Homebrew, due to semi-broken dependencies.

@jirikrepl
Copy link

jirikrepl commented Mar 25, 2024

hi! i tried this but i keep getting: "Error: No such command 'start-tunnel'" could anyone help please?

The command name in the pythonmobiledevice3 lib was changed doronz88/pymobiledevice3@v2.30.1...v2.31.0#diff-efdaefa9ba2353bf773acab9ea04cea2c48359cb0ee92b6ba279324db7a5077aL125

'start-quic-tunnel' -> 'start-tunnel'

@hscumbie
Copy link
Author

Please support the latest pymobiledevice3. Installing 2.30 is not longer supported by Homebrew, due to semi-broken dependencies.

There seems to be some confusion. You don't use brew/homebrew to install pymobiledevice3. You use pip for installing pymobiledevice3 2.30.0. I just tested this myself and it is installing fine.

@orhid
Copy link

orhid commented Apr 22, 2024

trying to launch tunnel gives this error

KeyError: <Epoch.INITIAL: 0>

which you can actually solve by adding qh3==0.15.1 to the pip install command

@hscumbie
Copy link
Author

trying to launch tunnel gives this error


KeyError: <Epoch.INITIAL: 0>

which you can actually solve by adding qh3==0.15.1 to the pip install command

Amazing find. Was fighting this for a while. Worked like a champ. I'll add as an edit to the OP.

@dgchvz
Copy link

dgchvz commented Apr 28, 2024

Can someone please help me with this error: The process 'altjit' failed with code 1. Could not connect to device 00008101-001138EC2182001E. The process 'python3' returned unexpected output. KeyError: <Epoch.INITIAL: 0>

The proposed solution is "qh3==0.15.1" and for me it comes up "zsh: 0.15.1 not found"

I also try "/Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pip install -U pymobiledevice3==2.30.0 construct==2.10.69 qh3==0.15.1" and then it says "zsh: no such file or directory: /Applications/Xcode.app/Contents/Developer/usr/bin/python3"

@MarZamora2
Copy link

Hii I was getting all the errors y'all got
and all those solutions worked, but now im getting this :( what should i do?

Screenshot 2024-04-29 at 21 53 44

@devourofcosmos
Copy link

Error Description
The process 'altjit' failed with code 1. Could not connect to device 00008130-001E49880883401C. The process 'python3' returned unexpected output. KeyError: <Epoch.INITIAL: 0>

Failure Reason
The process 'altjit' failed with code 1. Could not connect to device 00008130-001E49880883401C. The process 'python3' returned unexpected output. KeyError: <Epoch.INITIAL: 0>

Title
JIT could not be enabled for UTM.

Source Line
61

executableURL
file:///Applications/AltServer.app/Contents/MacOS/altjit

exitCode
1

output
/Users/buc/Library/Python/3.9/lib/python/site-packages/urllib3/init.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: urllib3/urllib3#3020
warnings.warn(
Traceback (most recent call last):
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/qh3/asyncio/client.py", line 95, in connect
protocol.connect(addr)
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/qh3/asyncio/protocol.py", line 60, in connect
self._quic.connect(addr, now=self._loop.time())
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/qh3/quic/connection.py", line 504, in connect
self._connect(now=now)
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/qh3/quic/connection.py", line 1217, in _connect
self._initialize(self._peer_cid.cid)
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/qh3/quic/connection.py", line 1373, in _initialize
raise RuntimeError(
RuntimeError: qh3 v1.0+ no longer support passing cryptography certificate objects within a QuicConfiguration object. Use configuration.load_cert_chain(...) instead using PEM encoded values.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/pymobiledevice3/main.py", line 148, in
main()
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/pymobiledevice3/main.py", line 100, in main
cli()
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/pymobiledevice3/cli/cli_common.py", line 108, in wrapper
func(*args, **kwargs)
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/pymobiledevice3/cli/remote.py", line 159, in cli_start_quic_tunnel
asyncio.run(tunnel_task(rsd, secrets, script_mode, max_idle_timeout=max_idle_timeout), debug=True)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/pymobiledevice3/cli/remote.py", line 97, in tunnel_task
async with start_quic_tunnel(service_provider, secrets=secrets, max_idle_timeout=max_idle_timeout) as tunnel_result:
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/contextlib.py", line 175, in aenter
return await self.gen.anext()
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/pymobiledevice3/remote/core_device_tunnel_service.py", line 592, in start_quic_tunnel
async with service.start_quic_tunnel(
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/contextlib.py", line 175, in aenter
return await self.gen.anext()
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/pymobiledevice3/remote/core_device_tunnel_service.py", line 249, in start_quic_tunnel
async with aioquic_connect(
File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/contextlib.py", line 175, in aenter
return await self.gen.anext()
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/qh3/asyncio/client.py", line 100, in connect
protocol.close()
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/qh3/asyncio/protocol.py", line 52, in close
self.transmit()
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/qh3/asyncio/protocol.py", line 102, in transmit
for data, addr in self._quic.datagrams_to_send(now=self._loop.time()):
File "/Users/buc/Library/Python/3.9/lib/python/site-packages/qh3/quic/connection.py", line 541, in datagrams_to_send
crypto = self._cryptos[epoch]
KeyError: <Epoch.INITIAL: 0>

❌ Unable to enable JIT for UTM on device 00008130-001E49880883401C.
Could not connect to device 00008130-001E49880883401C. The process 'python3' returned unexpected output. KeyError: <Epoch.INITIAL: 0>

@LoganMel12
Copy link

Tried everything I have seen on here and am receiving this error on MacOS 13.5.1 iOs 17.5
Screenshot 2024-05-13 at 8 30 09 PM

@mv-stns
Copy link

mv-stns commented May 15, 2024

So in conclusion, you shall do the following:

  • sudo python3 -m pymobiledevice3 mounter auto-mount

Dude where are yall getting this "mounter" thing from, where is this coming from?! can anyone link a package?

@hscumbie
Copy link
Author

So in conclusion, you shall do the following:

  • sudo python3 -m pymobiledevice3 mounter auto-mount

Dude where are yall getting this "mounter" thing from, where is this coming from?! can anyone link a package?

mounter is a function of pymobiledevice3. Try reinstalling pymobiledevice3 and see if that works.

@mv-stns
Copy link

mv-stns commented May 15, 2024

Well no commands get listed after reinstalling. Just the following

sudo /Library/Developer/CommandLineTools/usr/bin/python3 -m pymobiledevice3 -h
Usage: python -m pymobiledevice3 [OPTIONS] COMMAND [ARGS]...

Options:
  -h, --help  Show this message and exit.

@lucasmclean22
Copy link

OK so I think ive done everything ive read on here and can't seem to get around this error code no matter what I do. can anyone help plz?!

running MacBook M2 on Sonoma 14.4 to an iPad Air (gen 4) on iPadOS 17.5.1

just trying to enable JIT so i can game from the ipad. this is the error i get:

Screenshot 2024-06-15 at 12 44 45 PM

@EhanMMMZET
Copy link

EhanMMMZET commented Jun 26, 2024

no matter whatever i try following on this issue, i still can't enable JIT even after trying so many times, i'm running macOS Sonoma 14.5 on my 2014 MacBook Air using OCLP, so that might be a problem, and the phone I'm trying to enable it on is an iPhone XR running iOS 17.5.1, please help!
Screenshot 2024-06-26 at 3 43 54 PM

Screenshot 2024-06-26 at 3 47 46 PM

@forfin4
Copy link

forfin4 commented Jul 7, 2024

no matter whatever i try following on this issue, i still can't enable JIT even after trying so many times, i'm running macOS Sonoma 14.5 on my 2014 MacBook Air using OCLP, so that might be a problem, and the phone I'm trying to enable it on is an iPhone XR running iOS 17.5.1, please help! Screenshot 2024-06-26 at 3 43 54 PM

Screenshot 2024-06-26 at 3 47 46 PM

i have the same error and the same ios version and can’t fix it

@weirdchamp4life
Copy link

Hey guys!

I managed to fix the Process 'altjit' that failed with code 1. Could not connect to device X. The process 'python3' returned unexpected output. KeyError: EnumIntegerString.new(3, 'PUBLIC_KEY') error. It's related to a new to the new CoreDevice Framework introduced by iOS17:

Starting with iOS 17.0, Apple introduced the new CoreDevice framework to work with iOS devices. This framework relies on the RemoteXPC protocol.

To make it work, make sure you:

  • Install the latest version of pymobiledevice: python3 -m pip install -U pymobiledevice3.
  • Create a trusted tunnel: sudo python3 -m pymobiledevice3 remote start-tunnel.
  • Enable JIT from AltServer for the desired application as usual.

This method should work for people with iOS > 17.

did the start-tunnel, same exact issue. i get this feedback in terminal:
warnings.warn(
2024-07-15 01:40:57 Nd60.local pymobiledevice3.cli.remote[56393] INFO tunnel created
identifier: blabla
interface:bla bla
protocol:
rsd address:
rsd port:
use the following connection option.
--rsd. blah blah
issue is that after that shows no processes run, and my terminal is inhibited: i can type and enter but no command execute. In this state, enabling jit gives the same failed w code 1, could not connect to device X, python3 returned unexpected output, error: no such command as start quic tunnel. However, this is an improvement, as before this the last error would be keyerror: enumintegerstring.new public key whatever. anyone help?

@hscumbie
Copy link
Author

Hey guys!

I managed to fix the Process 'altjit' that failed with code 1. Could not connect to device X. The process 'python3' returned unexpected output. KeyError: EnumIntegerString.new(3, 'PUBLIC_KEY') error. It's related to a new to the new CoreDevice Framework introduced by iOS17:

Starting with iOS 17.0, Apple introduced the new CoreDevice framework to work with iOS devices. This framework relies on the RemoteXPC protocol.

To make it work, make sure you:

  • Install the latest version of pymobiledevice: python3 -m pip install -U pymobiledevice3.
  • Create a trusted tunnel: sudo python3 -m pymobiledevice3 remote start-tunnel.
  • Enable JIT from AltServer for the desired application as usual.

This method should work for people with iOS > 17.

did the start-tunnel, same exact issue. i get this feedback in terminal:

warnings.warn(

2024-07-15 01:40:57 Nd60.local pymobiledevice3.cli.remote[56393] INFO tunnel created

identifier: blabla

interface:bla bla

protocol:

rsd address:

rsd port:

use the following connection option.

--rsd. blah blah

issue is that after that shows no processes run, and my terminal is inhibited: i can type and enter but no command execute. In this state, enabling jit gives the same failed w code 1, could not connect to device X, python3 returned unexpected output, error: no such command as start quic tunnel. However, this is an improvement, as before this the last error would be keyerror: enumintegerstring.new public key whatever. anyone help?

See Edit 2 in my original post. Sounds like the xcode-select python isn't getting the proper pymobiledevice3 installed.

@weirdchamp4life
Copy link

Hey guys!

I managed to fix the Process 'altjit' that failed with code 1. Could not connect to device X. The process 'python3' returned unexpected output. KeyError: EnumIntegerString.new(3, 'PUBLIC_KEY') error. It's related to a new to the new CoreDevice Framework introduced by iOS17:

Starting with iOS 17.0, Apple introduced the new CoreDevice framework to work with iOS devices. This framework relies on the RemoteXPC protocol.

To make it work, make sure you:

  • Install the latest version of pymobiledevice: python3 -m pip install -U pymobiledevice3.
  • Create a trusted tunnel: sudo python3 -m pymobiledevice3 remote start-tunnel.
  • Enable JIT from AltServer for the desired application as usual.

This method should work for people with iOS > 17.

did the start-tunnel, same exact issue. i get this feedback in terminal:
warnings.warn(
2024-07-15 01:40:57 Nd60.local pymobiledevice3.cli.remote[56393] INFO tunnel created
identifier: blabla
interface:bla bla
protocol:
rsd address:
rsd port:
use the following connection option.
--rsd. blah blah
issue is that after that shows no processes run, and my terminal is inhibited: i can type and enter but no command execute. In this state, enabling jit gives the same failed w code 1, could not connect to device X, python3 returned unexpected output, error: no such command as start quic tunnel. However, this is an improvement, as before this the last error would be keyerror: enumintegerstring.new public key whatever. anyone help?

See Edit 2 in my original post. Sounds like the xcode-select python isn't getting the proper pymobiledevice3 installed.

I've did what you said in edit 2, and my error successfully changed to the error in edit 4. This is an advancement. How to solve edit 4? I know that you outlined the method there but it's my first time dealing with terminal and I have no idea how to actually tell terminal to force a package. Could you write out the command i need to use?
(my error is now epoch.initial: 0)

@thelocalmangaka
Copy link

thelocalmangaka commented Aug 24, 2024

sudo python3 -m pymobiledevice3 remote start-tunnel
This says no command found for me, so I had to try:
sudo python3 -m pymobiledevice3 remote start-quic-tunnel
i've also tried
sudo /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -m pymobiledevice3 remote start-quic-tunnel

None of the above works for me. I still get:
The process 'python3' returned unexpected output. KeyError: <Epoch.INITIAL: 0>

EDIT: Never mind. Uninstalling and reinstalling pymobiledevice3 eventually made it work for me. I enabled Jit.
python3 -m pip uninstall pymobiledevice3
/Library/Developer/CommandLineTools/usr/bin/python3 -m pip uninstall pymobiledevice3
python3 -m pip install pymobiledevice3==2.30.0 construct==2.10.69 qh3==0.15.1
/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install pymobiledevice3==2.30.0 construct==2.10.69 qh3==0.15.1

@jorycz
Copy link

jorycz commented Aug 30, 2024

Here is what I had to do on Sonoma 14.6.1 with iPad Pro 2018 iPadOS 17.6.1. when I got PUBLIC_KEY error.

So in conclusion, you shall do the following:

  • sudo python3 -m pip install -U pymobiledevice3
  • sudo python3 -m pymobiledevice3 mounter auto-mount
  • sudo python3 -m pymobiledevice3 remote start-tunnel

Use this and then click Enable JIT on AltServer ... It fails (because of wrong command start-tunnel), but it shows pairing request on iPad between iPad and macOS. That was the missing part.

Then I returned older versions working with AltServer 1.7.1
/Library/Developer/CommandLineTools/usr/bin/python3 -m pip install pymobiledevice3==2.30.0 construct==2.10.69 qh3==0.15.1
And now Enable JIT in AltServer works!

By the way, I tried it also with iPadOS 18 beta 5 and 6 and it did NOT work.

@ghost
Copy link

ghost commented Sep 1, 2024

I'm using iOS 18 Beta, and ummmm.... this just works.

  • sudo python3 -m pip install -U pymobiledevice3
  • sudo python3 -m pymobiledevice3 mounter auto-mount
  • sudo python3 -m pymobiledevice3 remote start-tunnel

I'm not exactly sure why... but after just running the tunnel and auto-mount, this just works! I don't have to return to older versions somehow.

@ZURV8N
Copy link

ZURV8N commented Sep 27, 2024

After reading everything in here and (I think 😅) properly following the instructions, I now have the error

"The process 'altjit' failed with code 1. Could not start debugserver on device 00008101-0005644A0193001E. The task timed out after 10 seconds."

I did properly add the "qh3==0.15.1" to the end of the pip install, and am now receiving this error I don't see elsewhere in this thread.

Any thoughts?
(MacOS 14.1 & iOS 17.6.1)

@EhanMMMZET
Copy link

EhanMMMZET commented Oct 9, 2024

okay i found a solution that will probably work for everyone which is to use sidejitserver, works for me and i'm on ios 18

@jorycz
Copy link

jorycz commented Oct 9, 2024

This one also works for enabling JIT on iOS 18 /~https://github.com/stossy11/JITStreamer-2.0

@andrewlove12
Copy link

trying to launch tunnel gives this error

KeyError: <Epoch.INITIAL: 0>

which you can actually solve by adding qh3==0.15.1 to the pip install command

This didn't work for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In Beta
Development

No branches or pull requests