BPM SDK Angular Taskservice Problems

Hi,

I’m having an error using the camunda-bpm-sdk-angular.js. In my little Angular application I load all usertasks with

taskService.list({}, function(error, results) {
  $scope.tasks = results._embedded.task;
});

The call to the REST API is successful as I can see in the Firefox developer tool. Nevertheless there is an error thrown from the camunda-bpm-sdk-angular.js:

TypeError: str.slice is not a function
isId()
camunda-bpm-sdk-angular.js:6004
keys()
camunda-bpm-sdk-angular.js:6015
[41]</utils.solveHALEmbedded()
camunda-bpm-sdk-angular.js:6030
end/<()
camunda-bpm-sdk-angular.js:564
[48]</Request.prototype.callback()
camunda-bpm-sdk-angular.js:10402
Request/<()
camunda-bpm-sdk-angular.js:10046
[49]</Emitter.prototype.emit()
camunda-bpm-sdk-angular.js:10838
[48]</Request.prototype.end/xhr.onreadystatechange()

I succeed to load the tasks on my own by using Angular $http but then there is another error when I try to load the form with taskService.form with a selected taskId after the form-variables are loaded with the REST API (done by the taskService):

TypeError: this.fields[i].applyValue is not a function
[32]</CamundaForm.prototype.applyVariables()
camunda-bpm-sdk-angular.js:5330
[32]</CamundaForm.prototype.initializeForm/<()
camunda-bpm-sdk-angular.js:4904
end/<()
camunda-bpm-sdk-angular.js:568
[48]</Request.prototype.callback()
camunda-bpm-sdk-angular.js:10402
Request/<()
camunda-bpm-sdk-angular.js:10046
[49]</Emitter.prototype.emit()
camunda-bpm-sdk-angular.js:10838
[48]</Request.prototype.end/xhr.onreadystatechange()

The response delivered by the /engine/myEngine/task/{taskId}/form-variables is

{"variableFoo":{"type":"String","value":"valueBar","valueInfo":{}}}

I use Camunda 7.5.0 and downloaded the bpm-sdk-angular 7.5.8

Does anyone have experience with this kind of errors?

Chris

As I found out there is a problem with the iteration of arrays in the code using the for...in loop.
The posted errors occurs because the script tries to iterate not only the elements of an array, but also the prototype functions.

The sdk-angular example from github works fine on the REST-API of my application.

This means, I could probably have a problem in the javascript stack of my client application.

When I rewrite the camunda-bpm-sdk-angular.js to use the

myArray.forEach(function(current){

}) ;

instead of

for(var a in myArray) {

}

I can manage to use the taskService provided by the SDK.

Any ideas on how to solve the problem without rewriting the SDK lib?

Now I am completely sure that the array which is to be iterated has a load of custom added prototype functions - I belive from another external javascript library(/-ies).
According to the for...in documentation, all custom functions/properties of an object are iterated.

I am working on a project which has already seen a lot of different developers and I have to find out which library is adding the (at least for me) unwanted features.