-
Notifications
You must be signed in to change notification settings - Fork 6
[Technical support] #8
Comments
Can you provide more specific code or environment where the project can be tested out? |
|
In the error logs, I see two things happening: The info/balance of the account is queried, and as it is empty as you say, the faucet is being contacted for more balance. As it was throttled some time ago to one request per address every 4 hours, you receive a code |
@nikita-fuchs Commenting that out indeed solved the 425 issue. However, the problem of these getters return 0 or false is still there. When I check the network traffic in the developer tabs in Chrome then I see the result of "decode-call-result" being false. Which is exactly what I expect it to be. If I run the code with an account who is an arbiter, no problem, everything works as expected. As soon as I run it with an account who is not an arbiter the above mentioned problem happens.
The log is never printed, so things seem to go wrong in callStatic:
Mind that I added an extra console.log in this function. Here is the output of when I first run the code with an account which is an arbiter and after that with an account which is not an arbiter:
I really don't get why this happens. |
Hey, can you ask naz about this? He is there somewhere with emin :)
Arjan van Eersel <[email protected]> schrieb am So., 15. Sep. 2019,
14:57:
… @nikita-fuchs <https://github.com/nikita-fuchs> Commenting that out
indeed solved the 425 issue. However, the problem of these getters return 0
or false is still there.
When I check the network traffic in the developer tabs in Chrome then I
see the result of "decode-call-result" being false. Which is exactly what I
expect it to be.
The console now shows this:
f7099d7e.ngrok.io:1 GET https://sdk-testnet.aepps.com/v2/accounts/ak_7qTeKsHsV3K4Pb2zepYDLjkkx5sE4zbXxfxdhYKsKBs8ksgmr 404
vue.runtime.esm.js?2b0e:8423 Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
Home.vue?7b07:82 {Chain: {…}, Ae: {…}, handler: null, post: ƒ, destroyClient: ƒ, …}
Home.vue?7b07:82 {Chain: {…}, Ae: {…}, handler: null, post: ƒ, destroyClient: ƒ, …}
client?f442:172 [WDS] Disconnected!
close @ client?f442:172
(anonymous) @ socket.js?e29c:26
EventTarget.dispatchEvent @ sockjs.js?9be2:170
(anonymous) @ sockjs.js?9be2:969
setTimeout (async)
SockJS._close @ sockjs.js?9be2:957
SockJS._receiveInfo @ sockjs.js?9be2:786
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
(anonymous) @ sockjs.js?9be2:561
setTimeout (async)
InfoReceiver.doXhr @ sockjs.js?9be2:558
(anonymous) @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:730
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
(anonymous) @ client?f442:176
(anonymous) @ index.js?http://0.0.0.0:8081:177
./node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:8081 @ bundle.js?ad3c9321ad3958e43f01:8026
__webpack_require__ @ bundle.js?ad3c9321ad3958e43f01:20
0 @ bundle.js?ad3c9321ad3958e43f01:8331
__webpack_require__ @ bundle.js?ad3c9321ad3958e43f01:20
(anonymous) @ bundle.js?ad3c9321ad3958e43f01:84
(anonymous) @ bundle.js?ad3c9321ad3958e43f01:87
2client.js?aafa:60 Uncaught TypeError: Cannot read property 'resolve' of undefined
at _ref4 (client.js?aafa:60)
_ref4 @ client.js?aafa:60
postMessage (async)
sendMsg @ sendMessage.js?090b:7
close @ client?f442:173
(anonymous) @ socket.js?e29c:26
EventTarget.dispatchEvent @ sockjs.js?9be2:170
(anonymous) @ sockjs.js?9be2:969
setTimeout (async)
SockJS._close @ sockjs.js?9be2:957
SockJS._receiveInfo @ sockjs.js?9be2:786
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
(anonymous) @ sockjs.js?9be2:561
setTimeout (async)
InfoReceiver.doXhr @ sockjs.js?9be2:558
(anonymous) @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:730
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
(anonymous) @ client?f442:176
(anonymous) @ index.js?http://0.0.0.0:8081:177
./node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:8081 @ bundle.js?ad3c9321ad3958e43f01:8026
__webpack_require__ @ bundle.js?ad3c9321ad3958e43f01:20
0 @ bundle.js?ad3c9321ad3958e43f01:8331
__webpack_require__ @ bundle.js?ad3c9321ad3958e43f01:20
(anonymous) @ bundle.js?ad3c9321ad3958e43f01:84
(anonymous) @ bundle.js?ad3c9321ad3958e43f01:87
sockjs.js?9be2:1605 GET https://f7099d7e.ngrok.io:8081/sockjs-node/info?t=1568551241280 net::ERR_CONNECTION_TIMED_OUT
If I run the code with an account who is an arbiter, no problem,
everything works as expected. As soon as I run it with an account who is
not an arbiter the above mentioned problem happens.
this.loading_text = "Getting arbiter status"
result = await callStatic('am_i_arbiter', []);
console.log("arbiter: ", result);
The log is never printed, so things seem to go wrong in callStatic:
async function callStatic(func, args) {
//Create a new contract instance that we can interact with
const contract = await aeternity.client.getContractInstance(contractSource, {contractAddress});
//Make a call to get data of smart contract func, with specefied arguments
const calledGet = await contract.call(func, args, {callStatic: true}).catch(e => console.error("Static call error: " + e));
//Make another call to decode the data received in first call
const decodedGet = await calledGet.decode().catch(e => console.error("Decoding error: " + e));
console.log("decodedGet: " + decodedGet);
return decodedGet;
}
Mind that I added an extra console.log in this function.
Here is the output of when I first run the code with an account which is
an arbiter and after that with an account which is not an arbiter:
GET https://sdk-testnet.aepps.com/v2/accounts/ak_7qTeKsHsV3K4Pb2zepYDLjkkx5sE4zbXxfxdhYKsKBs8ksgmr 404
VM82 vue.runtime.esm.js:8412 Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
VM721 Home.vue:97 decodedGet: 1000000000
VM721 Home.vue:97 decodedGet: true
VM721 Home.vue:197 arbiter: true
VM16 0.0.0.0:8081:172 [WDS] Disconnected!
close @ VM16 0.0.0.0:8081:172
(anonymous) @ VM19 socket.js:26
EventTarget.dispatchEvent @ VM21 sockjs.js:170
(anonymous) @ VM21 sockjs.js:969
setTimeout (async)
SockJS._close @ VM21 sockjs.js:957
SockJS._receiveInfo @ VM21 sockjs.js:786
g @ VM21 sockjs.js:66
EventEmitter.emit @ VM21 sockjs.js:86
(anonymous) @ VM21 sockjs.js:561
setTimeout (async)
InfoReceiver.doXhr @ VM21 sockjs.js:558
(anonymous) @ VM21 sockjs.js:525
setTimeout (async)
InfoReceiver @ VM21 sockjs.js:524
SockJS @ VM21 sockjs.js:730
SockJSClient @ VM20 SockJSClient.js:39
initSocket @ VM19 socket.js:20
(anonymous) @ VM16 0.0.0.0:8081:176
(anonymous) @ VM16 0.0.0.0:8081:177
./node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:8081 @ VM15 bundle.js:8026
__webpack_require__ @ VM15 bundle.js:20
0 @ VM15 bundle.js:8331
__webpack_require__ @ VM15 bundle.js:20
(anonymous) @ VM15 bundle.js:84
(anonymous) @ VM15 bundle.js:87
2VM649 client.js:100 Uncaught TypeError: Cannot read property 'resolve' of undefined
at _ref4 (VM649 client.js:100)
_ref4 @ VM649 client.js:100
postMessage (async)
sendMsg @ VM35 sendMessage.js:7
close @ VM16 0.0.0.0:8081:173
(anonymous) @ VM19 socket.js:26
EventTarget.dispatchEvent @ VM21 sockjs.js:170
(anonymous) @ VM21 sockjs.js:969
setTimeout (async)
SockJS._close @ VM21 sockjs.js:957
SockJS._receiveInfo @ VM21 sockjs.js:786
g @ VM21 sockjs.js:66
EventEmitter.emit @ VM21 sockjs.js:86
(anonymous) @ VM21 sockjs.js:561
setTimeout (async)
InfoReceiver.doXhr @ VM21 sockjs.js:558
(anonymous) @ VM21 sockjs.js:525
setTimeout (async)
InfoReceiver @ VM21 sockjs.js:524
SockJS @ VM21 sockjs.js:730
SockJSClient @ VM20 SockJSClient.js:39
initSocket @ VM19 socket.js:20
(anonymous) @ VM16 0.0.0.0:8081:176
(anonymous) @ VM16 0.0.0.0:8081:177
./node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:8081 @ VM15 bundle.js:8026
__webpack_require__ @ VM15 bundle.js:20
0 @ VM15 bundle.js:8331
__webpack_require__ @ VM15 bundle.js:20
(anonymous) @ VM15 bundle.js:84
(anonymous) @ VM15 bundle.js:87
2sdk-testnet.aepps.com/v2/accounts/ak_2RqhaKKfU9Uf2xnAQK5GPC3VgQNLRAUcicn5tMcxishgwJsBWb:1 GET https://sdk-testnet.aepps.com/v2/accounts/ak_2RqhaKKfU9Uf2xnAQK5GPC3VgQNLRAUcicn5tMcxishgwJsBWb 404
vue.runtime.esm.js?2b0e:8423 Download the Vue Devtools extension for a better development experience:
https://github.com/vuejs/vue-devtools
Home.vue?7b07:88 decodedGet: 1000000000
sockjs.js?9be2:1605 GET https://f7099d7e.ngrok.io:8081/sockjs-node/info?t=1568552087730 net::ERR_CONNECTION_TIMED_OUT
AbstractXHRObject._start @ sockjs.js?9be2:1605
(anonymous) @ sockjs.js?9be2:1494
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1493
XHRCorsObject @ sockjs.js?9be2:2871
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
(anonymous) @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:730
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
(anonymous) @ client?f442:176
(anonymous) @ index.js?http://0.0.0.0:8081:177
./node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:8081 @ bundle.js?35a1b4fa8e9ffcd55d8e:8026
__webpack_require__ @ bundle.js?35a1b4fa8e9ffcd55d8e:20
0 @ bundle.js?35a1b4fa8e9ffcd55d8e:8331
__webpack_require__ @ bundle.js?35a1b4fa8e9ffcd55d8e:20
(anonymous) @ bundle.js?35a1b4fa8e9ffcd55d8e:84
(anonymous) @ bundle.js?35a1b4fa8e9ffcd55d8e:87
client?f442:172 [WDS] Disconnected!
close @ client?f442:172
(anonymous) @ socket.js?e29c:26
EventTarget.dispatchEvent @ sockjs.js?9be2:170
(anonymous) @ sockjs.js?9be2:969
setTimeout (async)
SockJS._close @ sockjs.js?9be2:957
SockJS._receiveInfo @ sockjs.js?9be2:786
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
(anonymous) @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
(anonymous) @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1597
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1605
(anonymous) @ sockjs.js?9be2:1494
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1493
XHRCorsObject @ sockjs.js?9be2:2871
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
(anonymous) @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:730
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
(anonymous) @ client?f442:176
(anonymous) @ index.js?http://0.0.0.0:8081:177
./node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:8081 @ bundle.js?35a1b4fa8e9ffcd55d8e:8026
__webpack_require__ @ bundle.js?35a1b4fa8e9ffcd55d8e:20
0 @ bundle.js?35a1b4fa8e9ffcd55d8e:8331
__webpack_require__ @ bundle.js?35a1b4fa8e9ffcd55d8e:20
(anonymous) @ bundle.js?35a1b4fa8e9ffcd55d8e:84
(anonymous) @ bundle.js?35a1b4fa8e9ffcd55d8e:87
2client.js?aafa:60 Uncaught TypeError: Cannot read property 'resolve' of undefined
at _ref4 (client.js?aafa:60)
_ref4 @ client.js?aafa:60
postMessage (async)
sendMsg @ sendMessage.js?090b:7
close @ client?f442:173
(anonymous) @ socket.js?e29c:26
EventTarget.dispatchEvent @ sockjs.js?9be2:170
(anonymous) @ sockjs.js?9be2:969
setTimeout (async)
SockJS._close @ sockjs.js?9be2:957
SockJS._receiveInfo @ sockjs.js?9be2:786
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
(anonymous) @ sockjs.js?9be2:567
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
(anonymous) @ sockjs.js?9be2:374
g @ sockjs.js?9be2:66
EventEmitter.emit @ sockjs.js?9be2:86
xhr.onreadystatechange @ sockjs.js?9be2:1597
XMLHttpRequest.send (async)
AbstractXHRObject._start @ sockjs.js?9be2:1605
(anonymous) @ sockjs.js?9be2:1494
setTimeout (async)
AbstractXHRObject @ sockjs.js?9be2:1493
XHRCorsObject @ sockjs.js?9be2:2871
InfoAjax @ sockjs.js?9be2:356
InfoReceiver._getReceiver @ sockjs.js?9be2:539
InfoReceiver.doXhr @ sockjs.js?9be2:556
(anonymous) @ sockjs.js?9be2:525
setTimeout (async)
InfoReceiver @ sockjs.js?9be2:524
SockJS @ sockjs.js?9be2:730
SockJSClient @ SockJSClient.js?0a33:39
initSocket @ socket.js?e29c:20
(anonymous) @ client?f442:176
(anonymous) @ index.js?http://0.0.0.0:8081:177
./node_modules/webpack-dev-server/client/index.js?http://0.0.0.0:8081 @ bundle.js?35a1b4fa8e9ffcd55d8e:8026
__webpack_require__ @ bundle.js?35a1b4fa8e9ffcd55d8e:20
0 @ bundle.js?35a1b4fa8e9ffcd55d8e:8331
__webpack_require__ @ bundle.js?35a1b4fa8e9ffcd55d8e:20
(anonymous) @ bundle.js?35a1b4fa8e9ffcd55d8e:84
(anonymous) @ bundle.js?35a1b4fa8e9ffcd55d8e:87
29sdk-testnet.aepps.com/v2/accounts/ak_2RqhaKKfU9Uf2xnAQK5GPC3VgQNLRAUcicn5tMcxishgwJsBWb:1 GET https://sdk-testnet.aepps.com/v2/accounts/ak_2RqhaKKfU9Uf2xnAQK5GPC3VgQNLRAUcicn5tMcxishgwJsBWb 404
2client.js?aafa:60 Uncaught TypeError: Cannot read property 'resolve' of undefined
at _ref4 (client.js?aafa:60)
_ref4 @ client.js?aafa:60
postMessage (async)
i._write @ contentscript.js:1
e @ contentscript.js:1
(anonymous) @ contentscript.js:1
o.write @ contentscript.js:1
p @ contentscript.js:1
(anonymous) @ contentscript.js:1
m.emit @ contentscript.js:1
V @ contentscript.js:1
I @ contentscript.js:1
e.push @ contentscript.js:1
_write @ contentscript.js:1
e @ contentscript.js:1
(anonymous) @ contentscript.js:1
o.write @ contentscript.js:1
p @ contentscript.js:1
(anonymous) @ contentscript.js:1
m.emit @ contentscript.js:1
V @ contentscript.js:1
I @ contentscript.js:1
e.push @ contentscript.js:1
_write @ contentscript.js:1
e @ contentscript.js:1
(anonymous) @ contentscript.js:1
o.write @ contentscript.js:1
p @ contentscript.js:1
(anonymous) @ contentscript.js:1
m.emit @ contentscript.js:1
V @ contentscript.js:1
I @ contentscript.js:1
e.push @ contentscript.js:1
i._onMessage @ contentscript.js:1
10sdk-testnet.aepps.com/v2/accounts/ak_2RqhaKKfU9Uf2xnAQK5GPC3VgQNLRAUcicn5tMcxishgwJsBWb:1 GET https://sdk-testnet.aepps.com/v2/accounts/ak_2RqhaKKfU9Uf2xnAQK5GPC3VgQNLRAUcicn5tMcxishgwJsBWb 404
I really don't get why this happens.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8?email_source=notifications&email_token=ACZXRJDUWIR7WTT2Q42YCVTQJYWMRA5CNFSM4IWZ23J2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6XQHHQ#issuecomment-531563422>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACZXRJCGMFYK4ZD7M76RIKLQJYWMRANCNFSM4IWZ23JQ>
.
|
Hey guys, i will investigate the problem and find very tricky bug in SDK RPC. |
Technical problem report / Request for support
How do we find you?
Issue
Explain your issue here.
Expected behaviour
I'm using the vue boiler plate code to build a frontend for a smart contract. Code:
The code works fine as long as the contract has a balance and as long as an account who is an arbiter connects. If the contract's balance is 0 or the connecting account is not an arbiter (and the getter returns 0 or false), the static call never ends and the following errors appear:
Both getters work fine when I invoke them on the deployed contract in the online editor.
Steps to reproduce problem
Go to
https://base.aepps.com/browser/https:/f7099d7e.ngrok.io
in the base aepp.Environment
If its a technical issue provide information regarding the environment you are using when facing the problem.
The text was updated successfully, but these errors were encountered: