electra
electra copied to clipboard
After JB, run a project ,XCode will prompt the following error.I need your help,thanks.
Sometimes,the console will output the following error : dyld: could not load inserted library '/usr/lib/TweakInject.dylib' because no suitable image found. Did find: /usr/lib/TweakInject.dylib: code signing blocked mmap() of '/usr/lib/TweakInject.dylib'
- iOS version: 11.1.2
- iDevice model:iPhone 6s A1700
- electra version:1.0.2
The app will run on the second time. Also please search for issues regarding this! This is a dupe :)
I have the same problem.
Every time when I start a test on an iPhone SE (11.1.2)
with Electra 1.0.3
I get
dyld: could not load inserted library '/usr/lib/TweakInject.dylib' because no suitable image found. Did find:
/usr/lib/TweakInject.dylib: code signing blocked mmap() of '/usr/lib/TweakInject.dylib'
This happens only when JB is active.
For me this issue looks like to be related to https://github.com/coolstar/electra/issues/183
Same here.
Same with me as well. Any fixes yet?
Same here on 1.0.4 .. any fixes yet..
No fix yet? Coolstar help us.
In my case the App / the test does not start the second time, but fails to start always. A fix would be very appreciated.
@coolstar anybody which could have a look?
Same here
I have same issue, but I tried reboot and re-jailbreak(now electra 1.0.4 jailbreak button show 'Already Jailbroken'), and run xcode again, it works 😳
same here.. :'(
To people having this issue, you can fix it by: Running the project twice, without changing the code. Second time it won't crash.
Sucks having to run everything twice, but beats having to un-jailbreak and re-jailbreak everytime.
it does crash, even second time!
Same here :( Crashes about four out of five times...
Doesn't work :(
1.copy /usr/lib/TweakInject.dylib. 2.use your developer certificate sign. 3.copy back.
@YasinTian do the 3 steps fix the problem? can you please explain step 2 a little bit more.
@stidch 1.open terminal。input "/usr/bin/security find-identity -v -p codesigning". 2.copy certificate name like this "iPhone Developer: Yunxiang Tian ()". 3.terminal input "codesign -fs "iPhone Developer: Yunxiang Tian ()" TweakInject.dylib". 4.copy the result replace /usr/lib/TweakInject.dylib.
Nice, it works 👍 (at least most of the time)
Thanks @YasinTian. At least the mentioned error is gone :) Unfortunately the App resp. the integration tests do still not work. Most probably because of another issue. May I ask you if you have any idea what could be wrong? Looks like you have some experience with jailbreaks.
2018-07-19 11:20:59.573977+0200 DeviceAbstraction_Hardware_IntegrationTest_iOS[987:13423] Injecting /Library/TweakInject/hidspringboard.dylib into com.phonak.mobileapps.DeviceAbstraction-Hardware-IntegrationTest-iOS
2018-07-19 11:20:59.732125+0200 DeviceAbstraction_Hardware_IntegrationTest_iOS[987:13423] refreshPreferences: HangTracerEnabled: 0
2018-07-19 11:20:59.732180+0200 DeviceAbstraction_Hardware_IntegrationTest_iOS[987:13423] refreshPreferences: HangTracerDuration: 500
2018-07-19 11:20:59.732199+0200 DeviceAbstraction_Hardware_IntegrationTest_iOS[987:13423] refreshPreferences: ActivationLoggingEnabled: 0 ActivationLoggingTaskedOffByDA:0
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
* frame #0: 0x000000018187cbc4 libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x000000018187ca3c libsystem_kernel.dylib`mach_msg + 72
frame #2: 0x0000000181d2dc74 CoreFoundation`__CFRunLoopServiceMachPort + 196
frame #3: 0x0000000181d2b840 CoreFoundation`__CFRunLoopRun + 1424
frame #4: 0x0000000181c4bfb8 CoreFoundation`CFRunLoopRunSpecific + 436
frame #5: 0x0000000183ae3f84 GraphicsServices`GSEventRunModal + 100
frame #6: 0x000000018b2202e8 UIKit`UIApplicationMain + 208
frame #7: 0x0000000100563d34 DeviceAbstraction_Hardware_IntegrationTest_iOS`main at AppDelegate.swift:4
frame #8: 0x000000018176e56c libdyld.dylib`start + 4
thread #6
frame #0: 0x000000018189ddbc libsystem_kernel.dylib`__workq_kernreturn + 8
frame #1: 0x00000001819aefa0 libsystem_pthread.dylib`_pthread_wqthread + 884
frame #2: 0x00000001819aec20 libsystem_pthread.dylib`start_wqthread + 4
thread #7, name = 'com.apple.uikit.eventfetch-thread'
frame #0: 0x000000018187cbc4 libsystem_kernel.dylib`mach_msg_trap + 8
frame #1: 0x000000018187ca3c libsystem_kernel.dylib`mach_msg + 72
frame #2: 0x0000000181d2dc74 CoreFoundation`__CFRunLoopServiceMachPort + 196
frame #3: 0x0000000181d2b840 CoreFoundation`__CFRunLoopRun + 1424
frame #4: 0x0000000181c4bfb8 CoreFoundation`CFRunLoopRunSpecific + 436
frame #5: 0x00000001826756e4 Foundation`-[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 304
frame #6: 0x0000000182694afc Foundation`-[NSRunLoop(NSRunLoop) runUntilDate:] + 96
frame #7: 0x000000018bd7f2f4 UIKit`-[UIEventFetcher threadMain] + 136
frame #8: 0x0000000182776860 Foundation`__NSThread__start__ + 996
frame #9: 0x00000001819b031c libsystem_pthread.dylib`_pthread_body + 308
frame #10: 0x00000001819b01e8 libsystem_pthread.dylib`_pthread_start + 312
frame #11: 0x00000001819aec28 libsystem_pthread.dylib`thread_start + 4
*** If you believe this error represents a bug, please attach the log file at /var/folders/l1/4cw8chs971j8zzz0vfqrh2v00000gq/T/com.apple.dt.XCTest/IDETestRunSession-46026B5E-0537-4E12-9A6D-4FCA6E495867/Generated.jailbreak_nightly-552D7C1B-FD74-4BE6-928E-7C4E544DE240/Session-Generated.jailbreak_nightly-2018-07-19_112027-SzivWy.log
@stidch Sorry,I can't solve this problem.
@YasinTian I was happy to see your comment to solve this issue, but weirdly it doesn't work for me. I've tried with several certificates and I keep getting the error. Is there any additional step required (already tried respring), or something that I've may have missed ?
@AnthoPakPak Look XCode -> Targets -> Signing -> Signing Certificate. Use this certificate.
@YasinTian Oh okay, so the certificate used to sign TweakInject.dylib must be the same as the one used in the app that's it ?
EDIT : still doesn't work even when using the same certificate…
For many jailbreaks happen the same. An easy workaround is to open the app manually before it open automatically after Xcode performs the installation. It allows at least to see the debug gauges, stop in breakpoints and all debug stuff, but executables inputs do not appear in the console (print statements from the app).
Thanks for the tip @EngelTz, it does work ! The only caveat is as you said, that we can't see logs in the console. But you can still debug the app with breakpoints.
I am glad it works for you, @AnthoPakPak 😸!
For those who want or really need to print in console, the debugger could do the stuff of the print
. It works fine for me, it feels good to take away a lot of print
lines from code and does not need to rebuild the project to do changes of what you print. This page can help to know how to do it: https://coderwall.com/p/ylrgjg/log-messages-with-xcode-breakpoints
Warning: If there are a lot of breakpoints (i.e. loops) the app will feel laggy.