Moralis CLI not deploying a json file with a 403 error

Hello I am trying to deploy a 0.json file to my moralis server but am met with the following error.

Hey @elijahsb777

Double check your api keys. And you need to specify a path moralis-admin-cli deploy --p C:\myDapp\

It says max file size exceeded. Is it correct? I tried with another smaller file and got this error

Please share your server subdomain :raised_hands:

https://xvndizkxt57v.moralisweb3.com:2053/server This is subdomain?

1 Like

moralis-admin-cli deploy is for deploying dapps to the Moralis hosting. In your case for stroring metadata you can use Moralis.File. Also Moralis supports IPFS.

Take a look at Saving Files

I am trying to deploy a json file as meta data for an nft

I see, but moralis-admin-cli deploy is not for your case. Check my message above

No I think there is a confusion. I only specified path because of this statement " . And you need to specify a path `moralis-admin-cli deploy --p C:\myDapp" I do not want to deploy the dapp. Just a json called 0.json alone

Please read my messages again :smiley:

2 Likes

hi guys,

I have been having an error trying to connect my local hardht network to your dev environment using the moralis CLI. It gives me 403 not authorized error.c Any ideas?

command:
moralis-admin-cli connect-local-devchain --chain hardhat --moralisSubdomain rmjhzsvwavyk.usemoralis.com --frpcPath /home/user/applications/moralis/frp_0.44.0_linux_amd64/frpc

NEXT_PUBLIC_APP_ID=GXWqEgDRYAb3cJTAlrvZCtHCcwIEXiYMUbtUfXqT
NEXT_PUBLIC_SERVER_URL=https://rmjhzsvwavyk.usemoralis.com:2053/server

Can you try the instructions here that uses your Moralis API key and secret.

greetings!

yes I also tried those flags. The code is from the chainlinks patrik 32 hours in blockchain dev course and many people report the same error in the course forum.

  • command:
    moralis-admin-cli connect-local-devchain --chain hardhat --moralisSubdomain rmjhzsvwavyk.usemoralis.com --moralisApiKey xxx --moralisApiSecret yyy --frpcPath /frcpPath/frpc

in the axios console response I see apikey and apisecret in the “data” of the post request, should they be in the header? (this is done automatically by Moralis CLI though)

  • Response to the above command

    config: {
    url: ‘https://admin.moralis.io/api/cli/userServers’,
    method: ‘post’,
    data: ‘{“apiKey”:“xxx”,“apiSecret”:“yyy”}’,
    headers: {
    Accept: ‘application/json, text/plain, /’,
    ‘Content-Type’: ‘application/json’,
    ‘User-Agent’: ‘axios/0.21.4’,
    ‘Content-Length’: 58
    },

Also it seams that is something that cloudflare does not like (also in the same response):

‘x-frame-options’: ‘SAMEORIGIN’,
‘expect-ct’: ‘max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”’,
server: ‘cloudflare’,

      '</head>\n' +
      '<body class="no-js">\n' +
      '    <div class="main-wrapper" role="main">\n' +
 ...
      '        </h1>\n' +
      '        <h2 class="h2" id="cf-challenge-running"> +
                 Checking if the site connection is secure\n' +
      '        </h2>\n' +
      '        <noscript>\n' +
      '            <div id="cf-challenge-error-title">\n' +
...
      '                    <span id="cf-challenge-error-text">\n' +
      '                        Enable JavaScript and cookies to continue\n' +
...
  <div id="cf-challenge-body-text" class="core-msg spacer">\n' +
      '            admin.moralis.io needs to review the security of your connection before\n' +
      '            proceeding.\n' +
      '        </div>\n' 

You can try to use directly frpc without moralis-admin-cli