Closed toi16 closed 5 years ago
Console log showing CORS errors
Can you please include the console log erros you see?
Is the screenshot generated with the "Report" modal? I see it has rendering errors.
I see you have blurred your account name, I have sadly not found a way to automate that for the "Report" modal yet... The top right corner could be blackened, but if the account appears anywhere else in the screen there is no way to find that out.
Yes the screenshot was generated with the report modal.
Error Report log below, with console log below that.
log: fetchTradingPairs error from https://citadel.li/trade/trading-pairs: TypeError: Failed to fetch log: error fetching blocktrades active walletsTypeError: Failed to fetchhttps://citadel.li/trade/active-wallets log: Your node is out of sync since 5.073999881744385 seconds, waiting 10 seconds, then we notify you log: synced and subscribed, chainstore ready log: fetchCoins error from https://citadel.li/trade/coins: TypeError: Failed to fetch log: fetchTradingPairs error from https://citadel.li/trade/trading-pairs: TypeError: Failed to fetch log: error fetching blocktrades active walletsTypeError: Failed to fetchhttps://citadel.li/trade/active-wallets log: !!! Chain API error[object Object] log: Switching to InRam storage for private session log: Your node is out of sync since 5.9079999923706055 seconds, waiting 10 seconds, then we notify you log: synced and subscribed, chainstore ready log: fetchCoins error from https://citadel.li/trade/coins: TypeError: Failed to fetch log: fetchTradingPairs error from https://citadel.li/trade/trading-pairs: TypeError: Failed to fetch log: error fetching blocktrades active walletsTypeError: Failed to fetchhttps://citadel.li/trade/active-wallets log: !!! Chain API error[object Object] log: synced and subscribed, chainstore ready log: fetchCoins error from https://citadel.li/trade/coins: TypeError: Failed to fetch log: fetchTradingPairs error from https://citadel.li/trade/trading-pairs: TypeError: Failed to fetch log: error fetching blocktrades active walletsTypeError: Failed to fetchhttps://citadel.li/trade/active-wallets log: !!! Chain API error[object Object]
Console Log: auto selecting to wss://dex.rnglab.org app.d0181e3ebf68acc745b8.js:1 Connecting to wss://dex.rnglab.org app.d0181e3ebf68acc745b8.js:1 synced and subscribed, chainstore ready 2VM1613:1 GET https://citadel.li/trade/coins 502 (Bad Gateway) (anonymous) @ VM1613:1 d @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 l @ vendor.edd3a92fcced7cf64be8.js:25 setTimeout @ vendor.edd3a92fcced7cf64be8.js:25 setTimeout (async) M.l.defer.e @ vendor.edd3a92fcced7cf64be8.js:25 f @ app.d0181e3ebf68acc745b8.js:1 value @ app.d0181e3ebf68acc745b8.js:1 Xa @ vendor.edd3a92fcced7cf64be8.js:25 Ga @ vendor.edd3a92fcced7cf64be8.js:25 Wa @ vendor.edd3a92fcced7cf64be8.js:25 Ka @ vendor.edd3a92fcced7cf64be8.js:25 Ua @ vendor.edd3a92fcced7cf64be8.js:25 ga @ vendor.edd3a92fcced7cf64be8.js:25 enqueueSetState @ vendor.edd3a92fcced7cf64be8.js:25 b.setState @ vendor.edd3a92fcced7cf64be8.js:25 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 Promise.then (async) value @ app.d0181e3ebf68acc745b8.js:1 ui @ vendor.edd3a92fcced7cf64be8.js:25 Ni @ vendor.edd3a92fcced7cf64be8.js:25 da @ vendor.edd3a92fcced7cf64be8.js:25 ha @ vendor.edd3a92fcced7cf64be8.js:25 Ga @ vendor.edd3a92fcced7cf64be8.js:25 Wa @ vendor.edd3a92fcced7cf64be8.js:25 Ka @ vendor.edd3a92fcced7cf64be8.js:25 Ua @ vendor.edd3a92fcced7cf64be8.js:25 ga @ vendor.edd3a92fcced7cf64be8.js:25 os @ vendor.edd3a92fcced7cf64be8.js:25 as @ vendor.edd3a92fcced7cf64be8.js:25 hs.render @ vendor.edd3a92fcced7cf64be8.js:25 (anonymous) @ vendor.edd3a92fcced7cf64be8.js:25 es @ vendor.edd3a92fcced7cf64be8.js:25 ms @ vendor.edd3a92fcced7cf64be8.js:25 render @ vendor.edd3a92fcced7cf64be8.js:25 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 s @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 s @ app.d0181e3ebf68acc745b8.js:1 n @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 /#/account/ghost1/voting:1 Access to fetch at 'https://citadel.li/trade/coins' from origin 'https://staging.bitshares.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. app.d0181e3ebf68acc745b8.js:1 fetchCoins error from https://citadel.li/trade/coins: TypeError: Failed to fetch 2VM1613:1 GET https://citadel.li/trade/trading-pairs 502 (Bad Gateway) (anonymous) @ VM1613:1 m @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 l @ vendor.edd3a92fcced7cf64be8.js:25 setTimeout @ vendor.edd3a92fcced7cf64be8.js:25 setTimeout (async) M.l.defer.e @ vendor.edd3a92fcced7cf64be8.js:25 f @ app.d0181e3ebf68acc745b8.js:1 value @ app.d0181e3ebf68acc745b8.js:1 Xa @ vendor.edd3a92fcced7cf64be8.js:25 Ga @ vendor.edd3a92fcced7cf64be8.js:25 Wa @ vendor.edd3a92fcced7cf64be8.js:25 Ka @ vendor.edd3a92fcced7cf64be8.js:25 Ua @ vendor.edd3a92fcced7cf64be8.js:25 ga @ vendor.edd3a92fcced7cf64be8.js:25 enqueueSetState @ vendor.edd3a92fcced7cf64be8.js:25 b.setState @ vendor.edd3a92fcced7cf64be8.js:25 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 Promise.then (async) value @ app.d0181e3ebf68acc745b8.js:1 ui @ vendor.edd3a92fcced7cf64be8.js:25 Ni @ vendor.edd3a92fcced7cf64be8.js:25 da @ vendor.edd3a92fcced7cf64be8.js:25 ha @ vendor.edd3a92fcced7cf64be8.js:25 Ga @ vendor.edd3a92fcced7cf64be8.js:25 Wa @ vendor.edd3a92fcced7cf64be8.js:25 Ka @ vendor.edd3a92fcced7cf64be8.js:25 Ua @ vendor.edd3a92fcced7cf64be8.js:25 ga @ vendor.edd3a92fcced7cf64be8.js:25 os @ vendor.edd3a92fcced7cf64be8.js:25 as @ vendor.edd3a92fcced7cf64be8.js:25 hs.render @ vendor.edd3a92fcced7cf64be8.js:25 (anonymous) @ vendor.edd3a92fcced7cf64be8.js:25 es @ vendor.edd3a92fcced7cf64be8.js:25 ms @ vendor.edd3a92fcced7cf64be8.js:25 render @ vendor.edd3a92fcced7cf64be8.js:25 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 s @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 s @ app.d0181e3ebf68acc745b8.js:1 n @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 /#/account/ghost1/voting:1 Access to fetch at 'https://citadel.li/trade/trading-pairs' from origin 'https://staging.bitshares.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. app.d0181e3ebf68acc745b8.js:1 fetchTradingPairs error from https://citadel.li/trade/trading-pairs: TypeError: Failed to fetch 2VM1613:1 GET https://citadel.li/trade/active-wallets 502 (Bad Gateway) (anonymous) @ VM1613:1 g @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 l @ vendor.edd3a92fcced7cf64be8.js:25 setTimeout @ vendor.edd3a92fcced7cf64be8.js:25 setTimeout (async) M.l.defer.e @ vendor.edd3a92fcced7cf64be8.js:25 f @ app.d0181e3ebf68acc745b8.js:1 value @ app.d0181e3ebf68acc745b8.js:1 Xa @ vendor.edd3a92fcced7cf64be8.js:25 Ga @ vendor.edd3a92fcced7cf64be8.js:25 Wa @ vendor.edd3a92fcced7cf64be8.js:25 Ka @ vendor.edd3a92fcced7cf64be8.js:25 Ua @ vendor.edd3a92fcced7cf64be8.js:25 ga @ vendor.edd3a92fcced7cf64be8.js:25 enqueueSetState @ vendor.edd3a92fcced7cf64be8.js:25 b.setState @ vendor.edd3a92fcced7cf64be8.js:25 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 Promise.then (async) value @ app.d0181e3ebf68acc745b8.js:1 ui @ vendor.edd3a92fcced7cf64be8.js:25 Ni @ vendor.edd3a92fcced7cf64be8.js:25 da @ vendor.edd3a92fcced7cf64be8.js:25 ha @ vendor.edd3a92fcced7cf64be8.js:25 Ga @ vendor.edd3a92fcced7cf64be8.js:25 Wa @ vendor.edd3a92fcced7cf64be8.js:25 Ka @ vendor.edd3a92fcced7cf64be8.js:25 Ua @ vendor.edd3a92fcced7cf64be8.js:25 ga @ vendor.edd3a92fcced7cf64be8.js:25 os @ vendor.edd3a92fcced7cf64be8.js:25 as @ vendor.edd3a92fcced7cf64be8.js:25 hs.render @ vendor.edd3a92fcced7cf64be8.js:25 (anonymous) @ vendor.edd3a92fcced7cf64be8.js:25 es @ vendor.edd3a92fcced7cf64be8.js:25 ms @ vendor.edd3a92fcced7cf64be8.js:25 render @ vendor.edd3a92fcced7cf64be8.js:25 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 s @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 s @ app.d0181e3ebf68acc745b8.js:1 n @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 (anonymous) @ app.d0181e3ebf68acc745b8.js:1 /#/account/ghost1/voting:1 Access to fetch at 'https://citadel.li/trade/active-wallets' from origin 'https://staging.bitshares.org' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. app.d0181e3ebf68acc745b8.js:1 error fetching blocktrades active wallets TypeError: Failed to fetch https://citadel.li/trade/active-wallets app.d0181e3ebf68acc745b8.js:1 !!! Chain API error {code: 1, message: "Assert Exception: tmp: ", data: {…}}
In Firefox the Voting Page is displaying OK.
Firefox Console Log below: Your connection was lost app.d0181e3ebf68acc745b8.js:1:585489 Connecting to wss://netherlands.bitshares.apasia.tech/ws app.d0181e3ebf68acc745b8.js:1:585489 synced and subscribed, chainstore ready app.d0181e3ebf68acc745b8.js:1:585489 fetchCoins error from https://citadel.li/trade/coins: TypeError: NetworkError when attempting to fetch resource. app.d0181e3ebf68acc745b8.js:1:585489 fetchTradingPairs error from https://citadel.li/trade/trading-pairs: TypeError: NetworkError when attempting to fetch resource. app.d0181e3ebf68acc745b8.js:1:585489 error fetching blocktrades active wallets TypeError: "NetworkError when attempting to fetch resource." https://citadel.li/trade/active-wallets app.d0181e3ebf68acc745b8.js:1:585489 Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://citadel.li/trade/coins. (Reason: CORS header 'Access-Control-Allow-Origin' missing).[Learn More] Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://citadel.li/trade/trading-pairs. (Reason: CORS header 'Access-Control-Allow-Origin' missing).[Learn More] Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://citadel.li/trade/active-wallets. (Reason: CORS header 'Access-Control-Allow-Origin' missing).[Learn More]
With regards to user account name data, I did notice that account names do appear in the error report log entries periodically.
I am not sure on the implications of end users potentially sending sensitive data to a publicly accessible error report ?
Maybe a clear disclaimer needs to be presented to the end user with a check box that they need to opt in to authorize the use of their data ?
There seems to be a regression caused by the removal of the budget_object object 2.13.x from backend. However, those were used to calculated worker pay. In python I do it like this:
@staticmethod
def _receives(this_worker):
if this_worker["work_end_date"] < datetime.utcnow():
return 0.0
if this_worker["work_begin_date"] > datetime.utcnow():
return 0.0
workers = Workers()
sorted_workers = sorted(
workers,
key=lambda x: (
int(x["total_votes_for"]) - int(x["total_votes_against"])
),
reverse=True
)
total_budget = int(
Object("2.0.0")["parameters"]["worker_budget_per_day"]
)
for worker in sorted_workers:
budget = int(worker["daily_pay"])
if this_worker["work_end_date"] < datetime.utcnow():
continue
if this_worker["work_begin_date"] > datetime.utcnow():
continue
if worker["id"] == this_worker["id"]:
if total_budget >= budget:
return budget
else:
return total_budget
total_budget -= budget
This issue needs to be discussed and/or verified. Is this possible to be solved on the client (UI) side or does it require a server (core) change.
See xeroc's comment. I'd suggest that the UI is able to handle gracefully if 2.13.x object is missing.
It probably won't be able to know which ones are active then, but could still visualize all proposals as "Proposed"
As mentioned in Telegram, the logic in @xeroc's code is incorrect, since 2.0.0
data is a "hard" limit but not the actual available budget. It's not easy for UI to calculate without a 2.13.x object thus far. For this issue, we'll revert the changes done in core, so UI will work with next bitshares-core release. Later, for better performance and easier to understand, IMHO we should create a special API in core to query for data required by this page (need to modify core as well as UI, so need new issues for both repository).
Issue replaced by new issue task #2192
0.1 hour reward should go to user @toi16 for finding and reporting this issue. Please leave your Bitshares account name
The title reward is meant for the person to fix it, not the one reporting it. I will add the reporting hours in the general integration test issue, this issue is simply closed.
@sschiessl-bcp sorry, my mistake. I let you keep track of the testing rewards 👍
Describe the bug When navigating to the Voting screen, the screen goes blank. To Reproduce Steps to reproduce the behavior:
Expected behavior Select 'Voting' from the menu and display the voting page.
Screenshots I![voting error](https://user-images.githubusercontent.com/23018324/48618513-870b6200-e991-11e8-83be-d310eb2ec9db.png)
Desktop (please complete the following information):
Additional context Using version 181121-RC1 Console log showing CORS errors.