Closed dch closed 8 years ago
I've never seen this issue on OSX. What firewall are you using? Anything special about your config?
For historical note: We used to use a CodeResources file, but it was dropped in b6d58360aa5bd780bf31a6183a30d7e69b9f77cc - not sure why since there wasn't very much information (or any bug references) in the commit message.
@Naatan builtin OSX firewall, box config is plenty boring. This happens on 2 OSX boxes.
If there's a way to disable the debugger listener by default that would also do, but the Debug menu only works for the current session.
Here's the .pyo files that today's starting komodo created:
/Users/dch/Applications/Komodo.app: a sealed resource is missing or invalid
file added: /Users/dch/Applications/Komodo.app/Contents/Resources/components/koCatalogsTree.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/Resources/components/koErlangLanguage.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/Resources/components/koFormatterService.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/Resources/components/koGenericFormatter.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/Resources/components/koPHPConfigurator.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/Resources/components/koPythonStdLib.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/Resources/components/koTextUtils.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/Resources/components/koWindowManagerUtils.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/Resources/python/komodo/reflow.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/__init__.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/ashes.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/atelierdune.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/atelierforest.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/atelierheath.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/bespin.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/chalk.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/default.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/eighties.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/embers.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/grayscale.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/greenscreen.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/isotope.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/londontube.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/marrakesh.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/mocha.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/monokai.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/ocean.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/paraiso.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/railscasts.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/s3024.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/solarized.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/tomorrow.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/schemes/twilight.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/templates/__init__.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/templates/common.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/templates/dark.pyo
file added: /Users/dch/Applications/Komodo.app/Contents/SharedSupport/schemes/templates/light.pyo
Same thing happens on OSX 10.9.5 on MBP Retina, 15-inch, Mid 2014.
BTW this happens every time I open Komodo. It's extremely frustrating and slow to add my admin password and click away a couple of dialogue boxes. If there's a way to disable the debugger (and avoid the port open problem) please let us know as a simple work-around.
Today's random changes, presumably as I was working on files of different types again.
...
--prepared:/Users/dch/Applications/Komodo.app/Contents/MacOS/XUL
--validated:/Users/dch/Applications/Komodo.app/Contents/MacOS/XUL
/Users/dch/Applications/Komodo.app: a sealed resource is missing or invalid
file added: /Users/dch/Applications/Komodo.app/Contents/Resources/components/koApacheLanguage.pyo
file modified: /Users/dch/Applications/Komodo.app/Contents/Resources/components/koErlangLanguage.pyo
file modified: /Users/dch/Applications/Komodo.app/Contents/Resources/components/koStatusMessage.pyo
This happens to me as well on MacOS 10.11.4 with Komodo 9.3.2. For the record, here is a screenshot of the dialogue which has to be cleared away every time Komodo starts:
Do you have some sort of extra strong security settings on your OSX? I use OSX daily and have never seen this.
I use OSX daily and have never seen this.
Me as well.
I have just got the Firewall on:
If I turn it off, the dialogue shown earlier does not appear. Then here are the "Firewall Options…"
So this was relatively easy to trace. Firewalls on OSX appear to be turned off by default so both @Naatan and I weren't seeing this message. Everyone who has commented here must have turned on their Firewalls.
I'm following up with Todd about his commit from Jan (mentioned by mook above that appears to have removed the config file that would have removed this issue (not sure about that, haven't tested it) .
@dch thought turning off the debugger at startup would seem to fix this, as soon as you turn it on you will have to give Komodo permission to start again. The best workaround at this point is the one you're already using:
sudo codesign --force --deep --sign - ~/Applications/Komodo.app
@luc-j-bourhis Looks like you did the same digging. Thanks for posting. See the last line in my last comment. For now that is the workaround.
It should be possible to create a script that will run that line then start Komodo so it's a less bothersome process.
@cgchoffman
It should be possible to create a script that will run that line then start Komodo so it's a less bothersome process.
I don't think that would work nicely. The problem, as explained by @dch, is that Komodo creates .pyc and .pyo after installation: those files aren't part of the signature and therefore this breaks OS X trust. Unless I am missing something, you would need to run that "sudo codesign …" every time Komodo is started, therefore asking the user's admin credential every time. Rather not nice. I concur with @dch that the only solution would be to generate all those .pyc and .pyo and whatnot needed by other languages on your side, then bundle them all into the dmg that you would then sign.
The method I mentioned is a workaround @dch @luc-j-bourhis. It's NOT a fix. There is noway that I am suggesting that you live with running a sudo
command to start Komdo for the rest of your Komodo using days (which I don't think would be many more if I said that was the solution).
The fix will likely be reverting the commit that has already been mentioned twice. I am currently in the process of following up on that commit with the dev who made it as this will effect more than just the running Komodo but also our build system.
@cgchoffman Sorry, I misunderstood then. Thanks a lot for addressing this!
Done some follow up now. Here is what I've found:
$ python -o
import compileall as ca
ca.compile_dir("/Application/Komod Install dir.app") # change to match komodo app name
exit()
python -o -m compileall /Applications/Komodo Install.app
instead of the two steps above but I haven't tested that command.sudo codesign --force --deep --sign - /Applications/Komodo.app # again, make sure it matches your komodo's name
You should no longer need to approve changed files in the Komodo directory. Let me know if that doesn't work for you. Unfortunately this will mean you need to allow "unknown applications" to run (OSX Prefs > Security & Privacy > General Tab > Allow apps downloaded from: Anywhere
) on your computer. If you're a developer, you likely already have this enabled though.
I've thought about this a bit more and it occurs to me that it's crazy that OSX forces application developers to include pre-compile dynamic language files in their build (which is implies). Is anyone aware of a solution like the old one (the commit I can't revert) where you can tell codesign to ignore certain types of files? @dch you seem to be a codesign pro. Any thoughts?
The problem is that we're doing it in the app directory itself, I think most OSX apps that have a need for this type of thing generate these files somewhere in your Library directory.
Good point @Naatan, it doesn't look like Python supports that in Python < 3.2 though. I can't seem to find anything that says it's possible in Python < 3.2 (FYI we're running Python 2.7, for people that don't know).
I think it would require us to "install" our Python dependencies to a different folder, all in all not a simple task.
We'd have to do that for all the shipped addons too, or strip their Python files.
Right, it would have to be for all Python files anywhere in the project.
I'm not convinced it's worth doing personally.
I'm not convinced it's worth doing personally
If you're talking about moving all python files into a special "install" folder, then I totally agree it's not worth doing. At this point, the build step to pre-compile will be our best option.
The fix above will be in Komodo 10. We won't be back porting this to a Komodo 9 nightly. Please get a hold of us for assistance with the workaround I provided above: https://github.com/Komodo/KomodoEdit/issues/313#issuecomment-205957735
thanks folks! I'm really pleased to be starting on 10 without this, and I really appreciate the digging that went into fixing it for Komodo IDE 10.
@dch are you using Komodo 10? Is it working as you hoped? We also appreciate the digging YOU did. You really went above and beyond by giving us details that pointed to exactly what was wrong.
@cgchoffman thanks I switched over to 10 already as soon as I saw you'd fixed this bug! It feels faster already, although I am using a brand new profile. It's time to dump my accumulated years of komodo cruft in there..
Yo!
I've found a very easy tutorial on the stuff we were talking about, look here http://advantage.tech-mac.com/e4oqb
All the best, tony.attwood
Hello,
I left you a message on your voice mail, have you listened to it already? If not, here is the link http://white.dipeq.com/e4hkabcx
Cheers, tony.attwood
Hey!
Look what I've just found on the web, that really cool, yeah, more info here http://byquecupru.antientitlement.com/e4hopu
Sincerely, tony.attwood
Hey,
I'm planning a summer trip and I just wanted to ask to look at my route, what do you think? Here it is http://hestindore.chicagoendoscopy.org/e4iibl
Yours faithfully, tony.attwood
Hey!
Just look at that interesting stuff, I love it! I think you're gonna like it too, take a look here http://lofikylo.devicehut.org/e4ilo
All the best, tony.attwood
Hi!
There are so many cool things that you have see! I was really surprised, just take a look http://experience.elponchin.com/e4xwiw
tony.attwood
BTW this is back again:
~ codesign -vvv ~/Applications/Komodo.app (1)
--prepared:/Users/dch/Applications/Komodo.app/Contents/Frameworks/Python.framework/Versions/Current/.
--validated:/Users/dch/Applications/Komodo.app/Contents/Frameworks/Python.framework/Versions/Current/.
--prepared:/Users/dch/Applications/Komodo.app/Contents/MacOS/crashreporter.app
--validated:/Users/dch/Applications/Komodo.app/Contents/MacOS/crashreporter.app
/Users/dch/Applications/Komodo.app: code object is not signed at all
In subcomponent: /Users/dch/Applications/Komodo.app/Contents/MacOS/dependentlibs.list
That's a related but slightly different bug, which you've already found - #1729
IIRC this is a regression but the old bugzilla seems to be very hard to find.
Issue
When starting Komodo IDE on OSX, the debugger starts and listens on a given network port. The OS prompts the user to accept this access. Normally an app only needs this once and then the approval is remembered. However as Komodo creates
*.pyo
files that are not present in the original distributed.dmg
archive, this approval needs to be done on every startup.Repro
Download latest master e.g. from http://downloads.activestate.com/Komodo/nightly/komodoide/latest-master/ but don't run it yet.
codesign -vvv <path_to_komodo_ide>
to confirm the signature is OK.codesign logs
After installing latest Komodo-IDE-9.1.0-87333-macosx-x86_64.dmg
codesign -vvv
gives:codesign after first run:
NB
find ~/Applications/Komodo.app |grep pyo$ | xargs rm
removes the .pyo files and the signature passes again.I assume a possible solution is to include the .pyo files in the .dmg bundle and sign them by default?
I currently self-sign by
sudo codesign --force --deep --sign - ~/Applications/Komodo.app
. Hacky.