-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'ReferenceError: HAR is not defined' in new webextension based plugin. #24
Comments
@farooqrahman you might want to add these preferences to your session initalize flow: {
args : [
'-devtools',
],
prefs: [
'devtools.netmonitor.persistlog': true,
'devtools.toolbox.selectedTool': 'netmonitor',
'devtools.toolbox.footer.height': 0,
]
} |
You may need retry mechanism on your code side to work around this...at this moment. If the HAR API is not defined, wait for couple of seconds, then try it again. Another possible way could be adding I guess that Good luck! |
@leipreachan I am already using those options when dumping the HAR. Thanks for the suggestions. @xmhubj yes, you are right somehow we need to wait for the page load to happen so that HAR object can be injected. I found one solution for this which fixes this problem. I check whether HAR object is available or not before dumping the HAR. Below is the pseudocode Below is the javascript code I have used for this issue. Here I am polling for every 500ms to check the HAR object availability.
|
Hi @janodvarko,
We successfully launched our product using har-export-triggerExport-0.6.1 and it's been used by our customers. All credit goes to you for providing this super cool new plugin which uses new WebExtension.
But one of our customer's face this issue 'ReferenceError: HAR is not defined'.
The environment in which this error reported is
Firefox version: 61.0
har_export_trigger version: 0.6.1
All the HAR dump process happens during selenium java execution. We dump the HAR after every click action on the page.
This dumping of the HAR happens instantly after button click. In one of the customer application page when the user clicks on a button we got this error. But if I delay the dumping of HAR say after 2 or 3 seconds then this error does not occur.
Is there any event listener which we have used in the previous version of har-export-triggerExport-0.5.0-beta.7, where we specify the below code before dumping of HAR so that we can wait for the event before dumping of the HAR.
This is a very high priority bug for us can you please address this issue and give us a workaround.
Regards,
Farooq.
The text was updated successfully, but these errors were encountered: