demo.py running error
Closed this issue · 12 comments
Hi, I am trying to run demo.py but leaving the below error. Seems like there is no "extention_port.txt"... Would you mind taking a look at this issue?
For your information, I followed up on your instruction under "installation" and "pre-requisites". I am using a fresh ubuntu-20.04.4 / Linux environment. Thank you in advance.
[demo.py]
(openwpm) kyle@ubuntu:~/OpenWPM$ python demo.py
browser_manager - INFO - BROWSER 731785476: Launching browser...
browser_manager - ERROR - BROWSER 731785476: Crash in driver, restarting browser manager
Traceback (most recent call last):
File "/home/kyle/OpenWPM/openwpm/browser_manager.py", line 726, in run
extension_socket = self._start_extension(browser_profile_path)
File "/home/kyle/OpenWPM/openwpm/browser_manager.py", line 681, in _start_extension
with open(ep_filename, "rt") as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/firefox_profile__j_06uwv/extension_port.txt'
Hmm, that is very curious. Can you run ./scripts/build-extension.sh
and try again?
This bug indicates to me that something is going wrong in the extension causing a failure on startup.
Did you modify anything or is this the unmodified current master?
Thanks for your advice. So far, no modification has been made...
As advised, I again ran "./scripts/build-extension.sh" but I can see the same error message indicating(below).
I'll keep looking at what I can do...
"FileNotFoundError: [Errno 2] No such file or directory: '/tmp/firefox_profile__j_06uwv/extension_port.txt'"
Okay, a couple of ideas:
- Run ./firefox-bin/firefox to see if it starts correctly
- In the BrowserParams change the display mode to
native
and increase both the sleep and the timeout of the get command.
Then, once the browser window is visible, open a new tab, go to about: debugging, go to the second panel (I'm on mobile so I can't look up the name rn) and then inspect the openwpm web extension. You should see some sort of error in the console.
Thanks again for your quick advice!
I followed accordingly but as a result, I was not able to find error information(actually blank) during debugging of the browser after running "demo.py". Also leaving the same error message(below) which is obvious
"FileNotFoundError: [Errno 2] No such file or directory: '/tmp/firefox_profile__j_06uwv/extension_port.txt'"
My guess is, it seems there is no extension being installed in the first place although I tried both "install.sh" and "./scripts/build-extension.sh" per instruction but no error occurred during installation. The above two files worked safely and completely.
Sorry to keep dragging you into this:(
All good, this is very weird and shouldn't happen, so it needs to be investigated.
Can you confirm that there is an openwpm.xpi
under Extension/firefox
?
Also can you paste the content of the geckodriver.log
from the root of the project.
Hi! I can confirm there is an "openwpm.xpi" under "Extension/firefox".
Below is the copy of logs from "geckodriver.log".
Many thanks for your engagement over this.
1647937343498 geckodriver INFO Listening on 127.0.0.1:44175
1647937344006 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "--remote-debugging-port" "60175" "-no-remote" "-profile" "/tmp/rust_mozprofilelSuUK3"
ATTENTION: default value of option mesa_glthread overridden by environment.
1647937345560 Marionette INFO Marionette enabled
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /tmp/rust_mozprofilelSuUK3/search.json.mozlz4", (void 0)))
DevTools listening on ws://localhost:60175/devtools/browser/704812d7-c0b4-4ccb-b367-69359fb9a1d3
1647937347132 Marionette INFO Listening on port 39191
1647937347236 RemoteAgent WARN TLS certificate errors will be ignored for this session
1647937354093 Marionette INFO Stopped listening on port 39191
console.warn: TopSitesFeed: Failed to fetch data from Contile server: NetworkError when attempting to fetch resource.
JavaScript error: chrome://remote/content/marionette/cert.js, line 55: NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsICertOverrideService.setDisableAllSecurityChecksAndLetAttackersInterceptMyData]
###!!! [Parent][PImageBridgeParent] Error: RunMessage(msgname=PImageBridge::Msg_WillClose) Channel closing: too late to send/recv, messages will be lost
1647937364182 geckodriver::marionette ERROR Failed to close browser connection: Socket not connected (os error 107)
1647937553840 geckodriver INFO Listening on 127.0.0.1:43807
1647937554845 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-no-remote" "-profile" "/tmp/rust_mozprofileOxN2Ik"
ATTENTION: default value of option mesa_glthread overridden by environment.
1647937555799 Marionette INFO Marionette enabled
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /tmp/rust_mozprofileOxN2Ik/search.json.mozlz4", (void 0)))
1647937557522 Marionette INFO Listening on port 42353
1647937557645 RemoteAgent WARN TLS certificate errors will be ignored for this session
1647937576276 Marionette INFO Stopped listening on port 42353
1647938419741 geckodriver INFO Listening on 127.0.0.1:34275
1647938420743 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-no-remote" "-profile" "/tmp/rust_mozprofiledpUxyV"
ATTENTION: default value of option mesa_glthread overridden by environment.
1647938422276 Marionette INFO Marionette enabled
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /tmp/rust_mozprofiledpUxyV/search.json.mozlz4", (void 0)))
1647938424791 Marionette INFO Listening on port 45129
1647938424942 RemoteAgent WARN TLS certificate errors will be ignored for this session
1647938442140 Marionette INFO Stopped listening on port 45129
###!!! [Parent][PImageBridgeParent] Error: RunMessage(msgname=PImageBridge::Msg_WillClose) Channel closing: too late to send/recv, messages will be lost
1648022517621 geckodriver INFO Listening on 127.0.0.1:41275
1648022518631 mozrunner::runner INFO Running command: "/usr/bin/firefox" "--marionette" "-no-remote" "-profile" "/tmp/rust_mozprofileboJU24"
ATTENTION: default value of option mesa_glthread overridden by environment.
1648022519854 Marionette INFO Marionette enabled
console.warn: SearchSettings: "get: No settings file exists, new profile?" (new NotFoundError("Could not open the file at /tmp/rust_mozprofileboJU24/search.json.mozlz4", (void 0)))
1648022521959 Marionette INFO Listening on port 33531
1648022522077 RemoteAgent WARN TLS certificate errors will be ignored for this session
1648022525420 Marionette INFO Stopped listening on port 33531
JavaScript error: chrome://remote/content/marionette/cert.js, line 55: NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsICertOverrideService.setDisableAllSecurityChecksAndLetAttackersInterceptMyData]
1648022538996 geckodriver::marionette ERROR Failed to close browser connection: Socket not connected (os error 107)
I really don't know what is going on there. Can you try pulling the latest master, rerunning install.sh
and then trying again.
@YMEN6 are you still using a version of OpenWPM that has the webext-instrumentation in a separate branch?
Can you try the latest master?
Thanks for your help. I just ran install.sh, build-extension.sh as prompted in README and did not install webext-instrumentation as per Extension.README.
Also both Latest and WebGraph branches will get the above mentioned problem.
I'll try again with webext-instrumentation, thanks a lot!
After installing webext-instrumentation, I ran the demo.py and finally got the problem: missing extension_port.txt
This shouldn't happen anymore on the latest master.