bitshares / bitshares-ui

Fully featured Graphical User Interface / Reference Wallet for the BitShares Blockchain
https://wallet.bitshares.org
MIT License
517 stars 569 forks source link

CORS and 403 error in TradingView when deployed on a server #2712

Closed dltmd6262 closed 5 years ago

dltmd6262 commented 5 years ago

Describe the bug There is a network error in TradingView when getting studies. Two 403 errors occur when getting from 'https://saveload.tradingview.com/1.1/study_templates?client=tradingview.com&user=public_user_id' and one CORS error from 'https://saveload.tradingview.com/1.1/study_templates?client=tradingview.com&user=public_user_id'

This leads to chart's color breaking (dark theme background color when I'm in light mode) and even the chart itself.

The error doesn't occur when I'm working locally, only when I deploy it on a server

To Reproduce Steps to reproduce the behavior:

  1. Go to 'https://wallet.bitshares.org/#/market/USD_BTS'
  2. Open the dev tools and check the error

Screenshots The graph currently looks like this:

Screen Shot 2019-05-24 at 9 30 36 PM

And the error in dev tools looks like this:

Screen Shot 2019-05-24 at 9 30 57 PM

Desktop (please complete the following information):

startailcoon commented 5 years ago

I can see this issue occurring as well, but it doesn't affect me being able to switch the background color of the chart under the chart settings panel. What the file in location https://saveload.tradingview.com/1.1/study_templates?client=tradingview.com&user=public_user_id does, I'm not sure of or if it's required.

The trading view chart may not have all settings setup correctly. For example, chart background should be based on theme.

dltmd6262 commented 5 years ago

Right I think what happens because of this error is random. I'm playing around with switching themes on bitshares wallet and I keep getting mixed up background colors. Maybe we should reach out to TradingView too?

sschiessl-bcp commented 5 years ago

Right I think what happens because of this error is random. I'm playing around with switching themes on bitshares wallet and I keep getting mixed up background colors. Maybe we should reach out to TradingView too?

TradingView library on our end is 8 months old. I would rather try updating to latest version / checking settings. Please create an issue for that and then close this one.

startailcoon commented 5 years ago

I assume there is an update, I can't find one on their website, https://www.tradingview.com/HTML5-stock-forex-bitcoin-charting-library/

sschiessl-bcp commented 5 years ago

TradingView requires access to their private github, code is not open source.

sschiessl-bcp commented 2 years ago

@abstulo I removed your message prematurely. Please describe your issue again, the relevance to our issue here and I will see if I can be of assistance

abitmore commented 2 years ago

@abstulo said:

Seems this issue is still present when trying to load or save a Layout on Crypto.com Exchange website. Both 403 and CORS rejection can be seen in console messages. Any way to overcome this issue as a user? Even disabling CORS altogether still returns a 403.

abstulo commented 2 years ago

Hi guys, I was able to get into contact with the Crypto.com Exchange support to inform them of the mater. They came back to me on the 26th of March stating the following:

Hi there, thank you for your patience in this matter! The relevant team has updated us that they are aware of the issue and working on a fix which will be implemented in an update soon.

After further testing today, I can confirm that I no longer see any CORS rejections while trying to save or load layouts. Sadly I was not given any specific details as to what was the issue and the fix they applied.