CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme:

I understand this is an xcode warning/error, however, it happens when I try to run gitk --all from the command line.

YuFei-Zhus-MacBook-Pro:test phil88530$ gitk --all
2012-08-02 21:14:49.246 Wish[33464:707] CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme: 
2012-08-02 21:14:49.252 Wish[33464:707] CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme: 
2012-08-02 21:14:49.293 Wish[33464:707] CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme: 
2012-08-02 21:14:49.295 Wish[33464:707] CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme: 
2012-08-02 21:14:49.474 Wish[33464:707] CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme: 
2012-08-02 21:14:49.476 Wish[33464:707] CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme: 
2012-08-02 21:14:50.731 Wish[33464:707] CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme: 
2012-08-02 21:14:50.734 Wish[33464:707] CFURLCopyResourcePropertyForKey failed because it was passed this URL which has no scheme: 
YuFei-Zhus-MacBook-Pro:test phil88530$ 

I just replaced a new disk and did a fresh install of osx and updated to mountain lion, installed x11 and xcode. Any suggestions why this happens?

Answers


$ alias gitk='gitk 2>/dev/null'

I have same problem here. This is quick tip until someone answers this solution.


If you are MacPorts user upgrade tcl/tk to 8.6.0:

$ sudo port install tcl tk

Running gitk with a new version of tcl-tk seems to solve this problem (tested with Mac OS X 10.8.4). If you have Homebrew installed, the following should work:

  1. From the command line, run: brew install tcl-tk
  2. Then add the following to your .bashrc or .bash_profile: alias gitk='"$(brew --prefix tcl-tk)/bin/wish" "$(which gitk)"'

After restarting your terminal, you should be able to run gitk normally without seeing any "CFURLCopyResourcePropertyForKey" errors.


I got this error just now and find a solution to solve it.

I was trying to invoke the function getResourceValue:forKey:error: in my project and my os version is 10.7.5.

I init a new NSURL object by using + URLWithString: and the problem occurred before, after I replace it with + fileURLWithPath:, it's ok now.

The difference value between the two objects with different functions is /Volumes/Data/a file://localhost/Volumes/Data/a/

Apple has statemented that about NSURL class below,

Handling Object Creation Failure The NSURL class fails to create a new NSURL object if the path being passed is not well-formed; the path must comply with RFC 2396. Examples of cases that will not succeed are strings containing space characters and high-bit characters. Should creating an NSURL object fail, the creation methods return nil, which you must be prepared to handle. If you are creating NSURL objects using file system paths, you should use fileURLWithPath: or initFileURLWithPath:, which handle the subtle differences between URL paths and file system paths. If you wish to be tolerant of malformed path strings, you’ll need to use functions provided by the Core Foundation framework to clean up the strings.

Error while using getResourceValue:forKey method in NSURL


On Mountain Lion 10.8.2, I fixed this issue installing/upgrading tcl and tk – as tair mentioned.

brew install tcl brew install tk

The UI of gitk will likely change, but you can tweak that in ~/.gitk.


This blog post solved my issue for this:

http://blog.jasonsemko.com/post/51668282398/easy-fix-for-cfurlcopyresourcepropertyforkey-failed

The long and short of it is gitk isn't parsing the version string of git that comes with Xcode correctly, and is puking on the extra details.

So to fix, you can install a git with a clean version number.

brew install git

You may need to make sure brew's version of git gets called by changing the order directories gets searched in your PATH (e.g., I had to load /usr/bin/local before /usr/bin). Alternatively, you can alias git to the absolute path installed by brew.


alias gk='gitk --all 2> /dev/null &' (I am on mac)

I have it in the ~/.bash_login file, and it solves it :D

you can also put it the .bashrc file


Need Your Help

php soap client for uk mail webservice api?

php web-services api soap wsdl

I'm working on a commerce site on which orders are placed. To track that delivery I need to give a link to users with all the parameters from a form filled by user to create a delivery and track its