Comments (8)
It seems to be triggered when the access key points to its own account. We've tried to repro with the studio app, but it doesn't reproduce correctly.
from near-api-js.
Can we prioritize the fix?
Currently the accessKey is always pulled from the node through RPC. It doesn't cache the key locally:
https://github.com/nearprotocol/nearlib/blob/8aadbdd93c255ff2fa3f01397f5fc11be3f9aea5/src.ts/account.ts#L91-L100
from near-api-js.
Background: Right now 2 of the apps I'm working on (ethrelay and metanear) can't send more than 1 transaction per second. So I have to implement queue for metanear and to reimplement sendTransaction on ethrelay
from near-api-js.
Getting cors error:
Access to fetch at 'https://rpc.nearprotocol.com/' from origin 'http://localhost:3000' 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.
const nearRpc = new providers.JsonRpcProvider("https://rpc.nearprotocol.com");
return await nearRpc.sendJsonRpc('tx', [txHash, accountId]);
txHash is encoded and accountId is also expected val
from near-api-js.
@evgenykuzyakov is nearcore executing OPTIONS requests as actual JSON-RPC? Not sure why would CORS error occur because of nonce error otherwise. Or is the problem that Access-Control-Allow-Origin
isn't set on errors by nearcore?
from near-api-js.
Moved it to In Progress as I understand Vlad is working on this currently.
from near-api-js.
For now this is somewhat blocked by the fact that nearcore sometimes doesn't return error specific to duplicate nonce (Timeout is returned instead).
from near-api-js.
nearcore issue: near/nearcore#2039.
from near-api-js.
Related Issues (20)
- Security: Supply chain protection is bad
- Get result of an execution plan
- Rework 'accounts' package tests due to removal of top-level account creation functionality
- functionCall arguments formated in Json only HOT 28
- The `wallet.requestSignIn` stopped working on v3.0.0 HOT 2
- Replace crypto-browserify with another library
- Error: Length of buffer does not match length of ASN.1 sequence HOT 31
- Error: Unable to resolve module http from ./node_modules/@near-js/providers/lib/fetch.js http could not be found within the project HOT 2
- Get correct publicKey from biometric getKeys using indexer HOT 1
- Support nearcore 1.37 HOT 1
- [Error] createAccount don't work on testnet. HOT 8
- How to get the account balance based on a particular block or date HOT 4
- SignedDelegate is not working
- Biometric createKey failing with Bitwarden password manager "expected βidβ or βrawIdβ field" HOT 6
- Passkeys/webauthn popup not triggering in Chrome HOT 11
- Account.sendMoney transaction execution level
- Updating RPC error schema HOT 2
- yarn + latest wallet selector + latest near-api-js == error HOT 6
- Error sending signed transaction with v4.0.3 HOT 5
- `provider.sendTransaction(signedTx)` always fails for FailoverRpcProvider HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from near-api-js.