Comments (12)
Very strange problem. Using the daemon eliminated a couple of things. Could you try switching HotReloading to branch "include-entitlements" which adds the entitlements file to the code signing arguments? HotReloading uses a cache and to make sure it gets flushed remove the file /tmp/iOS_builds.plist before you start your app. You should see the new -entitlements argument in the com.johnholdsworth.InjectionIII defaults after that.
from hotreloading.
Thanks, I'll take a look and get back to you.
from hotreloading.
Can't get your app not to work :S I've messaged you on twitter if you want to TeamView or email me at github at johnholdsworth.com.
from hotreloading.
This turned out to be a change to the default value for the PATH environment variable. This should be fixed in the 4.7.4 release.
from hotreloading.
Hi, getting codesigning right is difficult and the code sign (errno=1) doesn't give you much to go on.
The first thing to check is that Injection is signing correctly. Can you run the Injection app from the command line
$ /Applications/InjectionIII.app/Contents/MacOS/InjectionIII
Then look for the line π InjectionIII Signing with identity: 511C1148E461780FD8B3C04906E..., check the identity is the same as for the app in the build logs and look for any error that might follow it.
from hotreloading.
@johnno1962 thank you for coming back to me that quickly! I've ran the app in a terminal and I'm getting a similar error there too. Nothing in those logs strike me as super suspicious, but I'm quite new to Swift dev π
2023-06-25 20:05:36.052 InjectionIII[28722:1161158] Connection from 192.168.1.242:59057
2023-06-25 20:05:36.052 InjectionIII[28722:1179193] π InjectionIII Connection for project file: /Users/adrien.baron/perso/volumizer-new/Volumizer/Volumizer.xcodeproj
2023-06-25 20:05:36.174 InjectionIII[28722:1179193] π InjectionIII Using tmp dir: /private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/
2023-06-25 20:05:44.950 InjectionIII[28722:1179276] π InjectionIII evalError: Compiling /Users/adrien.baron/perso/volumizer-new/Volumizer/Volumizer/ContentView.swift
2023-06-25 20:05:45.298 InjectionIII[28722:1179276] π InjectionIII Signing with identity: 55B1F64367A6DB4244C5D555C6062DAC71AF1B7F
2023-06-25 20:05:45.424 InjectionIII[28722:1179193] π InjectionIII Injection error: Error Domain=SwiftEval Code=-1 "dlopen() error: dlopen(/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib, 0x0002): tried: '/usr/lib/system/introspection/eval101.dylib' (no such file, not in dyld cache), '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib' (code signature invalid in <8C1A4437-765F-3D39-8587-08FE4370F1AA> '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x0001B8B0, codeBlobSize=0x00004E30), '/private/preboot/Cryptexes/OS/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib' (code signature invalid in <8C1A4437-765F-3D39-8587-08FE4370F1AA> '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x0001B8B0, codeBlobSize=0x00004E30)
π₯ β οΈ Loading .dylib has failed due to invalid code signing.
π₯ Add the following as a Run Script/Build Phase:
defaults write com.johnholdsworth.InjectionIII "$PROJECT_FILE_PATH" "$EXPANDED_CODE_SIGN_IDENTITY"" UserInfo={NSLocalizedDescription=dlopen() error: dlopen(/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib, 0x0002): tried: '/usr/lib/system/introspection/eval101.dylib' (no such file, not in dyld cache), '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib' (code signature invalid in <8C1A4437-765F-3D39-8587-08FE4370F1AA> '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x0001B8B0, codeBlobSize=0x00004E30), '/private/preboot/Cryptexes/OS/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib' (code signature invalid in <8C1A4437-765F-3D39-8587-08FE4370F1AA> '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval101.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x0001B8B0, codeBlobSize=0x00004E30)
π₯ β οΈ Loading .dylib has failed due to invalid code signing.
π₯ Add the following as a Run Script/Build Phase:
defaults write com.johnholdsworth.InjectionIII "$PROJECT_FILE_PATH" "$EXPANDED_CODE_SIGN_IDENTITY"}
2023-06-25 20:05:45.577 InjectionIII[28722:1178734] π InjectionIII evalError: Compiling /Users/adrien.baron/perso/volumizer-new/Volumizer/Volumizer/ContentView.swift
2023-06-25 20:05:45.904 InjectionIII[28722:1178734] π InjectionIII Signing with identity: 55B1F64367A6DB4244C5D555C6062DAC71AF1B7F
2023-06-25 20:05:46.079 InjectionIII[28722:1179193] π InjectionIII Injection error: Error Domain=SwiftEval Code=-1 "dlopen() error: dlopen(/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib, 0x0002): tried: '/usr/lib/system/introspection/eval102.dylib' (no such file, not in dyld cache), '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib' (code signature invalid in <A435AA7A-D3DB-35DE-A046-79AAD1B26CBC> '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x0001B8B0, codeBlobSize=0x00004E30), '/private/preboot/Cryptexes/OS/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib' (code signature invalid in <A435AA7A-D3DB-35DE-A046-79AAD1B26CBC> '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x0001B8B0, codeBlobSize=0x00004E30)
π₯ β οΈ Loading .dylib has failed due to invalid code signing.
π₯ Add the following as a Run Script/Build Phase:
defaults write com.johnholdsworth.InjectionIII "$PROJECT_FILE_PATH" "$EXPANDED_CODE_SIGN_IDENTITY"" UserInfo={NSLocalizedDescription=dlopen() error: dlopen(/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib, 0x0002): tried: '/usr/lib/system/introspection/eval102.dylib' (no such file, not in dyld cache), '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib' (code signature invalid in <A435AA7A-D3DB-35DE-A046-79AAD1B26CBC> '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x0001B8B0, codeBlobSize=0x00004E30), '/private/preboot/Cryptexes/OS/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib' (no such file), '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib' (code signature invalid in <A435AA7A-D3DB-35DE-A046-79AAD1B26CBC> '/private/var/mobile/Containers/Data/Application/48BE6955-97CB-4072-8CBA-AB869A6BB5F2/tmp/eval102.dylib' (errno=1) sliceOffset=0x00000000, codeBlobOffset=0x0001B8B0, codeBlobSize=0x00004E30)
π₯ β οΈ Loading .dylib has failed due to invalid code signing.
π₯ Add the following as a Run Script/Build Phase:
defaults write com.johnholdsworth.InjectionIII "$PROJECT_FILE_PATH" "$EXPANDED_CODE_SIGN_IDENTITY"}
It seems to sign with identity: 55B1F64367A6DB4244C5D555C6062DAC71AF1B7F
I've checked the build log and the signature do seem to match:
export EXPANDED_CODE_SIGN_IDENTITY\=55B1F64367A6DB4244C5D555C6062DAC71AF1B7F
...
cd /Users/adrien.baron/perso/volumizer-new/Volumizer
Signing Identity: "Apple Development: [email protected] (LBMXXXX)"
Provisioning Profile: "iOS Team Provisioning Profile: net.abaron.volumizerapp"
(876dd9d8-XXX)
/usr/bin/codesign --force --sign 55B1F64367A6DB4244C5D555C6062DAC71AF1B7F --timestamp\=none --preserve-metadata\=identifier,entitlements,flags --generate-entitlement-der /Users/adrien.baron/Library/Developer/Xcode/DerivedData/Volumizer-emiufhnxurptayfpuzkoyaghlqne/Build/Products/Debug-iphoneos/Volumizer.app/Frameworks/SwiftTrace.framework
Feel free to ask if I can provide anything else π!
from hotreloading.
Thanks for the detailed reports. The next thing to try is to update the HotReloading package and replace the "Build Phase" you added with the following instead of running the InjectionIII.app:
if [ -d $SYMROOT/../../SourcePackages ]; then
$SYMROOT/../../SourcePackages/checkouts/HotReloading/start_daemon.sh
fi
This runs the app's code but as a daemon which is easier to work on. If this doesn't work I can TeamView to investigate further. Would that be possible?
from hotreloading.
@johnno1962 replaced the script with the code to start the daemon, and killed the InjectionIII app. Then started the app, it does start the daemon and connect, but still the same issue with dylib.
Happy to TeamView (or similar) if that can help! You can DM me on Twitter?
from hotreloading.
@johnno1962 ok done this, still the same issue π :
- I do get the
entitlements
flag:
β ~ defaults read com.johnholdsworth.InjectionIII
{
"/Users/adrien.baron/perso/volumizer/Volumizer/Volumizer.xcodeproj" = "55B1F64367A6DB4244C5D555C6062DAC71AF1B7F --entitlements /Users/adrien.baron/Library/Developer/Xcode/DerivedData/Volumizer-csaltqlpifoltncgdifgioalxcwi/Build/Intermediates.noindex/Volumizer.build/Debug-iphoneos/Volumizer.build/Volumizer.app.xcent";
deviceInform = Informed;
deviceUnlock = any;
lastProject = "/Users/adrien.baron/perso/volumizer-new/Volumizer/Volumizer.xcodeproj";
lastWatched = "/Users/adrien.baron/perso/volumizer-new/Volumizer";
}
- I did delete the cache file, although it was called
/tmp/maciOS_builds.plist
Here are the logs/cache I've found in /tmp
(hot_reloading.log
, maciOS_builds.plist
and unhide_object.log
).
I've cleared them, started the app, did one change and then got them. Hope this helps πββοΈ!
from hotreloading.
Still looking at this, about the only progress I've made is to replicate the code signing error=1 if you add the following to the Build phase (which stops the --entitlements "fix" being bypassed by values in the environment):
unset EXPANDED_CODE_SIGN_IDENTITY
unset CODE_SIGN_IDENTITY
Give me a little longer, I've not seen this code signing problem before. Usually it is connecting over the network that is the problem.
from hotreloading.
@johnno1962 the code is also very new, so I'm also happy to give you access to that repo if that helps debugging π (sorry should have offered that before)
EDIT: Added you, the branch is feature/inject
π
from hotreloading.
Can't get your app not to work :S
Argh the dreaded "It works on my machine" π , will be in touch!
from hotreloading.
Related Issues (20)
- Unable to create socket for device injection HOT 2
- Crashing on injecting to device HOT 21
- Problems using HotReloading as a Swift package HOT 4
- iOS device injection not working when running as a Mac app HOT 17
- Updates overlap in UI HOT 1
- class category injection failed on device HOT 7
- Some questions about the implementation. HOT 1
- Crasing in SwiftInjection HOT 25
- Is there anyway to re-compile a file only when cmd + s ? HOT 3
- cold start on device encounter watch dog HOT 13
- Hot reloading not changing my views HOT 6
- Does it support C functions γvariable in other files? HOT 7
- Will the DDHotKey affect the file watch ? HOT 6
- Cannot use HotReloading with Other debug configurations (ex. Dev, Test Configuration) HOT 12
- Xcode 15 beta link SwiftTrace failed HOT 8
- Connection refused HOT 12
- Cannot reload on M1, getting an βeval101.dylibβ canβt be opened because Apple cannot check it for malicious software error. HOT 21
- lopen() error: dlopen(/private/var/mobile/Containers/Data HOT 2
- Cannot reload on M1: Mac os Sonoma prevents InjectionIII from accessing data HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hotreloading.