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

Generated .sh contain "-F <Multiple -F Values>" #113

Closed
cheukman-octopus opened this issue Mar 21, 2019 · 7 comments
Closed

Generated .sh contain "-F <Multiple -F Values>" #113

cheukman-octopus opened this issue Mar 21, 2019 · 7 comments

Comments

@cheukman-octopus
Copy link

cheukman-octopus commented Mar 21, 2019

Context

Code reload / inject is having trouble locating a file and generated .sh script contains <Multiple -F Values>

When .sh script is executed, the following error will be logged in the console.

*** Compiling /PROJECT_PATH/Sources/AppDelegate.swift ***
/bin/bash: Multiple: No such file or directory
*** Re-compilation failed (/Users/CURRENT_USER/Library/Containers/com.johnholdsworth.InjectionIII/Data/command.sh)
ld: warning: -undefined dynamic_lookup is deprecated on iOS Simulator
 ***

After a couple of times of file save after changes, it iOS application will crash and result in the following error.

Thread 1: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=260 "The file “eval103.log” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Users/CURRENT_USER/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval103.log, NSUnderlyingError=0x600002886af0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

Questions

  1. Which Project Build settings is causing the <Multiple -F Values> in generated .sh script?
  2. What is missing / misconfigured to cause evlN.log to not generate?

Note

Maybe I'm completely off track, would be great if someone can help. Thanks in advance

@johnno1962
Copy link
Owner

johnno1962 commented Mar 21, 2019

-F is related to "framework search path". Does your project have spaces in it’s path? If you could share a small project that replicates this problem, it would help track it down. Cheers

@cheukman-octopus
Copy link
Author

cheukman-octopus commented Mar 21, 2019

@johnno1962 Thank you for your swift reply!

I tried it with a dummy simple project and the code injects work, so I'm guessing is the configuration of this project.

I have updated the Framework search path and it no longer crashes. (Thank you for that!)

This is the new error in log after fixing the framework search path, having trouble loading the dylib.

Loading .dylib - Ignore any duplicate class warning...
*** dlopen() error: dlopen(/Users/CURRENT_USER/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval106.dylib, 2): Symbol not found: ___llvm_profile_runtime
  Referenced from: /Users/CURRENT_USER/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval106.dylib
  Expected in: flat namespace
 in /Users/CURRENT_USER/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval106.dylib ***

@johnno1962
Copy link
Owner

You need to turn off test coverage gathering.

@cheukman-octopus
Copy link
Author

cheukman-octopus commented Mar 21, 2019

@johnno1962 That defo worked. Now there is a different error.

*** Compiling /Users/CURRNET_USER/workspace/PROJECT/AppDelegate.swift ***
Loading .dylib - Ignore any duplicate class warning...
objc[20902]: Class _TtC6PROJECT11AppDelegate is implemented in both /Users/CURRNET_USER/Library/Developer/CoreSimulator/Devices/5894F97C-0036-4F80-9C47-86D8C0E8FE3E/data/Containers/Bundle/Application/C254AD31-6249-4D06-91DA-DF350CB58EFF/PROJECT.app/PROJECT (0x10f1a4a50) and /Users/CURRENT_USER/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval118.dylib (0x1477a3ae8). One of the two will be used. Which one is undefined.
Injected 'PROJECT.AppDelegate'

@johnno1962
Copy link
Owner

You can ignore that.

@MIyulong
Copy link

MIyulong commented Mar 29, 2019

i have the some error
💉 *** dlopen() error: dlopen(/Users/xxxx/Library/Containers/com.johnholdsworth.InjectionIII/Data/eval104.dylib, 2): Symbol not found: $S7Chatail15PopupControllerC7dismissyyyycSgFfA
Referenced from: /Users/xxxx/Containers/com.johnholdsworth.InjectionIII/Data/eval104.dylib

my project is a mix of swift and oc, the xcode's version is 10.1, and using swift4.2
in some code files @objc func injected() is running well, but in this specific file doesn't work , why the others were working well,so should i fix this?
@johnno1962

@zenangst
Copy link
Collaborator

@MIyulong which version of InjectionIII are you running?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants