[SOLVED] Web3 API from this particular client, the clients needs to wait before sending more requests. This can be adjusted using Moralis.settings.setAPIRateLimit. Read More:

My apologies for opening up a new query - I did so under the fact that the previous one was marked as solved. I have updated the following as per the advice gotten.

also I set the delay in my for loop to delay(500) - the request is only iterating through 3paginations on the getnft request and leaves me confused as to why I get the error on the business plan

Moralis.settings.setAPIRateLimit({
    anonymous:50, authenticated:100, windowMs:60000
  })

this is what I entered however I still get the error… Also when I log in to moralis and click cloudfunctions they do not turn up as they used to

Try higher limits there, the config that you show limits to 100 requests per minute for an authenticated user

I set both to 1000 and still the same console errors

Try to change this one to 1000

Done - same error… Note I am not using a self hosted server

What is your Moralis server URL?

https://sdfrlv0hsdfsd6.grandmoralis.com:2053/server

That server isn’t showing any cloud code.

When you use the moralis-admin-cli, make sure you specify a path to a folder that contains your cloud code .js file (not the file itself), and use your Cli Api Key and Cli Api Secret from this page.

moralis-admin-cli watch-cloud-folder --moralisApiKey cliApiKeyHere --moralisApiSecret cliApiSecret --moralisSubdomain ***.usemoralis.com --autoSave 1 --moralisCloudfolder ./ 

Yes I have been doing that. I’m unsure as to where its going wrong

I keep getting

Listening folder: /cloudFunctions

And nothing changes following this

Doublecheck everything. E.g.

cloudcode/index.js which contains:

Moralis.settings.setAPIRateLimit({
    anonymous:50, authenticated:100, windowMs:60000
})

And re-run command:

moralis-admin-cli watch-cloud-folder --moralisApiKey cliApiKeyHere --moralisApiSecret cliApiSecret --moralisSubdomain ***.usemoralis.com --autoSave 1 --moralisCloudfolder cloudcode 
// or whichever path

Terminal should show something like:

Compiling file index.js into CJS
Changes Uploaded Correctly

Okay will try again - added note not sure if its relevant or not I am using nextjs and I am in production so I’m unsure if the directory is the issue

Your app environment is not related.

error I’m gettin now

ncc: Version 0.29.2
ncc: Compiling file index.js into CJS
This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at hashOf (/usr/lib/node_modules/moralis-admin-cli/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:37:1855992)
    at ncc (/usr/lib/node_modules/moralis-admin-cli/node_modules/@vercel/ncc/dist/ncc/index.js.cache.js:37:1860404)
    at /usr/lib/node_modules/moralis-admin-cli/commands/watchCloudFolder.js:116:33
    at f (/usr/lib/node_modules/moralis-admin-cli/node_modules/once/once.js:25:25)
    at Glob.<anonymous> (/usr/lib/node_modules/moralis-admin-cli/node_modules/glob/glob.js:148:7)
    at Glob.emit (node:events:513:28)
    at Glob.emit (node:domain:489:12)
    at Glob._finish (/usr/lib/node_modules/moralis-admin-cli/node_modules/glob/glob.js:194:8)

You can get that error if you’re using incorrect (API) key and/or secret. Can also be related to Node version (check with the command node --version).

v18.12.0 - node version

If you’re sure your command has all the right values, then you may need to use Node 16x.

Might it be frp file? I remember previously having to add an frp folder…

nvm that was for local chain

whats the difference between moralis api secret and moralis secret