When loading a qooxdoo application in source mode, I obtain the following chain of javascript errors:
qx.Class is undefined
[Break on this error] qx.Class.define("qx.lang.Object",
Object.js (ligne 24)
qx.Class is undefined
[Break on this error] qx.Class.define("qx.lang.Type",
Type.js (ligne 23)
qx.lang is undefined
[Break on this error] errorToString : qx.lang.Object.select(
Core.js (ligne 61)
qx.core.Property is undefined
[Break on this error] qx.core.Property.attach(clazz);
Class.js (ligne 1478)
qx.lang.Type is undefined
[Break on this error] (qx.lang.Type.isObject(value) || typeof value === "object");
Assert.js (ligne 632)
qx.lang.Type is undefined
[Break on this error] qx.lang.Type.isFunction(value) || this.__fail(
Assert.js (ligne 504)
qx.lang.Type is undefined
[Break on this error] qx.lang.Type.isFunction(value) || this.__fail(
Assert.js (ligne 504)
qx.lang.Type is undefined
[Break on this error] qx.lang.Type.isFunction(value) || this.__fail(
Assert.js (ligne 504)
qx.log.Logger is undefined
[Break on this error] qx.log.Logger.register(statics);
Native.js (ligne 119)
qx.lang.Type is undefined
[Break on this error] (qx.lang.Type.isObject(value) || typeof value === "object");
Assert.js (ligne 632)
qx.lang.Object is undefined
[Break on this error] statics.FROM_CHARCODE = qx.lang.Object.invert(statics.TO_CHARCODE)
String.js (ligne 447)
qx.lang.Type is undefined
[Break on this error] qx.lang.Type.isString(value) || this.__fail(
Assert.js (ligne 518)
qx.lang.Core is undefined
[Break on this error] Stack.prototype.indexOf = qx.lang.Core.arrayIndexOf;
BaseArray.js (ligne 496)
qx.log.Logger is undefined
[Break on this error] qx.log.Logger.deprecatedConstantWarning(
ITableModel.js (ligne 268)
qx.locale.Date is undefined
[Break on this error] MONTH_YEAR_FORMAT : qx.locale.Date...teTimeFormat("yyyyMMMM", "MMMM yyyy")
DateChooser.js (ligne 111)
Note that those errors have been obtained with Qooxdoo 1.0 and 1.0.1, Firefox 3.6 and Firebug 1.5.2.
I tested with Internet Explorer and I obtain the same kind of javascript errors.
From my understanding, it seems that the js files are not loaded / evaluated in the right order.
Below is the order in which the js files are loaded:
index.html
ria.js
RemoteProxy.js
engine.js
util.js
Bootstrap.js
Setting.js
Engine.js
__System.pageLoaded.dwr
Variant.js
Object.js
Type.js
Aspect.js
Class.js
In build mode, everything works as expected.
It seems to me that the JS files are not loaded at all. Can you please check at the "Net" tab of Firebug if the files are loaded correctly.
The main difference between "source" and "build" version is the loading of the JS files. The "source" version does load every JS file/class separately to support easy debugging. The "build" version does combine all necessary classes to one JS file.
So maybe only the path to the framework is not accessible by your web server. Just a guess.
I finaly found out where the problem come from.
For a reason I don't understand clearly, eclipse would mix up the classes from v1.0 and v1.0.1. And because the way the classes are defined changed between both versions (v1.0 use qx.Bootstrap.define and v1.0.1 use qx.Class.define), it is not compatible.
Anyway, now it is working and I will be able to play around :)
Related
Getting error - TypeError: Cannot read property 'length' of undefined in Truncate.js
<Truncate lines={1} onTruncate={this.handleTruncate} > {value} </Truncate>
I am building storybook. When trying to load the resulting files, I get this error.
manager.43f5b3475a944261b3fa.bundle.js:formatted:19449 Uncaught (in promise) TypeError: Cannot read property 'children' of undefined
at resolveStyles (manager.43f5b3475a944261b3fa.bundle.js:formatted:19449)
at RadiumEnhancer.render (manager.43f5b3475a944261b3fa.bundle.js:formatted:19191)
at callMethod (manager.43f5b3475a944261b3fa.bundle.js:formatted:409)
at RadiumEnhancer.render (manager.43f5b3475a944261b3fa.bundle.js:formatted:414)
at renderComponent (manager.43f5b3475a944261b3fa.bundle.js:formatted:821)
at setComponentProps (manager.43f5b3475a944261b3fa.bundle.js:formatted:805)
at buildComponentFromVNode (manager.43f5b3475a944261b3fa.bundle.js:formatted:686)
at idiff (manager.43f5b3475a944261b3fa.bundle.js:formatted:691)
at innerDiffNode (manager.43f5b3475a944261b3fa.bundle.js:formatted:743)
at idiff (manager.43f5b3475a944261b3fa.bundle.js:formatted:753)
I am testing nodejs API and I included file in karma.config.js
I got the following error: Require not defined.
Then as per the suggestions given in other posts I added browserify to that file, but now I am getting different error.
` files: [
'poc/app/api.js', // file where there is require statements
'tests/sample.test.js' // my test file
],
preprocessors: {
'poc/app/api.js':['browserify']
},`
Uncaught TypeError: Cannot read property 'prototype' of undefined
Please let me know how to resolve this.
Uncaught TypeError: Cannot read property 'prototype' of undefined
This error should also include a file name and line number. Since you didn't include that information or the source code, the only advice that can be given here is to check that line of that file, see what can be undefined, track how it got there, where it should be defined but is not and fix the problems that responsible for that.
I am working on porting a pure c project onto android 5.1.1 API 22. The original project has Android.mk, which works fine. I followed the guild to port, but the newly created project is unable to correctly link the library libelf. I created a new module, trying to link libelf by using gradle. here is the gradle file:
apply plugin: 'com.android.library'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
minSdkVersion 22
targetSdkVersion 22
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
ndkBuild {
path '../MyProject/Android.mk'
}
}
} // android
// The dependencies block is a part of the standard Gradle configuration (that is why it is placed outside of the android block)
// and defines all dependencies for an app or library. By default, a new Android app has a dependency on all the JAR files in
// the libs directory. Depending on the options you select in the new project wizard,
// it might also depend on the AppCompat library.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
testCompile 'junit:junit:4.12'
}
In the AOSP, I can see the header file is in: external/elfutils/0.153/libelf
Anyone knows the correct way to add the library libelf dependency in the gradle?
Here are the errors I got:
Error:(43) undefined reference to `elf_version'
Error:(54) undefined reference to `elf_begin'
Error:(60) undefined reference to `elf_kind'
Error:(64) undefined reference to `elf_getshdrstrndx'
Error:(65) undefined reference to `elf_errno'
Error:(65) undefined reference to `elf_errmsg'
Error:(56) undefined reference to `elf_errno'
Error:(56) undefined reference to `elf_errmsg'
Error:(117) undefined reference to `elf_end'
Error:(71) undefined reference to `elf_nextscn'
Error:(83) undefined reference to `elf64_getshdr'
Error:(90) undefined reference to `elf_strptr'
Error:(97) undefined reference to `elf_getdata'
Error:(85) undefined reference to `elf_errno'
Error:(85) undefined reference to `elf_errmsg'
Error:(92) undefined reference to `elf_errno'
Error:(92) undefined reference to `elf_errmsg'
Error:(99) undefined reference to `elf_errno'
Error:(99) undefined reference to `elf_errmsg'
Error:error: linker command failed with exit code 1 (use -v to see invocation)
Build environment:
System:Ubuntu 16.04: LTS
Android Studio version: 2.2.2
Android Plugin version: 2.2.2
Gradle version: 2.14.1
Target android info:
Android version: 5.1.1
API level: 22
Thanks for your help,
I get this error whenever I load the page I am building. Everything worked fine until I copied the angular-ui-bootstrap js file. I have not changed anything from the file.
angular.module('ui.bootstrap.datepicker').run(function() {
!angular.$$csp().noInlineStyle && angular.element(document).find('head').prepend('<style type="text/css">.uib- datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-datepicker-popup.dropdown-menu{display:block;}.uib-button-bar{padding:10px 9px 2px;}</style>');});
This is the portion of code where it has a missing } but that is not the case as I can see. I am running AngularJS 1.4.9 and Bootstrap 3.3.2.
Any ideas?
update: When I change to Angular 1.4.0 I get
$q.resolve is not a function error
full error
TypeError: $q.resolve is not a function
at http://localhost:8080/build/js/all-136a0f7ece.js:46792:32
at Object.forEach (http://localhost:8080/build/js/all-136a0f7ece.js:350:20)
at Object.resolve (http://localhost:8080/build/js/all-136a0f7ece.js:46790:19)
at Object.$modal.open (http://localhost:8080/build/js/all-136a0f7ece.js:47357:69)
at Scope.$scope.open (http://localhost:8080/build/js/all-136a0f7ece.js:46443:35)
at fn (eval at <anonymous> (http://localhost:8080/build/js/all-136a0f7ece.js:13036:15), <anonymous>:4:203)
at callback (http://localhost:8080/build/js/all-136a0f7ece.js:23090:17)
at Scope.$eval (http://localhost:8080/build/js/all-136a0f7ece.js:15719:28)
at Scope.$apply (http://localhost:8080/build/js/all-136a0f7ece.js:15818:23)
at HTMLAnchorElement.<anonymous> (http://localhost:8080/build/js/all-136a0f7ece.js:23095:23)