How do I find the logs of Firefox build? - firefox

I am building firefox browser
In the source code there is the code:
'''MOZ_LOG(sLogger, LogLevel::Debug, ("bug......"));'''
Where will this log be saved?
Doccument build firefox : https://firefox-source-docs.mozilla.org/setup/windows_build.html

Related

Firefox profile not loaded in Open Browser with Robot Framework SeleniumLibrary 4.0

I have created a new profile for Firefox to be used with Robot Framework SeleniumLibrary. However the profile is not loaded using the following
*** Settings ***
Library SeleniumLibrary
*** Keywords ***
Just testing
Open Browser about:blank Firefox ff_profile_dir=C:${/}Users${/}Administrator${/}AppData${/}Roaming${/}Mozilla${/}Firefox${/}Profiles${/}dev
*** Test Cases ***
Just testing
Which profile is used can be seen from page about:profiles
However, when checking about:profiles on a browser launched by webdriver, the profile is not marked as in use: page about:profiles on a browser launched by Webdriver
Any thoughts why Firefox profile is not loaded?
EDIT: How do I know for sure if the profile is loaded or not?
Looking at geckodriver log the directory seems to be totally different
mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\2\\rust_mozprofile2iM6KC"
The reason I have created separate profile is to bypass NTLM authentication using AutoAuth extension when launching automated tests suite.
SeleniumLibrary 4.0.0
Robot Framework 3.1.2 (Python 3.7.4 on win32)
Firefox 69.0.3
I've looked at my custom keyword to setup firefox profile:
from robot.api import logger
from selenium.webdriver import FirefoxProfile
class SeleniumPyExtension:
#staticmethod
def setup_firefox_profile(download_dir):
profile = FirefoxProfile()
logger.info('Download dir is {}'.format(download_dir))
profile.set_preference("browser.download.dir", download_dir)
profile.set_preference("browser.download.folderList", 2)
profile.set_preference(
'browser.helperApps.neverAsk.saveToDisk',
'image/jpeg;'\
'application/vnd.ms-excel;'\
'application/octet-stream;'\
'application/pdf;'\
'application/ogg;'\
'audio/mpeg;'
)
profile.set_preference("pdfjs.disabled", True)
profile.update_preferences()
profile_dir = profile.profile_dir
logger.info('Profile is located at {}'.format(profile_dir))
return profile_dir
and checked what it creates and it occurred that it creates directory with only user.js with bunch of user_pref(...) as described here.

How to troubleshoot when Safari App Extension not appear in Safari Preferences?

I'm developing a Safari App Extension. Previously it worked fine. When I run the project in Xcode, and enable Allow Unsigned Extensions in Safari, I can see my extension in Safari Preferences -> Extensions page.
After I merged code with one of my team member, suddenly the Extension cannot get installed.
I have tried:
Clean the build folder in Xcode, and run again. But no luck.
Restart Xcode doesn't help either.
Use command pluginkit -mAvvv -p com.apple.Safari.extension to check installed Safari extensions list. My extension is not in the list.
There are some errors in Xcode output, but I can't link them with the issue I'm facing:
objc[49476]: Class AMSupportURLConnectionDelegate is implemented in both /System/Library/PrivateFrameworks/EmbeddedOSInstall.framework/Versions/A/EmbeddedOSInstall (0x7fff9a2aa748) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108db2600). One of the two will be used. Which one is undefined.
objc[49476]: Class AMSupportURLSession is implemented in both /System/Library/PrivateFrameworks/OSPersonalization.framework/Versions/A/OSPersonalization (0x7fff9b5d49f0) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x108db2650). One of the two will be used. Which one is undefined.
2018-12-13 16:25:46.003099+0800 Safari[49476:1264277] Could not connect action, target class SecurityPreferences does not respond to -toggleJavaScriptCanOpenWindows:
2018-12-13 16:25:46.163130+0800 Safari[49476:1264277] AssertMacros: 0 (value = 0x0), file: /BuildRoot/Library/Caches/com.apple.xbs/Sources/BiometricKit/BiometricKit-75.71.1/BiometricKit/BiometricKitXPCClient.m, line: 75
2018-12-13 16:25:46.163219+0800 Safari[49476:1264277] AssertMacros: 0 (value = 0x0), file: /BuildRoot/Library/Caches/com.apple.xbs/Sources/BiometricKit/BiometricKit-75.71.1/BiometricKit/BiometricKitXPCClient.m, line: 396
2018-12-13 16:25:46.163465+0800 Safari[49476:1264277] [Framework-Internal-Legacy] AssertMacros: _xpcClient (value = 0x0), file: /BuildRoot/Library/Caches/com.apple.xbs/Sources/BiometricKit/BiometricKit-75.71.1/BiometricKit/BiometricKit.m, line: 137
2018-12-13 16:25:47.060959+0800 Safari[49476:1264368] [RemotePlistController] The downloaded plist could not be loaded: Error Domain=NSCocoaErrorDomain Code=260 "The file couldn’t be opened because it doesn’t exist."
2018-12-13 16:25:47.128105+0800 Safari[49476:1264277] Scheduling the NSURLConnection loader is no longer supported.
2018-12-13 16:25:47.491811+0800 Safari[49476:1264370] NSURLConnection finished with error - code -1100
2018-12-13 16:25:47.799590+0800 Safari[49476:1264514] [CloudBookmarks] Error fetching remote migration state: Error Domain=com.apple.SafariBookmarksSync.CloudBookmarksErrorDomain Code=0 "(null)"
2018-12-13 16:25:47.953259+0800 Safari[49476:1264277] [WebKit2Callbacks] Page (pid: 0) did become unresponsive
2018-12-13 16:25:47.970927+0800 Safari[49476:1264512] NSURLConnection finished with error - code -1100
2018-12-13 16:25:48.032647+0800 Safari[49476:1264425] [RemotePlistController] The downloaded plist could not be loaded: Error Domain=NSCocoaErrorDomain Code=260 "The file couldn’t be opened because it doesn’t exist."
2018-12-13 16:25:48.125530+0800 Safari[49476:1264426] Calling IOPPFGetProperty simulator_utility_clamp!
2018-12-13 16:25:48.840769+0800 Safari[49476:1264277] [WebKit2Callbacks] Page (pid: 49481) did become responsive
Now I'm running out of options. It lacks official documentation in Apple Developer site.
Is there regular steps to troubleshoot this kind of issue? Is there any kind of system logs which can help me address the error? Any suggestion is appreciated.
Make sure that the extension .appex is listed as embedded content for your App Extension target. Otherwise it doesn't get bundled when you build from Xcode. Look in the project editor under Target_Name > General > Frameworks, Libraries and Embedded Content. The extension should be listed there.
Also check under the Build Phases tab > Dependencies that your extension is added there as well.
Check to see if the code signature of your app is valid. Safari will refuse to list your extension otherwise. Run codesign on your built app as follows:
codesign -d --verify --verbose=3 ~/Library/Developer/Xcode/DerivedData/OnePassword-epeydspviethpabprcrsqenrkiin/Build/Products/Debug_WebStore/1Password\ 7.app
It should show valid on disk and satisfies its Designated Requirement. If it doesn't, Safari will ignore your extension completely, even when Allow Unsigned Extensions is enabled.
I had a similar problem more recently after updating to Xcode 13.2.1 and a I think a MacOS update. My Safari web extensions I was developing stopped showing up in Safari (even with unsigned extensions enabled).
In a Terminal/CLI shell, I ended up running:
PATH=/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support:"$PATH"
lsregister -f /Applications/Safari.app
And suddenly my extensions started showing up again in Safari. Something screwy happened with Safari and LaunchServices.

NS_ERROR_FILE_ACCESS_DENIED error when Firefox Addon is installed the second time

We have the Firefox Addon (the .xpi file) hosted locally. The xpi file is downloaded from the Mozilla Addon developer hub and put on our server.
When we install the Addon from the browser, the first time there is no error. Tho, before the Addon is installed there is a prompt that says "Firefox prevented this site from asking you to install software...". When I allow the Addon it installs properly.
But after the Addon is removed and installed again it logs the following errors in the browser's console:
1523369438217 addons.xpi WARN Failed to remove temporary file
C:\Users...\AppData\Local\Temp\tmp-7i8.xpi for addon
https://www........com/BrowserExtensions/FF/pulselinks_window_launch-1.0-fx-windows.xpi:
[Exception... "Component returned failure code: 0x80520015
(NS_ERROR_FILE_ACCESS_DENIED) [nsIFile.remove]" nsresult: "0x80520015
(NS_ERROR_FILE_ACCESS_DENIED)" location: "JS frame ::
resource://gre/modules/addons/XPIInstall.jsm :: removeTemporaryFile ::
line 1493" data: no] Stack trace:
removeTemporaryFile()#resource://gre/modules/addons/XPIInstall.jsm:1493
startInstall/<()#resource://gre/modules/addons/XPIInstall.jsm:1845
Any idea what might be causing the issue?
Firefox latest version
Windows 7 and 10

How to Open firefox extension page with Selinium

I am trying to automate testing for restful API, and I am using Firefox rest-client extension.
If I type in url box "chrome://restclient/content/restclient.html"
This page loaded successfully, however I am unable to open it with Selenium IDE or through Java code
Here is Selenium code
open | chrome://restclient/content/restclient.html
or
<tr>
<td>open</td>
<td>chrome://restclient/content/restclient.html</td>
<td></td>
</tr>
It gives me following error
[info] Executing: |open | chrome://restclient/content/restclient.html | |
[error] Unexpected Exception: Error: Access to 'chrome://restclient/content/restclient.html' from script denied.
[info] Test case failed
I have noticed that, It rejects every thing which do not have http:// prefix
Could someone please suggest how to open this extension page so that I can proceed with my Test?
you can use this for running standalone chrome://restclient/content/restclient.html.
"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -new-window -chrome chrome://restclient/content/restclient.html
I suppose that you already have a extension file with .crx extension,if not, you can pack the extension by going in to the developer mode of Chrome.
By using ChromOptions Class you can add particular extension.
Here is the code for chrome, which i wrote and tested. It is working fine in my system.Let me know if you face any issue. Would like to help you.
System.setProperty("webdriver.chrome.driver","C:\\Users\\Maverick\\Desktop\\chromedriver.exe");
ChromeOptions options = new ChromeOptions();
options.addExtensions(new File("C:\\Users\\Maverick\\Desktop\\RestClient.crx"));
WebDriver driver = new ChromeDriver(options);
driver.get("chrome-extension://hgmloofddffdnphfgcellkdfbfbjeloo/RestClient.html");

Why won't Firefox trace to flashlog.txt in Ubuntu?

Okay me and my friend are about to tear our hair out trying to configure the Adobe Flex SDK to work properly on our Ubuntu machine. We have installed and configured the SDK to compile ActionScript files but the FlashPlayer Debugger fails to log traces or errors to flashlog.txt when we execute the compiled swf in Firefox.
We have Flash Player Debugger installed into Firefox and a mm.cfg file located in our home directory.
Links to what we've tried:
http://www.arulraj.net/2010/08/flash-player-debugger-in-ubuntu.html
http://www.gregoryprogrammer.com/2012/12/actionscript-3-code-compilation-in-inux/
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7fc9.html
http://helpx.adobe.com/flash-player/kb/configure-debugger-version-flash-player.html
Versions of what we're using:
Firefox Browser 18.0.2
Ubuntu OS 12.0.4
Latest Flex SDK
I notice you didn't mention compiling with the -debug flag. Here're the steps I take:
Make sure you're using the debug version of the player (hit flashplayerversion.com to check). This is getting trickier in-browser, especially in 64-bit Linux. Firefox is probably easier than Chrome these days. You can also try the debug content projector (aka standalone player) located here.
Have a ~/mm.cfg file with TraceOutputFileEnable=1. Here's mine:
> cat ~/mm.cfg
ErrorReportingEnable=1
TraceOutputFileEnable=1
Use the trace method somewhere you know it will be executed:
> cat Main.as
package {
import flash.display.Sprite;
public class Main extends Sprite {
public function Main() {
trace("Hello flashlog.txt");
}
}
}
Compile the SWF with the -debug option:
mxmlc -debug Main.as
I'll test with the content projector:
>flashplayerdebugger Main.swf &
>tail ~/.macromedia/Flash_Player/Logs/flashlog.txt
Hello flashlog.txt
Or open a dedicated terminal to follow the log file as it is written:
>tail -f ~/.macromedia/Flash_Player/Logs/flashlog.txt

Resources