Uncaught TypeErrors

Stimulsoft Reports.JS discussion
Post Reply
csrt
Posts: 49
Joined: Thu Jan 17, 2019 12:38 pm

Uncaught TypeErrors

Post 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.
Attachments
errs.png
errs.png (18.89 KiB) Viewed 2504 times
Lech Kulikowski
Posts: 6240
Joined: Tue Mar 20, 2018 5:34 am

Re: Uncaught TypeErrors

Post by Lech Kulikowski »

Hello,

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

Thank you.
a.delbrocco@swen.it
Posts: 4
Joined: Sat May 18, 2019 5:17 am

Re: Uncaught TypeErrors

Post 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.
Lech Kulikowski
Posts: 6240
Joined: Tue Mar 20, 2018 5:34 am

Re: Uncaught TypeErrors

Post by Lech Kulikowski »

Hello,

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

Thank you.
csrt
Posts: 49
Joined: Thu Jan 17, 2019 12:38 pm

Re: Uncaught TypeErrors

Post 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.
Lech Kulikowski
Posts: 6240
Joined: Tue Mar 20, 2018 5:34 am

Re: Uncaught TypeErrors

Post by Lech Kulikowski »

Hello,

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

Thank you.
#2338
Lech Kulikowski
Posts: 6240
Joined: Tue Mar 20, 2018 5:34 am

Re: Uncaught TypeErrors

Post 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.
Post Reply