Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Please mention OSX fix for issue #4 in documentation #179

Closed
tararoys opened this issue Feb 12, 2014 · 3 comments
Closed

Please mention OSX fix for issue #4 in documentation #179

tararoys opened this issue Feb 12, 2014 · 3 comments

Comments

@tararoys
Copy link

Referencing issue #81

Trying to run Chrome on OSX with the flag mentioned in the "Cross domain policy problems under Chrome" section of the README. resulted in the following error:

 > /Applications/GoogleChrome.app/Contents/MacOS/GoogleChrome --allow-file-access-from-files SpecRunner.html 
 [29978:2819:0211/221357:ERROR:process_singleton_mac.cc(103)] Unable to obtain profile lock.

After three solid hours of debugging, the magic solution was to close Chrome entirely. Without an instance of Chrome running, the profile lock (not certain what a profile lock is, but this guy seems to know is no longer a problem, and you can run the command:

 >/Applications/GoogleChrome.app/Contents/MacOS/GoogleChrome --allow-file-access-from-files SpecRunner.html 

And Chrome will allow you to load fixtures just fine.

note: for people who are trying to use the path /Applications/GoogleChrome.app/Contents/MacOS/GoogleChrome to launch Google Chrome, be warned that the spaces in the default name annoyed me so renamed "Google Chrome" to GoogleChrome. You probably want to check to see what your personal pathname is.

@travisjeffery
Copy link
Collaborator

so add something that says that you need to quit a running chrome before running that command to open a new one?

@tararoys
Copy link
Author

Yes. Specifically, you need to completely close Chrome as a program, because that will release the profile lock. (I don't know what a profile lock is. I just know that it turns on whenever you start chrome and prevents you from opening a new chrome window with the allow-file-access-from-files flag.)

tararoys added a commit to tararoys/javascript_racer that referenced this issue Feb 24, 2014
See commit for how I did it.  Also, in order to run jasmine-jquery in chrome, you need to launch chrome from the command line with the following flag:

/Applications/GoogleChrome.app/Contents/MacOS/GoogleChrome --allow-file-access-from-files SpecRunner.html
 [29978:2819:0211/221357:ERROR:process_singleton_mac.cc(103)] Unable to obtain profile lock.

You have to close Chrome entirely to do it, otherwise you will get a profile lock error.

velesin/jasmine-jquery#179
r4j4h added a commit to r4j4h/jasmine-jquery that referenced this issue May 13, 2014
* commit 'b94ad8741909b8a48521d168a1ae6b742180122e': (77 commits)
  2.0.3
  fix velesin#179
  fix style
  fix toEqual() examples (velesin#176)
  Providing the parameters from jqXHR.fail
  2.0.2
  Update fixture to ignore script tag without src attribute
  Documentation fix
  2.0.1
  Run tests with jquery 2
  Update ajax call to work with jquery 2
  Update dependencies for jasmine v2 (close velesin#166)
  Fix matchers to be in alphabetical order and add toBeInDOM
  Update README docs for v2 (velesin#154)
  v2.0.0 - adds support for jasmine v2 (fix velesin#154, fix velesin#164)
  Update grunt-contrib-jasmine
  Run tests off of jasmine v2.0.0-rc3
  Able to bind events to fixtures
  Pass in window to the self invoking function
  1.7.0
  ...
@ninjasort
Copy link

This feels super hacky.. is there no better way to build this into the library?

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

No branches or pull requests

3 participants