Closed zydeco closed 5 months ago
How did you get simulator injection working at the first place? It has been broken for me for months 😵
@oleavr @zydeco don't want to bother you, but I've encountered the same issue as the @ChiChou mentioned above. Can you lads please take a look?
When trying to use in the iOS simulator (17.4, arm64), it fails because it can't load
CoreSymbolication
from the expected paths:The exception comes from inside the catch here shows it tries some paths, but not the correct one:
However when trying to load from the first path, it doesn't mention trying anything, the error doesn't come from dlopen:
It turns out the call to Module._load succeeds, but
Process.getModuleByName
fails to find the module with that absolute path (the actual path is prefixed by/Library/Developer/CoreSimulator/Volumes/iOS_21E213/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.4.simruntime/Contents/Resources/RuntimeRoot/
, which will vary by iOS version).I've implemented a quick hack to get around this:
CoreSymbolication
seems to always be loaded when running apps in the iOS simulator, so loading it can be skipped if it's already there. Another hack could be to use the privateModule._load
instead.A more proper solution might be something around
Module.load
,Process.getModuleByName
orgum_store_module_if_name_matches
, making it aware thatdlopen
can succeed when called with an absolute path, but the loaded module's path may be different.