Expected Safari data directory does not exist - selenium

Selenium 2.41,
Mac_OSX = 10.8.5,
Safari = 6.0.5
While launching Safari driver getting error message "The expected Safari data directory does not exist: /Users/null/Library/Safari"
After googling found out code in Safari extension classes is expecting System.getenv("USER"),
if (Platform.MAC.is(current)) {
return new File("/Users/" + System.getenv("USER"), "Library/Safari");
}
Configured .bash_profile and launchd.conf file, However this does not seem to fix the issue...
When i execute syso(System.getenv("USER"); in eclipse ide its still returning "null"
Could anyone please assist in resolving this issue
Thanks In advance

That'w weird, I'm on mac and in terminal:
echo $USER
gives my user.

According to http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html the correct property for your question would be
System.getProperty("user.name")
Also have a look at System.getProperty("user.home") (but note it could get messy under Windows when using Java 7 or older).

Related

intellij accessing invalid virtual file

Please help me I am stuck due to below weird behavior of Intellij 2021.2.4(Ultimate Edition)
I am getting error after opening project in Intellij as below :
"Accessing invalid virtual file: file://; original:12323; found:12333; File.exists()=true.
I restarted my machine on weekend and then opened the Intellij Idea today morning .
I have tried below solutions but in vain
1.Invalid Caches
2.Remove idea64.exe.vmoptions
Thanks in advance .
I had this same issue just now. For me, I was running our app via JavaScript Debug task and the app would immediately fail; I'd get the error message in a "red balloon" above my Debug tool window tab.
Following the advice of #Andrey I checked the logs. Sure enough, there was a hint:
com.intellij.openapi.vfs.InvalidVirtualFileAccessException: Accessing invalid virtual file: file:///Users/randy/projects/..../.../notifications; original:804838; found:805846; File.exists()=true
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.handleInvalidDirectory(VirtualDirectoryImpl.java:190)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.doFindChild(VirtualDirectoryImpl.java:111)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:77)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:500)
at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:44)
at com.intellij.javascript.debugger.JavaScriptDebugProcess.isMeteorClientScript(JavaScriptDebugProcess.kt:587)
at com.intellij.javascript.debugger.JavaScriptDebugProcess.getLocationsForBreakpoint(JavaScriptDebugProcess.kt:538)
at com.intellij.javascript.debugger.JSLineBreakpointManagerBase.setBreakpoint(JSLineBreakpointManagerBase.kt:36)
at com.intellij.javascript.debugger.breakpoints.JSLineBreakpointHandler.registerBreakpoint(JSLineBreakpointHandler.kt:17)
at com.intellij.javascript.debugger.breakpoints.JSLineBreakpointHandler.registerBreakpoint(JSLineBreakpointHandler.kt:12)
IntelliJ was trying to register breakpoints when it crashed. From there, I simply opened the Breakpoints dialog and trashed everything since they were all recent and moot anyway.
After that, I just closed the debug browser window that was left from my last failed attempt, then reran the Debug config. Everything worked as expected.

jQuery 3.3.1 file upload freeze in Safari 12.1.2 and higher

I'm trying to upload a file using jQuery 3.3.1 in Safari 12.1.2 and it allows me to browse and select the file that needs to be uploaded. But when I try to upload the selected file. It does nothing. No error message is displayed, at least in the browser console. This is working fine in Safari versions below 12.1.2, Chrome and Firefox. Can some one please let me know a clue to at least start troubleshooting this issue. (I also tried to debug the code but it ended up in jQuery-3.3.1.min.js and terminates.)
Found the change required to fix the issue. Option "forceIframeTransport" In the code snippet that refers to the fileupload function in jdeQuery-File-Upload has been set to "true" in my code. (As per the jQuery-File-Upload doc this value is set to false by default) How ever for a unknown reason file upload fails in Safari 12.1.2 and above when this value is set to true. So simple the fix in my case is setting "forceIframeTransport" to "false" as shown in below code snippet. (please note that it's not required to have cross cite file uploads which is affected by this option in my application)
$('.assetupload').fileupload({
**forceIframeTransport : false**,
add : function(e, data) {
.......
.......
});

Yiii2 - 500 internal error

someone gave a copy of a project created with yii2 and I had to Execute composer to get all the packages for the project, but I get this error:
This is what I get in the Runtime/app.log file:
[127.0.0.1][-][-][error][yii\web\HttpException:404] yii\web\NotFoundHttpException: Page not found. in C:\xampp\htdocs\prueba-desarrolladores\vendor\yiisoft\yii2\web\Request.php:189
I haven't been able to access the main view of the project. I've been looking at the related post in here, but nothing works I have no idea what to do, thanks for the help.
I had this twice.Firstly I seen my "Network Tab" in Chrome Developer Options and it said:
PHP Notice 'yii\base\ErrorException' with message 'unserialize(): Error at offset 0 of 16105 bytes'
I was delete my cookies with EditThisCookie Chrome extension and solved temporary.Tomorrow day I had this error again and I found the solution in this answer and I delete my project runtime/debug folder and my problem solved.

Icenium Mist - Can't Run Simulator in Chrome (Script Error)

This used to work for me, but now whenever I attempt to "Run in Simulator" with any of the iPhone or iPad types selected, I instantly get the console message
2013/10/1 10:4:48 Error: Script error. (URL: , LineNumber: 0)
I am working in the latest version of Chrome. Any help would be appreciated!
Just so that other users are aware, you can get that error on almost any problem in Mist and identifying the cause usually requires that we (I'm part of Icenium team) look into the specific project. In this particular case the problem was caused by missing App_Resources folder, which blaster has removed from his repository prior cloning it in Icenium. Generally an Icenium project should be able to function without this folder and we would fix this for the next version.

casperjs.bat on windows fails with cannot find module cli.js error

I'm trying out casperJS to run some automated tests. On windows. I followed this installation guide but am stuck.
when I try to run a simple test from the command line like this:
casperjs.bat smoketest.js
I get the following error:
Error: Cannot find module 'C:/code/base/main/Shared/casperjs\modules\cli.js'
I checked, and the file cli.js does exist under the specified path.
I thought the problem could be the mixture of forward and backward slashes in the path, but I edited the bootstrap.js casper code to hard code the path and it made no difference - it still the cannot find module.
I'm have tried this using phantomJS version 1.9.0, and 1.8.2.
Anyone know what I am doing wrong?
Has anyone had success running casper on Windows?
This is due to a bug in PhantomJS 1.9.0 that does not allow for absolute path loading in Windows. Afaik, this should only be apparent if you are using a master build of CasperJS (v1.1).
This bug has been fixed, but is not yet in the Windows binary. You can compile it yourself if you'd like, but that can take quite a bit of time.
I was using the master build of casper. With the latest released version, 1.0.2, it works fine.