-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getBars method is not getting called. #394
Comments
You would need to provide the version of the library you are currently on along with full logs attached as a text file by enabling then in Widget Constructor (debug: true). |
version is v28.0.0 |
I'm facing an issue where the getBars callback is not being triggered after the resolveSymbol function completes successfully in my TradingView integration. The logs confirm that the symbol is resolved ("Symbol resolved"), but no subsequent logs indicate that getBars is called. Instead, I see a log stating, "Processing pending subscribers, count=2," suggesting that there are pending subscribers but no data is fetched. Structure of resolveSymbol is available in above message and logs attached. I'd appreciate any insights on why getBars isn't being triggered or if there are specific steps I should follow to ensure it executes properly. Thank you! |
Would you be able to record a video of what's happening? Looking at the logs it seems that the library is not requesting any data. Ideally you should see something similar to
|
Recording.2024-09-05.152859.mp4In video, we can see the logs and also the loading of chart. |
@romfrancois, any update on the query raised ? |
@sumanth1462 could you please share your getBars implementation? |
Hi @GeorgiiMatveev-tv , Thanks for reaching out! Here's a quick clarification regarding the getBars implementation: I've attached some snippets from our code that show how we're connecting TradingView from Flutter using an in-app WebView. The snippets follow the execution order: chart_initiate: We load the TradingView HTML within our WebView. Once it loads, Flutter triggers the start handler, where we create the options widget. As you can see, we pass the path, datafeed, and container id here. datafeed_obj: This snippet shows the structure of our datafeed object. I’ve included the implementations of resolveSymbol and getBars. flutter_controller: This controller handles the data request made by the datafeed object. When the datafeed requests it, the controller fetches the necessary data and sends it back. Up until the resolveSymbol part, everything works as expected. However, getBars is supposed to request the range and interval of the needed data, but that step is not happening as intended. @sumanth1462 has included the necessary logs throughout the connection and request process in the previous messages. |
The logs that you've shared above show that the library received the Symbol Info from resolveSymbol. So it should call getBars next unless something in the LibrarySymbolInfo is invalid. Suggestions: Also you could test against our demo datafeed to make sure that the issue is not with the flutter layer: https://github.com/tradingview/yahoo_datafeed |
Hello @ashlin-utrade Apologies for the late reply, please try using the demo datafeed from here, might be an easier path.: |
I am trying to integrate tradingview into flutter app. I am using in app webview of flutter and javacript handlers for communication.
{"name":"PNB","full_name":"PNB EQ","ticker":"5676","description":"","daily_multipliers":["1"],"delay":0,"type":"common_stock","session":"0915-1530","exchange":"NSECM","listed_exchange":"NSECM","timezone":"Asia/Kolkata","format":"price","pricescale":100,"minmov":1,"fractional":true,"minmove2":0,"has_intraday":true,"supported_resolutions":["1","5","30","60","1D","1W","1M"],"intraday_multipliers":["1","5","30","60"],"has_seconds":false,"has_ticks":true,"has_daily":true,"has_weekly_and_monthly":true,"weekly_multipliers":["1"],"monthly_multipliers":["1"],"has_empty_bars":false,"visible_plots_set":"ohlcv","volume_precision":0,"data_status":"streaming","expired":false,"expiration_date":0,"currency_code":"INR","original_currency_code":"INR"} - this is the data that is passed to resolveSymbol . After this step, there are no errors visible and also getBars is not being called.
The text was updated successfully, but these errors were encountered: