TypeError in qx.ui.mobile.core.EventHandler after update to qooxdoo 1.5 - qooxdoo

After updating to qooxdoo 1.5 I am seeing this error:
Uncaught TypeError: Expecting a function in instanceof check, but got #<HTMLDocument>
:8080/qooxdoo-1.5-sdk/framework/source/class/qx/ui/mobile/core/EventHandler.js?nocache=0.38786523090675473:245
Strange thing is, that I am not using the qx.ui.mobile.* classes at all. This is with a source-all build and "qx.debug" set.

As for including the qx.ui.mobile.* classes, this comes from using the source-all job, which includes, well, all known classes, also the qx.ui.mobile.* ones. Try using the normal source job, which only includes the classes necessary for your app.
As for the error, please open a bug report at http://bugzilla.qooxdoo.org. Please specify the OS and browser you are using when you get the error. If possible, supply a minimal Application.js (or a Playground link) that reproduces the error. Cheers.

Related

React application on Safari throws SyntaxError: Invalid regular expression: invalid group specifier name

I've just updated some depencencies in a React project using npm install and the updated project works nicely on all browser except Safari.
On Safari it shows a blanks screen and an error in the console:
SyntaxError: Invalid regular expression: invalid group specifier name
file: 2.f80ba52b.chunk.js
I can exclude breaking changes from updated dependencies, otherwise it would have broken on other browsers too. Despite that, I cannot figure out what is causing it.
Even if similar questions exist, and the root cause has been already recognized as the missing Safari support for lookbehind regex, I would like to provide a general way to handle those situations where, as described in the main question, you can not just fix a line of code - for example when the issue is caused by an external library.
How to handle broken external depencencies
In my case, the bug had been introduced with draft-js-utils 1.4.1, so I solved it downgrading to the first know working version (1.4.0). In order to achieve this, I edited the package.json file changing the dependency line from
"draft-js-utils": "^1.4.0"
to
"draft-js-utils": "1.4.0"
TIP: Avoiding the caret range, you can stick it to a specific version.
How to find broken external depencencies
The only way to find out what dependencies have been affected by this bug is to look for the error message in Github/Gitlab search - currently almost 300 public repositories have a related issue opened.
The hardest thing about this bug is that it could be hidden inside transitive dependencies.
You might not even know you are using that package.
If you are not lucky enough to spot it using a Github/Gitlab search, you could try with a local search using your IDE or grep. You need to look for the lookbehind symbols ?<!:
grep -r "?<\!" node_modules
Being a last resort, this approach could be either very slow or produce a huge-and-hard-to-read output.
A sad note
It looks like Webkit developers are not going to add lookbehind regex support soon - the issue has been created in July 2017 without receiving attention from them. Moreover, even if the Safari's issue has been recognized and tracked, no polyfill exists to fix it at the build level (e.g. using Babel).
I just want to add that I spent a week downgrading Babel and other packages to pre-2018 packages, only to realise that my problem was in a helper function within my own code that was to filter for malicious html code.
#lifeisfoo mentions to grep for the string '?<!' above in node_modules, but i recommend also grepping the entire project.
fyi, my regex that was breaking Safari was '?<=!'. Which is also an unsupported lookbehind
I tested my regex: (?<=![)(.*?)(?=]) in Safaris regex tester https://www.regextester.com/ and the output says 'Lookbehind is not supported in Javascript'
To end, I found Safaris console error message worthless and spread around the 10,000s of lines of the bundle.js, giving the impression that the issue was within the packages/dependancies, which it clearly was not.
I spent ages downgrading the packages only to find the same error message appear on a different line of the bundle.js code.

Error: Property left of ForInStatement is null?

yesterday I was able to create my react babylon app with react-scripts. After updating babylon to 4.1.0 I receive the following error:
./node_modules/babylonjs/babylon.js TypeError:
/git/proconf_sa/node_modules/babylonjs/babylon.js: Property left of ForInStatement expected node to be of a type [“VariableDeclaration”,“LVal”] but instead got null
Any idea what the problem could be? I updated from version 3.1.0-alpha3.7.
Thanks.
I was facing the same problem, however using Angular. I resolved by removing a package that uses svg.js#2.7.1 !!! From what you discover, this error is caused by the discontinued version of svg.js#2.7.1 !!! Look inside your application that there is a package using this and remove it!
If using apexcharts update it, because it depends on svg.js!
(NOTE: Sorry for possible errors in my writing, I'm Brazilian, I'm having to use Google translator to write this)

Permanently resolve Unable to watch for file changes in this large workspace

To resolve this issue I got there to the link provided by vscode
https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc
Ok, this, corrects the error, But when I restart the Linux and again open my React project,
I get the Same error.
max_user_watches file again gets the value of 8192 as no. of max files.
My react server is not starting due to this issue.
Then I again follow the same step of the link provided, this sometimes gets frustrating.
Any permanent Help I could get from you.
A workaround:
Just disable this built-in extension: TypeScript and JavaScript Language Features

Karma Istanbul fix to work with new version of Chrome

In my AngularJs application I'm using Jasmine and Karma for my unit tests.
Recently, after a chrome update (now on 72.0.3626.81) my unit tests starting failing locally (with no change to code). I believe the error is a result of my coverage tool Instanbul.
Sometimes the error appears like this:
An error was thrown in afterAll Uncaught ReferenceError: __cov_iuQO6FdumXRPLjSMopb0JQ is not defined thrown
Other times it will appear within a specific unit test (not sure why).
I searched my application and the only file this __cov_ variable could come from is the return of a function within the Instanbul package, generateTrackerVar() within instrumenter.js.
As no code changes were made I assume that the issue is with the new version of Chrome, perhaps the security settings.
My question what permissions would karama-coverage/istanbul require? OR if anyone suspects the issue isn't security based, then what could be causing this error?
Thanks
EDIT:
I have tried to disable web security in my gulpfile like so:
browsers: [ 'Chrome_without_security' ],
customLaunchers: {
Chrome_without_security: {
base: 'Chrome',
flags: ['--disable-web-security']
}
},
But this didn't solve the issue. Is there a way to set the chrome version in this config?
I managed to solve this by figuring out the hashcode after __cov_ was related to a test file that was throwing an error. I don't know why the error didn't just appear as it normally would, that will be another problem to solve.
For now I managed to figure out the file by logging in instrumenter.js within the instanbul package. Then by removing my coverage tool I figured out the source of the issue. Simply removing the coverage tool would give me a different error but not tell me which file so I needed to do both.

'Uncaught TypeError: angular.module(...).run(...) is not a function' in Grunt minified js-file

My code works on development mode, uncompressed. But when I use grunt's minify functionality and run the app in production mode, I get that error: Uncaught TypeError: angular.module(...).run(...) is not a function.
When I look into the error in Google Chrome Developer Tools, I get what you see in the screenshot. Does anybody understand where the problem is?
I am using Angular 1.4+ in Angular-Fullstack. The error occurs in vendor.{{randomstring}}.js.
Thanks for any support!
You have 2 issues here.
Dependency injection. You can edit manually the archives or use https://github.com/mgol/grunt-ng-annotate this will do this automagically for you.
Concatenation. Check this grunt plugin https://github.com/gruntjs/grunt-contrib-concat the issue here is javascript dont understand when a function end/start because dont have a separation mark, check where the error is.
})(function(a,b) {
It should be:
});(function(a,b) {
Check the "Concatenating with a custom separator" example of grunt-contrib-concat

Resources