metaplex-foundation / metaplex

A directory of what the Metaplex Foundation works on!
https://metaplex.com
Apache License 2.0
3.32k stars 6.26k forks source link

cannot init metaplex #1786

Closed jrwesty23 closed 2 years ago

jrwesty23 commented 2 years ago

Which package is this bug report for?

storefront

Issue description

after build and yarn start

when init

Command

from browser

Relevant log output

Unhandled Runtime Error
TypeError: Network request failed

Call Stack
XMLHttpRequest.xhr.onerror
file:///C:/CryptoLions/metaplex-master/js/packages/web/.next/static/chunks/src_App_tsx.js (177172:16)
XMLHttpRequest.sentryWrapped
https://browser.sentry-cdn.com/5.4.0/bundle.min.js (2:38177)

Operating system

windows 10

Priority this issue should have

Medium (should be fixed soon)

Check the Docs First

stegaBOB commented 2 years ago

I haven't been able to reproduce this issue. Please try pulling from master and retrying. Let us know if you are still running into this issue.

instabytemedia commented 2 years ago

same here

BlockchainDataMiner commented 2 years ago

I've had the same error :

Unhandled Runtime Error
TypeError: Network request failed

Call Stack
XMLHttpRequest.xhr.onerror
../../node_modules/@solana/web3.js/lib/index.browser.esm.js (4437:0)
XMLHttpRequest.sentryWrapped
https://browser.sentry-cdn.com/5.4.0/bundle.min.js (2:38177)
Farjmand commented 2 years ago

I've had the same error :

Unhandled Runtime Error
TypeError: Network request failed

Call Stack
XMLHttpRequest.xhr.onerror
../../node_modules/@solana/web3.js/lib/index.browser.esm.js (4437:0)
XMLHttpRequest.sentryWrapped
https://browser.sentry-cdn.com/5.4.0/bundle.min.js (2:38177)

Any update on this issue?

maksimonishchenko commented 2 years ago

still reproducing localhost windows 10 TypeError: Network request failed

Call Stack xhr.onerror file:///C:/Users/PC/~/metaplex/js/packages/web/.next/static/chunks/src_App_tsx.js (180534:16) XMLHttpRequest.sentryWrapped

k0d3d commented 2 years ago

For me, this happens when this request fails. check your console or network tab

fetch("https://api.metaplex.solana.com/", {
  "headers": {
    "accept": "*/*",
    "accept-language": "en-GB,en-US;q=0.9,en;q=0.8",
    "cache-control": "no-cache",
    "content-type": "application/json",
    "pragma": "no-cache",
    "sec-fetch-dest": "empty",
    "sec-fetch-mode": "cors",
    "sec-fetch-site": "cross-site",
    "sec-gpc": "1"
  },
  "referrer": "http://localhost:3000/",
  "referrerPolicy": "strict-origin-when-cross-origin",
  "body": "{\"method\":\"getProgramAccounts\",\"jsonrpc\":\"2.0\",\"params\":[\"p1exdMJcjVao65QdewkaZRUnU6VPSXhus9n2GzWfh98\",{\"encoding\":\"base64\"}],\"id\":\"706ab600-87ab-46e9-954c-6f4276369223\"}",
  "method": "POST",
  "mode": "cors",
  "credentials": "omit"
});
k0d3d commented 2 years ago

I figured out that the mainnet rpc url metaplex provides. Its a bit hardcoded in the code. One hack will be to replace all instances of "api.metaplex.solana.com" with your custom RPC url in the metaplex/js folder.