-
Notifications
You must be signed in to change notification settings - Fork 258
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
SlimerJS not compatible with Firefox 62 #707
Comments
Not quite enough just switch to newChannel2 and provide null for the rest of the arguments (even though this post seems to suggest so: https://stackoverflow.com/questions/3772788/how-to-load-file-from-inside-firefox-plugin). Perhaps need to use newChannelFromURI2 instead since we have an URI argument. For my purposes though, I just disabled coffeescript in slConfiguration.jsm and that did the trick to make it working with FF 62. |
please fix it +1 |
Hi,
I found that passing nulls to newChannel2 isn't (quite) sufficient,
instead, this seems to work with FF62:
…--- a/ksn-feeder/slimerjs-mod/src/modules/slUtils.jsm
+++ b/ksn-feeder/slimerjs-mod/src/modules/slUtils.jsm
@@ -177,7 +177,9 @@ slUtils.readSyncStringFromFile = function
readSyncStringFromFile (file) {
}
slUtils.readChromeFile = function readChromeFile(url) {
- let channel = ioService.newChannel(url,null,null);
+ let channel = ioService.newChannel2(url,null,null,null,
+ Services.scriptSecurityManager.getSystemPrincipal(),
+ null, null, null);
let input = channel.open();
scriptableStream.init(input);
Which is copied from some code I found in Firefox test suite.
Mark
On Fri, 14 Sep 2018 at 18:48, Kalle Korhonen ***@***.***> wrote:
Seems like you can just switch to newChannel2 and provide null for the
rest of the arguments (
https://stackoverflow.com/questions/3772788/how-to-load-file-from-inside-firefox-plugin
).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#707 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABmsUtAxtVT_MyzxUuITXiiHkpfw0JpIks5ua-wDgaJpZM4Wprmb>
.
|
@MarkR42 could you provide a Dockerfile sample ? |
I can't provide a Dockerfile sample. For me it works with this change (plus change application.ini to allow Firefox 62) |
versions
Steps to reproduce the issue
Try to take a screenshot of any webpage with slimer.js
Actual results:
Error during the script execution
[Exception] TypeError: ioService.newChannel is not a function filename:resource://slimerjs/slUtils.jsm line:180
Stack trace:
0:readChromeFile@resource://slimerjs/slUtils.jsm:180:19
launchMainScript@resource://slimerjs/slLauncher.jsm:109:23
startup@chrome://slimerjs/content/slimerjs.js:20:9
onload@chrome://slimerjs/content/slimerjs.xul:1:1
Expected results:
Able to take a screenshot and operate normally.
Besides #694 that affects compatibility with FF 60, 61, FF 62 has apparently removed obsolete (since FF 48) functions newChannel(...) is nsIIOService (https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsIIOService) used in slUtils.jsm.
The text was updated successfully, but these errors were encountered: