johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.55k stars 565 forks source link

"Software Error" #185

Closed timothycosta closed 7 years ago

timothycosta commented 7 years ago

This started happening to me sometime yesterday I think. Since the error asks for the date and time, this happened around 2016-11-09 10:17:51.543438 Korea time.

Software error:

Could not connect Access denied for user 'johnhol_inject'@'localhost' (using password: YES) at ../../../injection/common.pm line 13.
Compilation failed in require at sale.cgi line 4.
BEGIN failed--compilation aborted at sale.cgi line 4.
For help, please send mail to the webmaster (webmaster@injection.johnholdsworth.com), giving this error message and the time and date of the error.

Injection console shows this error, but it was signing ok a day or two ago.

/Users/timothycosta/Desktop/lingq/iLingQ/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle1.bundle: is already signed

*** Could not codesign as 'iPhone Developer: Tim Costa (****)':
/Users/timothycosta/Desktop/lingq/iLingQ/iOSInjectionProject/build/Debug-iphonesimulator/InjectionBundle1.bundle ***

 at /Users/timothycosta/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/common.pm line 57.
   
main::error('Could not codesign as 9hone Developer: Tim Costa (SV7EDU5N...') called at /Users/timothycosta/Library/Application Support/Developer/Shared/Xcode/Plug-ins/InjectionPlugin.xcplugin/Contents/Resources/injectSource.pl line 513

*** Bundle build failed ***


By the way, the suggested email bounces.

johnno1962 commented 7 years ago

Thanks for letting me know. I’ll look into it… This hsould be fixed now. Let me know please if you still see this message!

timothycosta commented 7 years ago

The "could not codesign" bit looked suspicious, so I explicitly set that certificate in my project settings and that error went away. However, even without errors my changes didn't seem to be being applied to the code. I ended up restarting Xcode for unrelated reasons and the first time I tried to inject it said it was reinstalling my license. Seems to be working again.

timothycosta commented 7 years ago

Haven't had issues with "Software Error" since my last message, but I ended up getting the same "already signed" errors again. In case anybody else finds this:

  1. Set header and framework search paths in your injection bundle project - $(SRC_ROOT)/../Pods - Recursive
  2. Set your development team and provisioning profile in the injection bundle project. Make sure the development team matches the profile. You may need to use "Other" in the provisioning dropdown, in which case you can just type in the "code" portion of the profile - iOS Developer My Name (CODE)
  3. Set the same provisioning profile in iOSInjectionProject/x86_64/identity.txt
johnno1962 commented 7 years ago

I’ve added —force to the code signing so you shouldn't see this problem again.