surveyjs / surveyjs-nodejs

This demo shows how to integrate SurveyJS components with a NodeJS backend.
https://surveyjs-nodejs.azurewebsites.net
Other
146 stars 93 forks source link

SurveyJS 1.0.17 breaks this repository #4

Closed cphamlet closed 6 years ago

cphamlet commented 6 years ago

Are you requesting a feature, reporting a bug or ask a question?

Reporting a bug.

What is the current behavior?

When visiting the edit tab for any of the surveys, knockout.js breaks. As a result, surveys can no longer be edited or saved.

Provide the test code and the tested page URL (if applicable)

Tested page URL:

http://localhost:3000/editor.html?id=Product%20feedback%20survey&name=Product%20feedback%20survey

Stack trace on editor.html:

knockout-debug.js:3351 Uncaught TypeError: Unable to process binding "template: function (){return { name:'objecteditorproperty',afterRender:$parent.koAfterRender} }"
Message: Unable to process binding "click: function (){return $parent.changeActiveProperty($data) }"
Message: Illegal invocation
    at exports.setTimeout (main.js:7)
    at SurveyDropdownPropertyEditor.SurveyPropertyEditorBase.activate (propertyEditorBase.ts:273)
    at SurveyObjectProperty.set [as isActive] (objectProperty.ts:65)
    at ko.subscription.callback (objectEditor.ts:41)
    at Function.notifySubscribers (knockout-debug.js:1320)
    at Function.valueHasMutated (knockout-debug.js:1529)
    at SurveyObjectEditor.observable [as koActiveProperty] (knockout-debug.js:1495)
    at SurveyObjectEditor.changeActiveProperty (objectEditor.ts:69)
    at click (eval at createBindingsStringEvaluator (knockout-debug.js:2952), <anonymous>:3:73)
    at newValueAccessor (knockout-debug.js:4191)
exports.setTimeout @ main.js:7
SurveyPropertyEditorBase.activate @ propertyEditorBase.ts:273
set @ objectProperty.ts:65
(anonymous) @ objectEditor.ts:41
notifySubscribers @ knockout-debug.js:1320
valueHasMutated @ knockout-debug.js:1529
observable @ knockout-debug.js:1495
SurveyObjectEditor.changeActiveProperty @ objectEditor.ts:69
click @ VM353:3
newValueAccessor @ knockout-debug.js:4191
init @ knockout-debug.js:4201
init @ knockout-debug.js:4194
(anonymous) @ knockout-debug.js:3328
ignore @ knockout-debug.js:1461
(anonymous) @ knockout-debug.js:3327
arrayForEach @ knockout-debug.js:159
applyBindingsToNodeInternal @ knockout-debug.js:3313
applyBindingsToNodeAndDescendantsInternal @ knockout-debug.js:3193
ko.applyBindings @ knockout-debug.js:3404
(anonymous) @ knockout-debug.js:5263
invokeForEachNodeInContinuousRange @ knockout-debug.js:5214
activateBindingsOnContinuousNodeArray @ knockout-debug.js:5261
executeTemplate @ knockout-debug.js:5309
ko.dependentObservable.disposeWhen @ knockout-debug.js:5351
evaluateImmediate_CallReadThenEndDependencyDetection @ knockout-debug.js:2156
evaluateImmediate_CallReadWithDependencyDetection @ knockout-debug.js:2123
evaluateImmediate @ knockout-debug.js:2084
ko.computed.ko.dependentObservable @ knockout-debug.js:1944
ko.renderTemplate @ knockout-debug.js:5343
update @ knockout-debug.js:5478
ko.dependentObservable.disposeWhenNodeIsRemoved @ knockout-debug.js:3343
evaluateImmediate_CallReadThenEndDependencyDetection @ knockout-debug.js:2156
evaluateImmediate_CallReadWithDependencyDetection @ knockout-debug.js:2123
evaluateImmediate @ knockout-debug.js:2084
ko.computed.ko.dependentObservable @ knockout-debug.js:1944
(anonymous) @ knockout-debug.js:3341
arrayForEach @ knockout-debug.js:159
applyBindingsToNodeInternal @ knockout-debug.js:3313
applyBindingsToNodeAndDescendantsInternal @ knockout-debug.js:3193
ko.applyBindings @ knockout-debug.js:3404
(anonymous) @ knockout-debug.js:5263
invokeForEachNodeInContinuousRange @ knockout-debug.js:5214
activateBindingsOnContinuousNodeArray @ knockout-debug.js:5261
activateBindingsCallback @ knockout-debug.js:5387
ko.utils.setDomNodeChildrenFromArrayMapping @ knockout-debug.js:5757
ignore @ knockout-debug.js:1461
ko.dependentObservable.disposeWhenNodeIsRemoved @ knockout-debug.js:5408
evaluateImmediate_CallReadThenEndDependencyDetection @ knockout-debug.js:2156
evaluateImmediate_CallReadWithDependencyDetection @ knockout-debug.js:2123
evaluateImmediate @ knockout-debug.js:2084
evaluatePossiblyAsync @ knockout-debug.js:2049
notifySubscribers @ knockout-debug.js:1320
valueHasMutated @ knockout-debug.js:1529
observable @ knockout-debug.js:1495
SurveyObjectEditor.updateProperties @ objectEditor.ts:134
set @ objectEditor.ts:58
SurveyEditor.selectedObjectChanged @ editor.ts:1154
(anonymous) @ editor.ts:466
notifySubscribers @ knockout-debug.js:1320
valueHasMutated @ knockout-debug.js:1529
observable @ knockout-debug.js:1495
writeValueToProperty @ knockout-debug.js:2665
valueUpdateHandler @ knockout-debug.js:4850
dispatch @ jquery.js:4435
r.handle @ jquery.js:4121
trigger @ jquery.js:4350
(anonymous) @ jquery.js:4901
each @ jquery.js:374
each @ jquery.js:139
trigger @ jquery.js:4900
triggerEvent @ knockout-debug.js:456
(anonymous) @ knockout-debug.js:4543
ignore @ knockout-debug.js:1461
update @ knockout-debug.js:4520
ko.dependentObservable.disposeWhenNodeIsRemoved @ knockout-debug.js:3343
evaluateImmediate_CallReadThenEndDependencyDetection @ knockout-debug.js:2156
evaluateImmediate_CallReadWithDependencyDetection @ knockout-debug.js:2123
evaluateImmediate @ knockout-debug.js:2084
evaluatePossiblyAsync @ knockout-debug.js:2049
notifySubscribers @ knockout-debug.js:1320
valueHasMutated @ knockout-debug.js:1529
observable @ knockout-debug.js:1495
SurveyObjects.rebuild @ surveyObjects.ts:147
set @ surveyObjects.ts:23
SurveyEditor.initSurvey @ editor.ts:1405
SurveyEditor.applyBinding @ editor.ts:1207
SurveyEditor.render @ editor.ts:789
SurveyEditor @ editor.ts:586
(anonymous) @ editor.js:51

Specify your

Thank you all again for making a great product. I would attempt a PR on this myself, but it looks like this break occurs deep in the library code. Hopefully I am mistaken. For future references, if there a webpage describing the changes between versions? Would be interested in keeping tabs on it.

tsv2013 commented 6 years ago

Looks like this Use global this instead of window is a cause of the problem. Current build with the latest version works ok. @andrewtelnov We need to rollout a technical release.

dmitry-kurmanov commented 6 years ago

we've released new 1.0.18 it is ok now

mohammed-gaber-ramadan commented 6 years ago

can you give me the link for version 1.0.18

dmitry-kurmanov commented 6 years ago

@i-waves hello! https://www.npmjs.com/package/surveyjs-editor https://surveyjs.azureedge.net/1.0.18/surveyeditor.js

cphamlet commented 6 years ago

Excellent speed, you guys are awesome. Is there a public change log?

tsv2013 commented 6 years ago

@cphamlet what do you mean? We have auto-generated change logs here and here If you are asking about how we have fixed this issue, then this - https://github.com/browserify/timers-browserify/pull/35 - causes this problem and we just rebuild our packages

cphamlet commented 6 years ago

Those are what I mean. Thanks