tradingview / charting-library-examples

Examples of Charting Library integrations with other libraries, frameworks and data transports
MIT License
1.4k stars 763 forks source link

Unhandled Rejection (TypeError): t._innerWindow(...).widgetReady is not a function #178

Closed AlokPundir closed 4 years ago

AlokPundir commented 4 years ago

Bug report

Unhandled Rejection (TypeError): t._innerWindow(...).widgetReady is not a function (anonymous function) src/charting_library/charting_library.min.js:232 229 | i.addEventListener("load", e, !1); 230 | })), 231 | this._innerWindowLoaded.then(function () {

232 | t._innerWindow().widgetReady(function () { | ^ 233 | t._ready = !0; 234 | for (var e = 0, o = t._readyHandlers; e < o.length; e++) { 235 | var i = o[e];

mmoshnogorskaia commented 4 years ago

Duplicate of https://github.com/tradingview/charting_library/issues/5085

timocov commented 3 years ago

this link does not work.

@daisai3 do you have an access to charting_library?

manfulMr commented 3 years ago

这个报错该如何处理啊?

OluAgunloye commented 3 years ago

@timocov , yesterday I debugged the code line by line and noticed that it was an issue of version and configuration issue. I added charting_library in correct version both on /public folder and /src folders and finally I could see the charts on my side. :)

How did you get around this? What versions did you have to use ?

manfulMr commented 3 years ago

I use TradingView version 19, which version do you use, but I made a mistake when I introduced it in the first step. I can't find the reason. Could you help me analyze the reason? thank you very much.

------------------ 原始邮件 ------------------ 发件人: "tradingview/charting-library-examples" @.>; 发送时间: 2021年8月24日(星期二) 上午9:18 @.>; @.**@.>; 主题: Re: [tradingview/charting-library-examples] Unhandled Rejection (TypeError): t._innerWindow(...).widgetReady is not a function (#178)

@timocov , yesterday I debugged the code line by line and noticed that it was an issue of version and configuration issue. I added charting_library in correct version both on /public folder and /src folders and finally I could see the charts on my side. :)

How did you get around this? What versions did you have to use ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

devpool-company commented 2 years ago

I faced the same error: "n._innerWindow().widgetReady is not a function". In my case it was because of Cloudflare (where I hosted the app) and it's option "Rocket Loader". Rocket Loader feature of Cloudflare wraps content of the html file, that is loaded by TV iFrame. The iFrame wasn't properly loaded, thus the needed functions on this iFrame were missing.

Once I disabled "Rocket Loader" in Cloudflare dashboard, I was needed just to clear browser's cache.

That's how you can tell, that's your case:

image