Open brobles82 opened 2 years ago
Using nextjs and remixjs the hooks from useMoralis can not connect to the server because throws XMLHttpRequest CORS policy on local development.
Restcontroller XMLHttpRequest CORS policy: Cross origin requests from RestContorller.js line 302 xhr.send(data);
xhr.send(data);
React hooks work in local development for nextjs and remixjs
"crypto-browserify": "^3.12.0", "https-browserify": "^1.0.0", "moralis": "^1.3.2", "moralis-v1": "^1.11.0", "os-browserify": "^0.3.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-moralis": "^1.4.2", "react-scripts": "4.0.0", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "web3uikit": "^0.1.75"
Client
^1.4.2
^1.3.2
Montesory
any
Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime net::ERR_FAILED dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 run @ Cloud.js:172 run @ Cloud.js:98 (anonymous) @ createSigningData.js:42 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 _createSigningData @ createSigningData.js:67 createSigningData @ createSigningData.js:29 (anonymous) @ MoralisWeb3.js:654 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 run @ Cloud.js:172 run @ Cloud.js:98 (anonymous) @ createSigningData.js:42 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 _createSigningData @ createSigningData.js:67 createSigningData @ createSigningData.js:29 (anonymous) @ MoralisWeb3.js:654 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 run @ Cloud.js:172 run @ Cloud.js:98 (anonymous) @ createSigningData.js:42 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 _createSigningData @ createSigningData.js:67 createSigningData @ createSigningData.js:29 (anonymous) @ MoralisWeb3.js:654 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 run @ Cloud.js:172 run @ Cloud.js:98 (anonymous) @ createSigningData.js:42 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 _createSigningData @ createSigningData.js:67 createSigningData @ createSigningData.js:29 (anonymous) @ MoralisWeb3.js:654 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 run @ Cloud.js:172 run @ Cloud.js:98 (anonymous) @ createSigningData.js:42 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 _createSigningData @ createSigningData.js:67 createSigningData @ createSigningData.js:29 (anonymous) @ MoralisWeb3.js:654 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/users net::ERR_FAILED dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 task @ ParseObject.js:3631 value @ TaskQueue.js:47 enqueueTask @ SingleInstanceStateController.js:289 save @ ParseObject.js:3644 (anonymous) @ ParseObject.js:2007 Promise.then (async) value @ ParseObject.js:2006 value @ ParseUser.js:687 linkWith @ ParseUser.js:1760 value @ ParseUser.js:219 value @ ParseUser.js:1094 (anonymous) @ MoralisWeb3.js:688 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/users net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 task @ ParseObject.js:3631 value @ TaskQueue.js:47 enqueueTask @ SingleInstanceStateController.js:289 save @ ParseObject.js:3644 (anonymous) @ ParseObject.js:2007 Promise.then (async) value @ ParseObject.js:2006 value @ ParseUser.js:687 linkWith @ ParseUser.js:1760 value @ ParseUser.js:219 value @ ParseUser.js:1094 (anonymous) @ MoralisWeb3.js:688 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/users net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 task @ ParseObject.js:3631 value @ TaskQueue.js:47 enqueueTask @ SingleInstanceStateController.js:289 save @ ParseObject.js:3644 (anonymous) @ ParseObject.js:2007 Promise.then (async) value @ ParseObject.js:2006 value @ ParseUser.js:687 linkWith @ ParseUser.js:1760 value @ ParseUser.js:219 value @ ParseUser.js:1094 (anonymous) @ MoralisWeb3.js:688 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/users net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 task @ ParseObject.js:3631 value @ TaskQueue.js:47 enqueueTask @ SingleInstanceStateController.js:289 save @ ParseObject.js:3644 (anonymous) @ ParseObject.js:2007 Promise.then (async) value @ ParseObject.js:2006 value @ ParseUser.js:687 linkWith @ ParseUser.js:1760 value @ ParseUser.js:219 value @ ParseUser.js:1094 (anonymous) @ MoralisWeb3.js:688 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 __awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. index.tsx:36 logged in user: undefined index.tsx:40 TypeError: Cannot read properties of undefined (reading 'get') at index.tsx:37:29 at async login (index.tsx:34:7)
New Bug Report
Checklist
Issue Description
Using nextjs and remixjs the hooks from useMoralis can not connect to the server because throws XMLHttpRequest CORS policy on local development.
Steps + code to reproduce
Actual Outcome
Restcontroller XMLHttpRequest CORS policy: Cross origin requests from RestContorller.js line 302
xhr.send(data);
Expected Outcome
React hooks work in local development for nextjs and remixjs
Environment
"crypto-browserify": "^3.12.0", "https-browserify": "^1.0.0", "moralis": "^1.3.2", "moralis-v1": "^1.11.0", "os-browserify": "^0.3.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-moralis": "^1.4.2", "react-scripts": "4.0.0", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "web3uikit": "^0.1.75"
Client
^1.4.2
^1.3.2
Montesory
any
Logs
Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime net::ERR_FAILED dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 run @ Cloud.js:172 run @ Cloud.js:98 (anonymous) @ createSigningData.js:42 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 _createSigningData @ createSigningData.js:67 createSigningData @ createSigningData.js:29 (anonymous) @ MoralisWeb3.js:654 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 run @ Cloud.js:172 run @ Cloud.js:98 (anonymous) @ createSigningData.js:42 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 _createSigningData @ createSigningData.js:67 createSigningData @ createSigningData.js:29 (anonymous) @ MoralisWeb3.js:654 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 run @ Cloud.js:172 run @ Cloud.js:98 (anonymous) @ createSigningData.js:42 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 _createSigningData @ createSigningData.js:67 createSigningData @ createSigningData.js:29 (anonymous) @ MoralisWeb3.js:654 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 run @ Cloud.js:172 run @ Cloud.js:98 (anonymous) @ createSigningData.js:42 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 _createSigningData @ createSigningData.js:67 createSigningData @ createSigningData.js:29 (anonymous) @ MoralisWeb3.js:654 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/functions/getServerTime net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 run @ Cloud.js:172 run @ Cloud.js:98 (anonymous) @ createSigningData.js:42 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 _createSigningData @ createSigningData.js:67 createSigningData @ createSigningData.js:29 (anonymous) @ MoralisWeb3.js:654 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/users net::ERR_FAILED dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 task @ ParseObject.js:3631 value @ TaskQueue.js:47 enqueueTask @ SingleInstanceStateController.js:289 save @ ParseObject.js:3644 (anonymous) @ ParseObject.js:2007 Promise.then (async) value @ ParseObject.js:2006 value @ ParseUser.js:687 linkWith @ ParseUser.js:1760 value @ ParseUser.js:219 value @ ParseUser.js:1094 (anonymous) @ MoralisWeb3.js:688 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/users net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 task @ ParseObject.js:3631 value @ TaskQueue.js:47 enqueueTask @ SingleInstanceStateController.js:289 save @ ParseObject.js:3644 (anonymous) @ ParseObject.js:2007 Promise.then (async) value @ ParseObject.js:2006 value @ ParseUser.js:687 linkWith @ ParseUser.js:1760 value @ ParseUser.js:219 value @ ParseUser.js:1094 (anonymous) @ MoralisWeb3.js:688 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/users net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 task @ ParseObject.js:3631 value @ TaskQueue.js:47 enqueueTask @ SingleInstanceStateController.js:289 save @ ParseObject.js:3644 (anonymous) @ ParseObject.js:2007 Promise.then (async) value @ ParseObject.js:2006 value @ ParseUser.js:687 linkWith @ ParseUser.js:1760 value @ ParseUser.js:219 value @ ParseUser.js:1094 (anonymous) @ MoralisWeb3.js:688 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. RESTController.js:302 POST yhttps://qflwv43khijj.usemoralis.com:2053/server/users net::ERR_FAILED dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 setTimeout (async) xhr.onreadystatechange @ RESTController.js:221 XMLHttpRequest.send (async) dispatch2 @ RESTController.js:302 ajax @ RESTController.js:309 (anonymous) @ RESTController.js:416 Promise.then (async) request @ RESTController.js:410 task @ ParseObject.js:3631 value @ TaskQueue.js:47 enqueueTask @ SingleInstanceStateController.js:289 save @ ParseObject.js:3644 (anonymous) @ ParseObject.js:2007 Promise.then (async) value @ ParseObject.js:2006 value @ ParseUser.js:687 linkWith @ ParseUser.js:1760 value @ ParseUser.js:219 value @ ParseUser.js:1094 (anonymous) @ MoralisWeb3.js:688 tryCatch @ runtime.js:63 invoke @ runtime.js:294 (anonymous) @ runtime.js:119 asyncGeneratorStep @ asyncToGenerator.js:5 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 Promise.then (async) asyncGeneratorStep @ asyncToGenerator.js:15 _next @ asyncToGenerator.js:27 (anonymous) @ asyncToGenerator.js:34 Wrapper @ export.js:18 (anonymous) @ asyncToGenerator.js:23 (anonymous) @ MoralisWeb3.js:724 (anonymous) @ _useMoralisAuth.ts:153 step @ tslib.es6.js:102 (anonymous) @ tslib.es6.js:83 (anonymous) @ tslib.es6.js:76 __awaiter17 @ tslib.es6.js:72 (anonymous) @ _useMoralisAuth.ts:141 login @ index.tsx:34 callCallback2 @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 (anonymous) @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 localhost/:1 Access to XMLHttpRequest at 'yhttps://qflwv43khijj.usemoralis.com:2053/server/users' from origin 'http://localhost:3000' has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, chrome-untrusted, https. index.tsx:36 logged in user: undefined index.tsx:40 TypeError: Cannot read properties of undefined (reading 'get') at index.tsx:37:29 at async login (index.tsx:34:7)