Is anyone else experiancing a Syncfusion Pivot Grid remote data error? - google-chrome

Typescript Version: 3.2.4
Angular version: ^7.2.15
Syncfusion Version: 17.1.50
Hi all. I am having an issue with Syncfusion's Pivot Grid. The code below is my onInit method which is taken straight from their demo. This was working as of 17.1.41 but now has magically stopped working. This issue is also on their StackBlitz example.
ngOnInit() {
let data: DataManager;
data = new DataManager({
url: this._controllerUrl + "/billing/extract",
adaptor: new WebApiAdaptor(),
crossDomain: true,
headers: [
{
"Content-Type": "application/json",
Accept: "application/json",
Authorization: "Bearer " + this.token
}
]
});
this.dataSource = {
enableSorting: true,
columns: [{ name: "Year" }, { name: "Month" }],
values: [{ name: "Cost", caption: "Cost (GBP)" }],
data: data,
rows: [{ name: "ServiceId" }],
formatSettings: [],
expandAll: false,
filters: []
};
this.button = new Button({ isPrimary: true });
this.button.appendTo("#export");
this.button.element.onclick = (): void => {
this.pivotGridObj.excelExport();
};
}
Here is the full error in Firefox:
ERROR Error: "Uncaught (in promise): TypeError: this.parent.dataSource.values is undefined
./node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/axis-field-renderer.js/AxisFields.prototype.createPivotButtons#http://localhost:4200/views-billing-billing-module.js:197167:17
./node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/axis-field-renderer.js/AxisFields.prototype.render#http://localhost:4200/views-billing-billing-module.js:197143:14
./node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/grouping-bar.js/GroupingBar.prototype.appendToElement#http://localhost:4200/views-billing-billing-module.js:197347:49
./node_modules/#syncfusion/ej2-base/src/observer.js/Observer.prototype.notify#http://localhost:4200/views-billing-billing-module.js:10781:25
./node_modules/#syncfusion/ej2-base/src/component.js/Component.prototype.notify#http://localhost:4200/views-billing-billing-module.js:5505:32
./node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js/PivotView.prototype.renderPivotGrid#http://localhost:4200/views-billing-billing-module.js:204990:18
./node_modules/#syncfusion/ej2-base/src/observer.js/Observer.prototype.notify#http://localhost:4200/views-billing-billing-module.js:10781:25
./node_modules/#syncfusion/ej2-base/src/component.js/Component.prototype.notify#http://localhost:4200/views-billing-billing-module.js:5505:32
./node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js/PivotView.prototype.initEngine#http://localhost:4200/views-billing-billing-module.js:206000:14
./node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js/PivotView.prototype.executeQuery#http://localhost:4200/views-billing-billing-module.js:206047:14
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke#http://localhost:4200/polyfills.js:7688:26
onInvoke#http://localhost:4200/vendor.js:82616:33
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invoke#http://localhost:4200/polyfills.js:7687:52
./node_modules/zone.js/dist/zone.js/</Zone.prototype.run#http://localhost:4200/polyfills.js:7447:43
scheduleResolveOrReject/<#http://localhost:4200/polyfills.js:8186:34
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invokeTask#http://localhost:4200/polyfills.js:7720:31
onInvokeTask#http://localhost:4200/vendor.js:82607:33
./node_modules/zone.js/dist/zone.js/</ZoneDelegate.prototype.invokeTask#http://localhost:4200/polyfills.js:7719:60
./node_modules/zone.js/dist/zone.js/</Zone.prototype.runTask#http://localhost:4200/polyfills.js:7492:47
drainMicroTaskQueue#http://localhost:4200/polyfills.js:7898:35
./node_modules/zone.js/dist/zone.js/</ZoneTask.invokeTask#http://localhost:4200/polyfills.js:7799:21
invokeTask#http://localhost:4200/polyfills.js:9041:14
globalZoneAwareCallback#http://localhost:4200/polyfills.js:9067:17
Here is the full error in Chrome/Edge
core.js:15724 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'length' of undefined
TypeError: Cannot read property 'length' of undefined
at AxisFields.push../node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/axis-field-renderer.js.AxisFields.createPivotButtons (axis-field-renderer.js:45)
at AxisFields.push../node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/axis-field-renderer.js.AxisFields.render (axis-field-renderer.js:21)
at GroupingBar.push../node_modules/#syncfusion/ej2-pivotview/src/common/grouping-bar/grouping-bar.js.GroupingBar.appendToElement (grouping-bar.js:142)
at Observer.push../node_modules/#syncfusion/ej2-base/src/observer.js.Observer.notify (observer.js:89)
at PivotViewComponent.push../node_modules/#syncfusion/ej2-base/src/component.js.Component.notify (component.js:188)
at PivotViewComponent.push../node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js.PivotView.renderPivotGrid (pivotview.js:881)
at Observer.push../node_modules/#syncfusion/ej2-base/src/observer.js.Observer.notify (observer.js:89)
at PivotViewComponent.push../node_modules/#syncfusion/ej2-base/src/component.js.Component.notify (component.js:188)
at PivotViewComponent.push../node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js.PivotView.initEngine (pivotview.js:1891)
at PivotViewComponent.push../node_modules/#syncfusion/ej2-pivotview/src/pivotview/base/pivotview.js.PivotView.executeQuery (pivotview.js:1938)
at resolvePromise (zone.js:831)
at zone.js:896
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)
at Object.onInvokeTask (core.js:17290)
at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:422)
at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:195)
at drainMicroTaskQueue (zone.js:601)
at ZoneTask.push../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:502)
at invokeTask (zone.js:1744)
at XMLHttpRequest.globalZoneAwareCallback (zone.js:1770)
The weird thing about this, is that if I use a subset of the data that is coming back from the server and set it locally, it all works.
Here is an image of the request that I am making with the response and the data. I'm not sure if this is something that I can fix as this may be a bug with the DataManager.
I have tried reverting back to the previous version that I used, but there still seems to be the same problem.

We are glad to announce that our Essential Studio 2019 Volume 2 Beta Release version 17.2.0.28 is rolled out with the mentioned issue fix and is available for download under the following link.
https://www.syncfusion.com/forums/145548/essential-studio-2019-volume-2-beta-release-v17-2-0-28-is-available-for-download
Note: This issue fix will be included in our main release as well which is expected to be available by mid of July 2019.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Dinesh Babu Yadav

Related

facing the below issue while setting thoughput in packer json file, need help to resolve this issue

Error:
Template validation failed. Errors are shown below.
Errors validating build 'amazon-ebs'. 1 error(s) occurred:
unknown configuration key: "launch_block_device_mappings[0].throughput"
script returned exit code 1
Code:
"launch_block_device_mappings": [
{
"device_name": "/dev/sda1",
"volume_size": 40,
"volume_type": "gp2",
"volume_size": 80,
"volume_type": "gp3",
"throughput": 270,
"delete_on_termination": true"
I had this issue too and I updated my packer version to 1.6.6 and that worked.

Cannot read property 'runCLI' of undefined in gulp-jest

I am trying to run jest tests with gulp using gulp-jest.
Installed these packages from npm:
"gulp-jest": "^4.0.3",
"jest-cli": "^25.3.0"
and provided the following configuration to jest:
"jest": {
"setupFilesAfterEnv": [
"<rootDir>/jest.setup.js"
],
"collectCoverage": true,
"coverageDirectory": "./test/unit-test-coverage",
"coverageReporters": [
"text",
"lcov"
]
}
I have written a basic method in my gulpfile.js, referred this link:
function runJsTests() {
process.env.NODE_ENV = 'test';
const __dirname = "Features/Components";
return gulp.src(__dirname).pipe(jest({
}));
}
However, I am getting the following error when I run the gulp task:
TypeError: Cannot read property 'runCLI' of undefined
I had the same trouble last friday, to resolve it, I finally had to downgrade version used of jest-cli :
"#types/jest": "24.9.0",
"jest": "24.9.0",
"ts-jest": "24.3.0
"jest-cli": "24.9.0",
"jest-html-reporter": "2.5.0",
A bug known on new version of Jest-cli
-> think to remove all node_modules and package_lock.json!
Good luck ;)

log4js configure function error [NodeJs]

I am getting the following error in console window when running my NodeJs application. I am using log4js for logging. Runtime platform is express.
Error:
undefined:1
?{
^
SyntaxError: Unexpected token ? in JSON at position 0
Code:
var log4js = require('log4js');
var mylog = log4js.configure('log4jsConfig.json');
logger = log4js.getLogger("absolute-logger");
Config json:
{
"appenders": [
{
"type": "file",
"absolute": true,
"filename": "c:/temp/log_file.log",
"maxLogSize": 20480,
"backups": 10,
"category": "absolute-logger"
}
]
}
Question:
Any thoughts. I am thinking this is parsing error, but not sure how to resolve it.
Thanks,
Are you on a windows system? Sometimes, parsers get upset with \r\n (carriage returns). Try converting it UNIX (new line only) style lines.

Gulp Jscs - TypeError: Cannot convert undefined or null to object

I wanted to use gulp-jscs in my project, so I've installed it according the documentation:
npm install --save-dev gulp-jscs
But when I try to run the gulp file, I'm getting this error:
TypeError: Cannot convert undefined or null to object
at Function.keys (native)
at copyConfiguration (C:\Users\[User]\Desktop\[Project]\
node_modules\jscs\lib\config\configuration.js:920:12)
Also, there are other errors related to this:
at NodeConfiguration.Configuration.
_processConfig([location-path]\node_modules\jscs\lib\config\configuration.js:459:5)
at NodeConfiguration.Configuration.load
([location-path]\node_modules\jscs\lib\config\configuration.js:211:10)
at null.StringChecker.configure
([location-path]\node_modules\jscs\lib\string-checker.js:62:29)
at null.Checker.configure ([location-path]\node_modules\jscs\lib\checker.js:27:39)
at Object.module.exports ([location-path]\node_modules\gulp-jscs\index.js:35:10)
at Gulp.<anonymous> ([location-path]\Gulpfile.js:60:17)
at module.exports ([location-path]\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask ([location-path]\node_modules\orchestrator\index.js:273:3)
Process terminated with code 1.
You need to have a .jscsrc file in the root of you project present. In there you can provide options for JSCS as well as the code style rules that should be followed.
Below is the .jscsrc that's used by node-jscs project itself. You can use this to base your own configuration on.
{
"preset": "google",
"fileExtensions": [".js", "jscs"],
"requireSemicolons": true,
"requireParenthesesAroundIIFE": true,
"maximumLineLength": 120,
"validateLineBreaks": "LF",
"validateIndentation": 4,
"disallowTrailingComma": true,
"disallowUnusedParams": true,
"disallowSpacesInsideObjectBrackets": null,
"disallowImplicitTypeConversion": ["string"],
"safeContextKeyword": "_this",
"jsDoc": {
"checkAnnotations": "closurecompiler",
"checkParamNames": true,
"requireParamTypes": true,
"checkRedundantParams": true,
"checkReturnTypes": true,
"checkRedundantReturns": true,
"requireReturnTypes": true,
"checkTypes": "capitalizedNativeCase",
"checkRedundantAccess": true,
"requireNewlineAfterDescription": true
},
"excludeFiles": [
"test/data/**",
"patterns/*"
]
}
Note that jscs won't actually check for anything unless you have a "preset" in your .jscsrc or have explicitly specified the rules that should be followed.

Getting an error in all figway python scripts

I cloned the github project of figway in order to query the attributes of the entities to the orion but i'm getting an error in all python scripts:
File "GetEntity.py", line 37, in <module>
config = ConfigParser.RawConfigParser(allow_no_value=True)
TypeError: __init__() got an unexpected keyword argument 'allow_no_value'
I called it like -> python GetEntity.py Room
Some tips to investigate what is going on:
You should be using Python2.7 to run these scripts. Can you please let me know which version and OS are you using?
We have updated FIGWAY last week. Can you please clone it again if you did it before?
You should be using the new scripts at folder: /python-IDAS4/ContextBroker
With the previous assumptions you should get something like this (as long as that entity does not exist on that ContextBroker at the time being):
i6#raspberrypi ~/github/fiware-figway/python-IDAS4/ContextBroker $ python GetEntity.py Room
* Asking to http://130.206.80.40:1026/ngsi10/queryContext
* Headers: {'Fiware-Service': 'OpenIoT', 'content-type': 'application/json', 'accept': 'application/json', 'X-Auth-Token': 'NULL'}
* Sending PAYLOAD:
{
"entities": [
{
"type": "",
"id": "Room",
"isPattern": "false"
}
],
"attributes": []
}
...
* Status Code: 200
* Response:
{
"errorCode" : {
"code" : "404",
"reasonPhrase" : "No context element found"
}
}