opensea-js icon indicating copy to clipboard operation
opensea-js copied to clipboard

CORS Error suddenly on all API calls

Open mwdwrd opened this issue 5 years ago • 27 comments

Suddenly getting CORS Errors when calling createfactorySellOrder on a nextjs/vercel frontend. Worked for a week, didn't change anything, and now doesn't work.

Has anything changed on your server to not allow these requests?

image

mwdwrd avatar Mar 31 '21 21:03 mwdwrd

Localhost works fine.. It's when its on a server that's the problem.

mwdwrd avatar Mar 31 '21 23:03 mwdwrd

Oops, we changed a bunch of CORS settings on our end and our tests failed to catch a corner case - fixing now! should be back to normal in 15 min

alexanderatallah avatar Apr 01 '21 04:04 alexanderatallah

Thansk @alexanderatallah – Much appreciated! I can finally get some sleep 💯

mwdwrd avatar Apr 01 '21 05:04 mwdwrd

Can confirm now working @alexanderatallah. Thanks for the quick responses.

mwdwrd avatar Apr 01 '21 17:04 mwdwrd

@alexanderatallah I'm having issue trying to use the opensea test to access my collection.

Access to XMLHttpRequest at 'https://testnets-api.opensea.io/assets?asset_contract_address=0xF42029DD93A9B20805152b804114380d6acba959&order_direction=asc' from origin 'http://localhost:3001' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. xhr.js:210

   GET https://testnets-api.opensea.io/assets?asset_contract_address=0xF42029DD93A9B20805152b804114380d6acba959&order_direction=asc net::ERR_FAILED 200

dispatchXhrRequest @ xhr.js:210 xhrAdapter @ xhr.js:15 dispatchRequest @ dispatchRequest.js:58 request @ Axios.js:108 Axios. @ Axios.js:129 wrap @ bind.js:9 getMyNfts @ App.js:11 (anonymous) @ App.js:17 invokePassiveEffectCreate @ react-dom.development.js:23487 callCallback @ react-dom.development.js:3945 invokeGuardedCallbackDev @ react-dom.development.js:3994 invokeGuardedCallback @ react-dom.development.js:4056 flushPassiveEffectsImpl @ react-dom.development.js:23574 unstable_runWithPriority @ scheduler.development.js:468 runWithPriority$1 @ react-dom.development.js:11276 flushPassiveEffects @ react-dom.development.js:23447 (anonymous) @ react-dom.development.js:23324 workLoop @ scheduler.development.js:417 flushWork @ scheduler.development.js:390 performWorkUntilDeadline @ scheduler.development.js:157 createError.js:16

   Uncaught (in promise) Error: Network Error
at createError (createError.js:16)
at XMLHttpRequest.handleError (xhr.js:117)

Iroh-Omolola avatar Dec 14 '21 16:12 Iroh-Omolola

Hi Im getting a similar error as well Access to XMLHttpRequest at 'https://testnets-api.opensea.io/assets?asset_contract_address=0x18dA093DC8a3288DdA3A3c3A18973eA17cb48943' from origin 'https://paik1.github.io' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

paik1 avatar Dec 15 '21 13:12 paik1

Having issue Access to fetch at 'https://testnets-api.opensea.io/assets?asset_contract_address=0xdadd397c13b5a74566E939754CAaFd6E8aF7eCd0&order_direction=asc' from origin 'https://61d7c46bd5dcaf94494ca0a4--nft-toast.netlify.app' 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.

HomemadeToast57 avatar Jan 07 '22 04:01 HomemadeToast57

I'm getting the same issue using api.opensea.io. Making API calls works fine on localhost, but as soon as I deploy to a server I get the same has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. error. What are we missing here?

Haugen avatar Jan 13 '22 04:01 Haugen

I'm getting the same issue using api.opensea.io. Making API calls works fine on localhost, but as soon as I deploy to a server I get the same has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. error. What are we missing here?

I made a new issue that is currently open (this one is closed). Feel free to comment on that one. :) Link: https://github.com/ProjectOpenSea/opensea-js/issues/323

HomemadeToast57 avatar Jan 13 '22 19:01 HomemadeToast57

I have the same issue today Access to fetch at 'https://api.opensea.io/wyvern/v1/orders/post/' from origin 'https://mydomain.vercel.app' 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.

Please help @alexanderatallah

huyredfox avatar Jan 20 '22 11:01 huyredfox

CORS issues happening again

oveddan avatar Jan 20 '22 16:01 oveddan

please watchout for cors. it's really a pain.

rapendivya avatar Jan 20 '22 18:01 rapendivya

CORS issue happening again on API doc page. https://docs.opensea.io/reference/getting-assets

swdreams avatar Jan 27 '22 21:01 swdreams

It's happening again :(

stanleynguyen avatar Feb 01 '22 16:02 stanleynguyen

Man.. how hard is it for a billion dollar company to manage like 7 endpoints..

traderkeo avatar Feb 01 '22 16:02 traderkeo

Having this same problem. Plz OpenSea add CORS policy for docs.opensea.io. 😭

afrotonder avatar Feb 01 '22 22:02 afrotonder

Access to XMLHttpRequest at 'https://testnets-api.opensea.io/assets?asset_contract_address=0xb94e6bF1248F9fF9eb15A6B74d7008170de61E0a&order_direction=asc' from origin 'https://hardcore-nobel-a232a2.netlify.app' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I am also facing the CORS error.

ElamuruganGR avatar Feb 04 '22 17:02 ElamuruganGR

CORS error is still present :(

adamPatrick12 avatar Feb 04 '22 17:02 adamPatrick12

This issue started happening in our project as well.

I'm just dropping in to see if there is something we can do about this or do we need to wait until OS fixes this?

@alexanderatallah , is this something on OpenSea side or do we need to do womething on our side?

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.opensea.io/api/v1/assets?...

MagusVeles avatar Feb 05 '22 19:02 MagusVeles

This issue needs to be reopened.

chrisco512 avatar Feb 08 '22 10:02 chrisco512