--local-storage-path is ignored
I am using Phantomjs version 1.9.1 on linux (tried also in windows with no luck). After running the below example, the storage is saved in .qws/share/data/Ofi\ Labs/PhantomJS/https_delicious.com_0.localstorage
instead of in ./mylocal
am I doing something wrong here? Or is this a bug?
my command: phantomjs --local-storage-path=./mylocal sample.js
my sample script: page.open('https://delicious.com', function (){ phantom.exit(); });
I don't believe that the configuration value is handled correctly. Pending PR #404 (needs cleanup of its own) should resolve this.
Do you know of any work around atm? Trying to figure out what to do, basically if I cant set the path then i can only ever run 1 phantomjs process at a time because they have the possibility of sharing a session state. Seems like some sites store the session state in the local storage like Delicious instead of in a cookie. Which makes this a pretty big deal. It's like having all of phantomjs processes sharing 1 cookie store. So a disable/enable local storage flag I don't think would work here. Disabling it would mean you couldn't login. It seems like having a different local storage path per process would resolve it.
Any ideas on what I can do?
Only one thing you can do if you don't want to wait for the next major release: get the code, patch the handful of pertinent lines of code, and rebuild your own PhantomJS binary.
I'm a bit late to the party but @rgauny the workaround is to change your HOME environment variable. I'm doing that now to run multiple phantomjs processes with their $HOME set to temporary directories.
This appears to be resolved in 2.0
Landed in https://github.com/ariya/phantomjs/commit/bc294d38d2618a24acc420f2da7a49061da82f5d
I integrated this bugfix into the 1.9.x branch since it's only in 2.0 branch at this time. Pull request can be found here: https://github.com/ariya/phantomjs/pull/13825