So I'm working with RequireJS and BackboneJS. I can get everything to work fine in Chrome but when I load up in Firefox I'm getting that lessc is not defined. Obviously pulling out the less files will prevent the error from occurring. Does anyone have any ideas why require is unable to load lessc in firefox but its doing fine in chrome?
Screenshot:
http://screencast.com/t/WenocFdCA0V
Video w/ lessc not being defined in Chrome but not Firefox
http://screencast.com/t/ac96qZrpQb3R
Let me know what other info may be useful.
Thanks in advance!
Seth
less.js is broken, because it uses loadStyles before it defines it, and Firefox stopped hoisting functions according to the spec. There are probably more such mistakes, but this is the first one that is triggered during execution. Please note that the minified version is not affected because of the minification rewriting the code.
less-require is similarly broken, as it contains less.js and therefore contains the same bug.
You might want to replace lessc.js in require-less with the 1.5 beta or master version of less.js to work around this, or wait for upstream to officially release it and require-less to pick it up.
However, it appears that lessc.js is a modified version, so it isn't likely as easy as replacing the file. You would need to merge the changes back.
It might be easier just to move the affected latedefs around until it runs correctly instead of upgrading to a later less.js version.
Related
I'm starting to work on a small firefox plugin, it's a basic js script, no problem on this side.
I've made a few successfull tests, and had a a few satisfying results. But starting yesterday, i'm unable to laod any temporary addons in firefox.
Everytime i try to start one (even a simple console.log("hello world")), i get the error message in the console:
Error: Can't find profile directory. XULStore.jsm:66:15
It work perfectly 2 days ago, the problem appeared yesterday, and, as far as i know, i didn't made any firefox upgrade.
I've made a few reseach, a found two usefull links, one on discourse.mozilla of someone that has the exact same problem ... but no answer, and another one on bugzilla saying this bug won't be fixed because it should last long ... https://bugzilla.mozilla.org/show_bug.cgi?id=1548017
I'm askign here because i can't find any solution to my problem, and right now, it's been 24h since i'm stuck in my development progress. I'm open to any suggestion that might work.
I've checked my profiles directory and files, they're existing and ok... and that's basically everything. I'm not familiiar with the tools available for firefox so, i might have forgotten to check basic things that might help.
P.S: i'm not using selenium at any time (i've seen a few requests here about a similar issue with selenium, but i'm writing vanilla JS here, so, i think it's not the same issue)
So I've been having an issue getting my Protractor/Jasmine tests running in FireFox. I've been aware of the version issue from FireFox that doesn't support selenium angular/bootstrap etc etc and that has been my issue to date.
I was informed to try geckodriver but really can't find any good resources on how to set it up using protractor and jasmine. Or even which driver is the appropriate one to use.
Recently I've tried the following to get FF back up and running (all resulted with no luck):
Downgraded FireFox to as low as 33.x.x while keeping
Protractor/Jasmine at current versions (4.0.5 and 2.51 respectively).
Downgraded Protractor to as low as 3.0.0 while keeping FF at current version (47.0.1)
Downgraded both Protractor and FF to the lowest above versions.
Used Latest Version of FF 47.0.1 with lesser versions of Protractor.
Used Latest Version of FF 47.0.1 with latest version of Protractor 4.0.5
Used directConnect: true and directConnet: false
So I guess now I have one of two questions:
1. Could somebody post a protractor config snippet using the geckodriver / or direct me to a walk-through of this.
2. Inform me of a work around or a working solution (versions of both webdrivers/protractor/jasmine, etc).
If you need to see errors or my config file or anything at all please just simply comment and I'll be happy to revise.
There was a period of time around Firefox v46 and Selenium v2.5x where things were incompatible due to changes to the firefox web-driver. The issues were quickly addressed by the community.
The issue with Protractor lies with the webdriver-manager being a bit out of date with the updates. As per discussions on github, they are aware of this, and a fix is coming.
The workaround in the meantime is to manually update the outdated pieces.
Here's how you'd do it, run
webdriver-manager update
This will give you the paths to all the components the webdriver-manager handles for you.
Navigate to the selenium-server-standalone.jar file (protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar in my case) and replace this with the latest selenium standalone jar (anything v3+ should be good). Make sure to retain the exact filename as the previous jar file. (link: http://www.seleniumhq.org/download/)
Repeat the process to get the latest Gecko web-driver. Uncompress and replace the current version. (link: https://github.com/mozilla/geckodriver/releases)
Now run your tests through protractor and you should be good with the latest version of Firefox.
Good luck and happy testing :)
In a previous project I wrote a Firefox extensions - nothing too complex - that used xmpp4moz, an add-on for Firefox that integrates the xmpp/Jabber protocol. At that time Firefox 3.6 most the most recent one and everything worked quite well. Now with Firefox 5 xmpp4moz does produces errors, starting with
Error: Component.classes['#something/something/...'] is undefined
and naturally resulting in further 'undefined' errors. In some sense this is ok, since xmpp4moz is officially not available for Firefox 5. And given that the last update was in 2009 I don't really expect a updated version. Currently I see the following two options:
Looking for alternatives/workarounds/...; so far I haven't found anything. Any ideas?
Trying to update/modify xmpp4moz myself to make it running in Firefox 5
The thing is that at the moment I cannot really assess the required efforts.
Summing up, I'm stuck :)
The sameplace download at http://www.sameplace.cc/ appears to include a slightly newer version of xmpp4moz (I didn't really check whether install.rdf is the only difference from the source code repository however). Still, it is only compatible with Firefox 3.6. From the look of it, there are no big issues, main problem is that the XPCOM components aren't being registered. See https://developer.mozilla.org/en/XPCOM/XPCOM_changes_in_Gecko_2.0 for information on the relevant changes, usually updating the components and chrome.manifest is easy.
Has anyone been able to get anything past 4.0b1 of firefox either nightly or releases to build with jssh enabled in the .mozconfig, I get the error .js component without matching .manifest and if I change the rules I get a missing header file, which if I manually copy to the jssh directory and then build gives many many compile errors, was wondering if anyone knew what was going on with jssh as I managed to build it for 4.0b1 and it worked fine (except for an issue involving td tags and events within those tags). I just hope mozilla doesn't discontinue jssh. Any answers would be appreciated.
Looks like it is known, but may not be fixed.
for JSSH users,
we have created a solution over MozRelp that simulates JSSH.
It's also very fast, since it execute JS on the fly and avoid execute it from a HD File.
Downloadable extension: https://s3-us-west-2.amazonaws.com/abstracta/WatiN/mozrepl-jsshv2.6.xpi
Source: https://subversion.assembla.com/svn/mozrepl-jssh
regards,
Fabián Baptista
I have tried out the NPRuntime sample provided with the Gecko SDK 1.9.1 with the help of this link.
It works perfectly fine with Firefox 3.6.
Following the above steps I created a new scripting plugin (npmyplugin.dll). I am currently placing npmyplugin.dll in a folder other than Firefox/plugins. I am registering the associated mime-type and plugin path in the registry. The plugin gets loaded properly. But now the browser is not calling NPP_GetValue.
I was suspecting that it must be because I am placing the plugin in a directory other than Firefox/plugins. Hence I did the same with npruntime.dll (the sample which comes with Gecko sdk). Suprisingly npruntime.dll scripting was working. Please guide me whether I missing anything important while creating the new plugin.
NPP_GetValue doesn't get called to get the NPObject until the first time you access it with javascript in many cases. When you do a getElementById, it will make the call.
Likely other calls to GetValue are being made, but you aren't seeing them because you aren't handling them. However, that's still not guaranteed.
Sorry for replying so late. I somehow solved the problem. I was embedding the plugin using tag
then i wrote a small javascript code
var MyWorkingPlugin = document.getElementById('MyPlugin');
It seems that after executing the above javascript NPP_GetValue was called. Currently I have no convincing reason why it happened but it worked and I am happy for the moment. If anyone can explain the above behaviour please let us know.