Page 1 of 1

Uncaught TypeErrors

Posted: Wed Jun 24, 2020 9:10 am
by csrt
Hello. I've been using the Stimulsoft Reports version 2020.2.3, which worked fine.
But after upgrading to 2020.3.2 I'm getting a bunch of errors:

Code: Select all

stimulsoft.reports.js:15 Uncaught TypeError: Cannot convert object to primitive value
    at stimulsoft.reports.js:15
    at stimulsoft.reports.js:15
    at t (stimulsoft.reports.js:15)
    at stimulsoft.reports.js:15
    at stimulsoft.reports.js:15
    at stimulsoft.reports.js:15
(anonymous) @ stimulsoft.reports.js:15
(anonymous) @ stimulsoft.reports.js:15
t @ stimulsoft.reports.js:15
(anonymous) @ stimulsoft.reports.js:15
(anonymous) @ stimulsoft.reports.js:15
(anonymous) @ stimulsoft.reports.js:15
stimulsoft.viewer.js:11 Uncaught TypeError: Cannot read property 'Enum' of undefined
    at stimulsoft.viewer.js:11
    at stimulsoft.viewer.js:11
(anonymous) @ stimulsoft.viewer.js:11
(anonymous) @ stimulsoft.viewer.js:11
angular.js:14199 TypeError: Cannot read property 'StiLicense' of undefined
    at data.services.js:714
    at angular.js:19942
    at f (angular.js:6045)
    at angular.js:6324


What have changed since 2020.2.3 that have drastically changed the behavior of scrips, and how to fix all this stuff?
Thank you in advance.

Re: Uncaught TypeErrors

Posted: Thu Jun 25, 2020 8:38 am
by Lech Kulikowski
Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.

Re: Uncaught TypeErrors

Posted: Thu Jun 25, 2020 3:14 pm
by a.delbrocco@swen.it
I have the same problem, we use nodejs and typescript
i'll try to remove some other component but then i have other problems loading fonts.

TypeError: Cannot read property 'filesPath' of undefined
at Function.Z.addOpentypeFont (\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:44:255939)
at Function.Z.addOpentypeFontFile (\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:44:256359)
at Function.o.addOpentypeFontFile (\node_modules\stimulsoft-reports-js\Scripts\stimulsoft.reports.js:48:118607)
at BilancioController.<anonymous> (\src\modules\bilancio\bilancio.controller.ts:1774:38)

I'll try to reproduce this issue with a sample but i'm not able to reproduce with a small project.

Re: Uncaught TypeErrors

Posted: Fri Jun 26, 2020 9:25 am
by Lech Kulikowski
Hello,

Unfortunately, we can not say something about the issue without a sample. Sorry.

Thank you.

Re: Uncaught TypeErrors

Posted: Mon Jun 29, 2020 10:19 am
by csrt
Hello. My problem was caused by conflicts with this library https://github.com/schmich/instascan, specifically I think it's because this kind of constructions:

Code: Select all

var DEFINE_PROPERTY = "defineProperty";
function define(O, key, value) {
  O[key] || Object[DEFINE_PROPERTY](O, key, {
    writable: true,
    configurable: true,
    value: value
  });
}

define(String.prototype, "padLeft", "".padStart);
define(String.prototype, "padRight", "".padEnd);

"pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (key) {
  [][key] && define(Array, key, Function.call.bind([][key]));
});
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
..and so on.

For me worked to load Stimulsoft scripts first, but I want to stress that version 2.3 did not have such issues.

Re: Uncaught TypeErrors

Posted: Tue Jun 30, 2020 10:25 am
by Lech Kulikowski
Hello,

We need some additional time to investigate the issue, we will let you know about the result.

Thank you.
#2338

Re: Uncaught TypeErrors

Posted: Mon Jul 06, 2020 6:45 am
by Lech Kulikowski
Hello,

Unfortunately, we can not say something about the issue without a sample. Sorry.
Please send us a sample project that reproduces the issue for analysis.

Thank you.