OS X Firefox lockPref configuration error - macos

I am having issues getting lockPref working on my Mac. I have followed instructions here, as well as looking in other places for solutions. I have created a mozilla.cfg file, as well as a local-settings.js file in /Applications/Firefox/Contents/Resources/defaults/pref, as follows:
mozilla.cfg
//
lockPref("extensions.shownSelectionUI", true);
lockPref("extensions.autoDisableScopes", 11);
local-settings.js
pref("general.config.obscure_value", 0);
pref("general.config.filename", "mozilla.cfg");
These are both saved using Windows Latin encoding (have tried Windows Roman too). When opening Firefox, I am getting an error dialogue saying, "Failed to read the configuration file. Please contact your system administrator". I'm not sure where to go from here, as other solutions have involved UTF encoding problems and incorrect configuration values - I saved an empty mozilla.cfg file to attempt to rule that out, and the problem still persists.
FYI I'm using OS X 10.11.5 and Firefox 42.0. Thanks.

So, I didn't have mozilla.cfg in the correct location - I was storing it in the prefs folder with the local-settings.js, which is incorrect.
File locations are now as follows:
/Applications/Firefox.app/Contents/Resources/mozilla.cfg
/Applications/Firefox.app/Contents/Resources/defaults/pref/local-settings.js

Related

VS Code debugger: failure to find module (utf-8 characters)

When I try to run a Node.js debugging session from Visual Code, the debugging console returns an error, saying that the bootloader.bundle.js could not be found. However, the bootloader.bundle.js file exists at the expected location, while the debug console specifies the folder incorrectly by substituting a UTF-8 character (letter č) with the replacement character (�). The snippet of the error message can be found below:
Error: Cannot find module 'c:/Users/xxxx xxxx�/AppData/Local/Programs/
Microsoft VS Code/resources/app/extensions/ms-vscode.js-debug/src/bootloader.bundle.js'
Can I somehow fix this in VS Code, perhaps by modifying the launch.json file in some way or some other settings?
Any help is appreciated!
EDIT:
I temporarily fixed the issue by reinstalling VS Code to another folder without that doesn't include diacritical characters. I'd like to to keep this question open, however, in case somebody knows of a way to fix this sort of problem (e.g. by by modifying some configuration files) that does not require either reinstalling or relying on a portable version of the app.
I have just dealt with the same issue. There have been Unicode characters in my folder's path and I got the same error "Cannot find module". Reasons are described in details here.
To fix it I have gone to File - Preferences - Settings and then entered "usePreview" and then I unchecked the option "Use the new in-preview JavaScript debugger for ..." under the section "Debug > JavaScript: Use Preview" and reloaded VS Code. The issue has gone.

Cocos desktop app can not access to files on MacOS

I have an application with the following structure:
./Data/test.txt
./TestMacOSApp
So my TestMacOSApp opens ./Data/test.txt and uses the content of test.txt. This app was working for a long time either on my MacBook or others MacBook. Recently I noticed that the app works on my MacBook fine,
but on others it crashes throwing "File is not found exception".
I create TestMacOSApp using XCode v9.1.
MacOS version is 10.12.6.
The App creation steps are Archive->Export->ExportApp (Without re-signing).
Does someone else have such an issue?
How can I solve this issue?
I don't know how you open the file because you didn't provide the code which does this.
But I know that, when you export your app on other computers, it is important to calculate the real path with fullPathForFilename, instead of giving directly the path that you know. Like this:
auto fileUtils = FileUtils::getInstance();
string content = fileUtils->getStringFromFile(fileUtils->fullPathForFilename(filename));
Have you done this? If you have, and it doesn't work, your file is probably just not where you expect it to be, so please check again.

Failed to Create Data Directory - Google Chrome Cannot Read and Write Its Data Directory - Cordova

I've been working on a Cordova app, and I've suddenly had troubles with Chrome.
I've wanted to start debugging, so I added support for a browser platform, and I use Chrome.
After running the app on Chrome, which worked before, I encountered this problem:
Failed To Create Data Directory
Google Chrome cannot read and write its data directory:
C:/Chromedevsession"
screenshot here: http://prntscr.com/876kax
Things I tried:
Deleting Chrome -> Reinstalling Chrome - found this online
Deleting Windows registry key HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome - there's no
Chrome folder or key inside the Google folder, only an Update folder
While uninstalled, using a different browser as my default browser - the command that runs the app (cordova run) didn't open another
browser (I tried Firefox).
It already worked before, and I don't know why it suddenly happened. I tried upgrading to Windows 10 a few times and it failed, so could there be a problem in the registry?
I solved this issue by editing the run file (platforms/browser/cordova/run) and removing the speech marks from around C:/Chromedevsession on line 33.
The line now reads:
spawn('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe', ['--user-data-dir=C:/Chromedevsession', '--disable-web-security', project]);
This is because the script that launches chrome, uses a folder location that typically can't be created with your permissions. That folder is used for history, bookmarks, cookies, etc (ie user data). This is beneficial for testing out features in Chrome (plugins, etc) and not affecting your normal instance. I don't consider it much of a concern here, more of a nuisance message. If you don't like it you could always just manually create that folder on your system as well.
You can see this here what causes the issue
switch (process.platform) {
case 'darwin':
spawn('open', ['-n', '-a', 'Google\ Chrome', '--args', '--disable-web-security', '--user-data-dir=/tmp/temp_chrome_user_data_dir_for_cordova_browser', project]);
break;
case 'win32':
//TODO: Use regex to fix location of chrome.exe
//TODO: Get --user-data-dir to work for windows
spawn('C:/Program Files (x86)/Google/Chrome/Application/chrome.exe', ['--user-data-dir="C:/Chromedevsession"', '--disable-web-security', project]);
break;
}
Since it can't use that folder, I believe it just reverts to the defaults which on Windows 10 would be
C:\Users\%USERNAME%\AppData\Local\Google\Chrome\User Data\Default
Remove Space in Path in Registry Policy
HKEY_CURRENT_USER\Software\Policies\Google\Chrome\UserDataDir
or
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\UserDataDir
Example:
${roaming_app_data}\Google\Chrome\User_Data
instead of
${roaming_app_data}\Google\Chrome\User Data
There is a simpler solution to this. Just specify the full path to the special directory you want to use for your debug chrome instance. In my case I set the user data directory to a folder next to the default user data directory, called "Debug". The following works for me specified as a script in my package.json:
"start-remote-debugging-browser": "C:\\PROGRA~2\\Google\\Chrome\\Application\\chrome.exe -incognito --app=http://localhost:4200/ --remote-debugging-port=9222 --user-data-dir=C:\\Users\\mmcin\\AppData\\Local\\Google\\Chrome\\User Data\\Debug"

NancyFx: static file not found when file name has a plus sign

I'm running NancyFx on Mono/ASP.NET (Mac OS X) and currently I am not able to retrieve a file that contains a plus sign in its filename. All other files without a symbol work fine and I've confirmed it is not a permission issue.
+1.png is the file's name. I've tried making a request to get %2B1.png instead and it did not work.
I'm probably missing something obvious. Help? :)

Dimitre Novatchev's XPath visualizer help

I want to try what looks like a really cool tool. I've dl'd the FF version from http://www.huttar.net/dimitre/XPV/TopXML-XPV.html.
I open XPathMain.htm in FireFox, Browse to the provided test1.xml file, click Process File, with the default //* in the XPath window. In FF, I get this:
[Exception... "Access to restricted
URI denied" code: "1012" nsresult:
"0x805303f4 (NS_ERROR_DOM_BAD_URI)"
location:
"file:///Users/doug/Dev/XPV-FF/XPathMain.htm
Line: 43"]
I also opened it in Safari, followed the above, and nothing happened, when I clicked Process File.
Once I get it working, what am I expecting to see? I assume I will see the xml file in the big window with selected nodes highlighted?
I'm on OS X 10.6.6 and FF 3.5.16. Thank you.
I experienced this error also and after a bit of trial and error, I resolved the problem by placing my .xml file in the same directory as XPathMain.htm. It then immediately rendered in the lower window after selecting the Process File button.
Moving the authors.xml file outside the XPV-FF/ generates the same error. Perhaps this is the same origin policy type security?
I am not sure what could be an issue-- I cannot reproduce the reported problem.
Just downloaded and installed FF 4, opened file:///C:/Temp/XPV-FF/XPathMain.htm
and then specified:
C:\Temp\XPV-FF\authors.xml
The XPV works as expected.
Please, try to work with the file authors.xml that comes with the XPV and is in the same folder as the XPV starting page. If you can work with this file, this definitely means that there is a permission problem with the file that has the reported issue.

Resources