(AssemblyScript + ReactJS) Can not sign transactions for account test.near on network shared-test - nearprotocol

When i run yarn test, i got this error:
Can not sign transactions for account test.near on network shared-test, no matching key pair found in InMemorySigner(UnencryptedFileSystemKeyStore(D:\React Native\Near demo\NEARForum\neardev)).
at Account.signTransaction (node_modules/near-cli/node_modules/near-api-js/lib/account.js:86:19)
at node_modules/near-cli/node_modules/near-api-js/lib/account.js:111:34
at Object.exponentialBackoff [as default] (node_modules/near-cli/node_modules/near-api-js/lib/utils/exponential-backoff.js:7:24)
at Account.signAndSendTransactionV2 (node_modules/near-cli/node_modules/near-api-js/lib/account.js:110:24)
at Account.createAndDeployContract (node_modules/near-cli/node_modules/near-api-js/lib/account.js:208:9)
at LocalTestEnvironment.setup (node_modules/near-cli/test_environment.js:39:9)
someone tell me what i need to config for testing please. Thanks

Related

`Invalid blockhash` error while deploying smart contract

I am trying to deploy the demo smart contract on solana for chainlink price feed but getting an error. I followed all the steps from https://docs.chain.link/docs/solana/using-data-feeds-solana/
$ anchor deploy --provider.wallet ./id.json --provider.cluster devnet
Deploying workspace: https://api.devnet.solana.com
Upgrade authority: ./id.json
Deploying program "chainlink_solana_demo"...
Program path: /home/test/solana-starter-kit/target/deploy/chainlink_solana_demo.so...
=============================================================================
Recover the intermediate account's ephemeral keypair file with
`solana-keygen recover` and the following 12-word seed phrase:
=============================================================================
until reason almost can clean wish trend buffalo future auto artefact balcony
=============================================================================
To resume a deploy, pass the recovered keypair as the
[BUFFER_SIGNER] to `solana program deploy` or `solana write-buffer'.
Or to recover the account's lamports, pass it as the
[BUFFER_ACCOUNT_ADDRESS] argument to `solana program close`.
=============================================================================
Error: Custom: Invalid blockhash
There was a problem deploying: Output { status: ExitStatus(unix_wait_status(256)), stdout: "", stderr: "" }.
This is just a timeout error message. It happens from time to time depending on the network availability
Follow these steps and run again. I've also found that you'll want quite a bit more sol in your wallet than you think you need.
To resume a deploy, pass the recovered keypair as the
[BUFFER_SIGNER] to `solana program deploy` or `solana write-buffer'.
Or to recover the account's lamports, pass it as the
[BUFFER_ACCOUNT_ADDRESS] argument to `solana program close`.

Does "SAM Local Invoke" support EFS?

I'm using Lambda to access EFS as described at https://docs.aws.amazon.com/lambda/latest/dg/configuration-filesystem.html
The lambda function works fine when running in AWS, but it fails when using SAM with the "local invoke" command. The error is
2020-10-02T20:03:19.389Z 09b6f1b2-d80a-15e1-9531-f74182e95c1e ERROR Invoke Error
{
"errorType":"Error",
"errorMessage":"ENOENT: no such file or directory, open '/mnt/efs/newfile.txt'",
"code":"ENOENT",
"errno":-2,
"syscall":"open",
"path":"/mnt/efs/newfile.txt",
"stack":[
"Error: ENOENT: no such file or directory, open '/mnt/efs/newfile.txt'",
" at Object.openSync (fs.js:458:3)",
" at Object.writeFileSync (fs.js:1355:35)",
" at WriteFile (/var/task/src/apis/permissions/isallowed.js:70:8)",
" at IsAllowedInPolicy (/var/task/src/apis/permissions/isallowed.js:52:5)",
" at Runtime.exports.handler (/var/task/src/apis/permissions/isallowed.js:16:28)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
]
}
Is "sam local invoke" supposed to work with EFS?
The answer is no.
I opened a support ticket with AWS and was told
This is a limitation on the AWS SAM CLI and not your configuration.
Therefore, I have taken the initiative to submit an internal feature
request with our internal service team(specifically AWS SAM CLI
service team) on your behalf and I have added your company name and
voice to this request. At the moment, we would not be able to provide
an estimate on if or when this feature will be supported. I would
advise to check the AWS announcement page from time to time for future
service updates. https://aws.amazon.com/new/
I also discovered that someone submitted a feature request on GitHub as a workaround.

"token does not exist"

Hello and good afternoon all!
I have a problem with ASK CLI in that when I attempt to utilize "ask clone " it returns this error in my console:
ask clone amzn1.ask.skill.900c47d3-532f-45b5-975b-1c995c6dbd88
The property "token" does not exist.
/usr/local/lib/node_modules/ask-cli/node_modules/simple-oauth2/lib/client/access-token.js:21
if ('expires_at' in this.token) {
^
TypeError: Cannot use 'in' operator to search for 'expires_at' in undefined
at new AccessToken (/usr/local/lib/node_modules/ask-cli/node_modules/simple-oauth2/lib/client/access-token.js:21:22)
at Object.createAccessToken [as create] (/usr/local/lib/node_modules/ask-cli/node_modules/simple-oauth2/lib/client/access-token.js:38:12)
at isTokenExpired (/usr/local/lib/node_modules/ask-cli/lib/utils/oauth-wrapper.js:97:35)
at Object.tokenRefreshAndRead (/usr/local/lib/node_modules/ask-cli/lib/utils/oauth-wrapper.js:84:10)
at Object.module.exports.requestWithUrl (/usr/local/lib/node_modules/ask-cli/lib/api/request-wrapper.js:45:18)
at Object.module.exports.request (/usr/local/lib/node_modules/ask-cli/lib/api/request-wrapper.js:26:20)
at Object.callGetSkillStatus (/usr/local/lib/node_modules/ask-cli/lib/api/api-wrapper.js:229:20)
at Command.handle (/usr/local/lib/node_modules/ask-cli/lib/api/skill.js:213:20)
at Command.listener (/usr/local/lib/node_modules/ask-cli/node_modules/commander/index.js:315:8)
at Command.emit (events.js:182:13)
at Command.parseArgs (/usr/local/lib/node_modules/ask-cli/node_modules/commander/index.js:654:12)
at Command.parse (/usr/local/lib/node_modules/ask-cli/node_modules/commander/index.js:474:21)
at Object. (/usr/local/lib/node_modules/ask-cli/bin/ask-api.js:25:6)
at Module._compile (internal/modules/cjs/loader.js:707:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Module.load (internal/modules/cjs/loader.js:605:32)
I have scoured the Earth for solutions and found one way to bypass this is to "downgrade" the oauth from '1.0.2' to '1.5.0' however this does not seem to work.
Any input/suggestions on this?
I had this problem a while ago. I uninstalled the cli and followed this tutorial to setup ASK-CLI and it worked.
When the ASK-CLI is installed for the first time it needs configuration with our aws account and amazon account. Sometimes our accounts are not get configured properly and results in problems in cloning and deploying the skill. It happen because the authentication token of CLI does not match with our accounts.
Solution:
Try running ask init command again. And If this does not work
Uninstall the ASK-CLI and install again. And Run ask init

How to set the "cluster" property in prisma.yml

Thanks for reading my question in advance. I am just start to use graphql and prisma following this tutorial.
I have the following Error when Deploying the Prisma database service:
Error: No cluster set. Please set the "cluster" property in your prisma.yml
at /Users/judy/howtographql/server/node_modules/graphql-config-extension-prisma/src/index.ts:89:11
at step (/Users/judy/howtographql/server/node_modules/graphql-config-extension-prisma/dist/index.js:40:23)
at Object.next (/Users/judy/howtographql/server/node_modules/graphql-config-extension-prisma/dist/index.js:21:53)
at fulfilled (/Users/judy/howtographql/server/node_modules/graphql-config-extension-prisma/dist/index.js:12:58)
at <anonymous>
error Command failed with exit code 1.
ERROR: "playground" exited with 1.
error Command failed with exit code 1.
I looked over the tutorial to find that there is nothing about how to set the cluster. I wonder how to fix this problem.
The default prisma.yaml is:
# the name for the service (will be part of the service's HTTP endpoint)
service: hackernews-graphql-js
# the cluster and stage the service is deployed to
stage: dev
# to disable authentication:
# disableAuth: true
secret: mysecret123
# the file path pointing to your data model
datamodel: datamodel.graphql
It could be just that you may have entered an incorrect endpoint address. Please refer https://github.com/prisma/graphql-config-extension-graphcool/issues/8

Error when running `feathers generate authentication` for `RethinkDB`

I’m having issues when running feathers generate authentication with selecting rethinkdb as database.
Environment:
Mac OS X Sierra
feathers 2.2.3
npm 5.1.0
rethinkdb 2.3.5
Steps to reproduce:
I have up and running https://github.com/tenzan/feathers-chat.git
feathers generate authentication
Select Username + Password (Local)
What is the name of the user (entity) service? (users) <-- Enter
What kind of service is it? (Use arrow keys) ❯ RethinkDB <-- Enter
Output:
events.js:182
throw er; // Unhandled 'error' event
^
TypeError: Parameter "url" must be a string, not object
at Url.parse (url.js:102:11)
at Object.urlParse [as parse] (url.js:96:5)
at ConnectionGenerator._getConfiguration (/usr/local/lib/node_modules/feathers-cli/node_modules/generator-feathers/generators/connection/index.js:46:24)
at ConnectionGenerator._writeConfiguration (/usr/local/lib/node_modules/feathers-cli/node_modules/generator-feathers/generators/connection/index.js:103:32)
at ConnectionGenerator.writing (/usr/local/lib/node_modules/feathers-cli/node_modules/generator-feathers/generators/connection/index.js:297:10)
at Object.<anonymous> (/usr/local/lib/node_modules/feathers-cli/node_modules/yeoman-generator/lib/index.js:417:23)
at /usr/local/lib/node_modules/feathers-cli/node_modules/run-async/index.js:25:25
at Promise (<anonymous>)
at /usr/local/lib/node_modules/feathers-cli/node_modules/run-async/index.js:24:19
at /usr/local/lib/node_modules/feathers-cli/node_modules/yeoman-generator/lib/index.js:418:9
I had same errors on different Mac PCs with same environment.
It's an issue with generator-feathers
Remove the rethinkdb object from config/default
will see if I can fix the main problem
Edit: Fixed

Resources