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

🔥 ⚠️ Error reading /.../evalXXX.sh, scanCommand: /.../command.sh #51

Closed
MariuszWisniewski opened this issue Jun 21, 2022 · 4 comments

Comments

@MariuszWisniewski
Copy link

MariuszWisniewski commented Jun 21, 2022

I'm using HotReloading straight from the main branch.

I tried to use HotReloading in our project, and quite often I get error message.
I managed to reproduce the same on an empty project, seems to happen more frequent on iOS 12 than 13 (when testing on 13 I also bump the minimum deployment target).

🔥 ⚠️ Error reading /Users/mariuszwisniewski/Library/Developer/CoreSimulator/Devices/805D1E12-6F50-4175-8C9E-E8B19D7059D6/data/Containers/Data/Application/5C1C27AC-C253-4379-9DFE-0EA8863BF855/tmp/eval144.sh, scanCommand: /Users/mariuszwisniewski/Library/Developer/CoreSimulator/Devices/805D1E12-6F50-4175-8C9E-E8B19D7059D6/data/Containers/Data/Application/5C1C27AC-C253-4379-9DFE-0EA8863BF855/tmp/command.sh

When this error appears in the console, the file mentioned in the error does not exist (so e.g. eval144.sh is not present), just its .pl version and the command.sh file.

When debugging SwiftEval.swift I can see that return runner.run(script: cmdfile) does return true so all should be fine. When I run command.sh manually, it does create mentioned eval144.sh.

What I also tried, was to put a breakpoint before

        var compileCommand: String
        do {
            compileCommand = try String(contentsOfFile: "\(tmpfile).sh")

and at this point run command.sh from terminal, which does create the file. It does help in a sense that the error does not appear anymore (even for the next evaluations), but the app is not refreshed (i.e. my code changes are not taken into acccount).

I also tried the standalone version of InjectIII app combined with https://github.com/krzysztofzablocki/Inject which seems to work fine.

Is there any other info I could provide to help debug the issue?

@johnno1962
Copy link
Owner

Hi, That is indeed a strange issue but it will be a lot easier to debug as you are using HotReloading. command.sh needs to have completed for evalN.sh to be created. It's just the grep of the build logs for the compile command. At this distance I can't say much more. It's strange that it should be iOS version dependant but as you can see there is a lot of quite low level stuff going on in the "runner" which is how HoReloading gets it's work done.

@johnno1962
Copy link
Owner

Hi, I've finally been able to get to the bottom of this issue which occurs when you use a simulator < iOS14 on an M1/2 due to these simulators not having arm architecture available. I've tightened up error reporting and you should now see a warning to avoid this combination when using HotReloading. johnno1962/InjectionIII#417 (comment)

@MariuszWisniewski
Copy link
Author

Thank you very much, that would not be obvious to me!

@johnno1962
Copy link
Owner

It wasn't obvious to me :)

This issue was closed.
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

2 participants