[SOLVED] Cannot connect wallet to moralis

everything was working fine i didnt change the code i dont know what is going on here

i keep getting this error

Uncaught (in promise) Error: request is required

its not just my code because i tried other scripts and tutorials this is my code to login

async function login(){
var user = await Moralis.Web3.authenticate();
if(user){
reload();
return;
}
};

you should use Moralis.authenticate, what version of Moralis SDK you have?

i am not sure this is what i have at the top of my script
โ€œhttps://cdnjs.cloudflare.com/ajax/libs/web-socket-js/1.0.0/web_socket.min.jsโ€
โ€œhttps://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.jsโ€
โ€œhttps://unpkg.com/moralis/dist/moralis.jsโ€
*/
note: i created a second moralis server and it works fineโ€ฆ
why would the other server connect but this one wont

I donโ€™t know what is the problem with the other server, you can try to restart/update it

i did try restarting it a moment ago still not working

i could just start working with the second one but i really want to know whats going on here incase this happens but heres my info you can test it i cant log in

const APP_ID = โ€œbSPXuIl7VQBikQmIGnwqxA3P0EgngoslVjMn2eZiโ€;
const SERVER_URL = โ€œhttps://ritnozimmqxq.usemoralis.com:2053/serverโ€;

i was gonna begin working with the second server now that is throwing me errors whats going on

Uncaught (in promise) Error: unauthorized
_construct https://unpkg.com/moralis/dist/moralis.js:28265
Wrapper https://unpkg.com/moralis/dist/moralis.js:28615
_createSuper https://unpkg.com/moralis/dist/moralis.js:11991
ParseError https://unpkg.com/moralis/dist/moralis.js:12042
handleError https://unpkg.com/moralis/dist/moralis.js:25632
promise callbackrequest https://unpkg.com/moralis/dist/moralis.js:25622
task https://unpkg.com/moralis/dist/moralis.js:17745
value https://unpkg.com/moralis/dist/moralis.js:26228
enqueueTask https://unpkg.com/moralis/dist/moralis.js:25944
save https://unpkg.com/moralis/dist/moralis.js:17758
value https://unpkg.com/moralis/dist/moralis.js:16121
promise callback
value https://unpkg.com/moralis/dist/moralis.js:16120
value https://unpkg.com/moralis/dist/moralis.js:23986
linkWith https://unpkg.com/moralis/dist/moralis.js:25055
value https://unpkg.com/moralis/dist/moralis.js:23518
value https://unpkg.com/moralis/dist/moralis.js:24393
_callee4 https://unpkg.com/moralis/dist/moralis.js:5771
tryCatch https://unpkg.com/moralis/dist/moralis.js:44099
invoke https://unpkg.com/moralis/dist/moralis.js:44330
defineIteratorMethods https://unpkg.com/moralis/dist/moralis.js:44155
asyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28197
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callbackasyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callback
asyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callbackasyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callback
asyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callbackasyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callback
asyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
_asyncToGenerator https://unpkg.com/moralis/dist/moralis.js:28226
Wrapper https://unpkg.com/moralis/dist/moralis.js:35622
_asyncToGenerator https://unpkg.com/moralis/dist/moralis.js:28215
value https://unpkg.com/moralis/dist/moralis.js:5807
login http://localhost:8000/profile.html:568
onload http://localhost:8000/profile.html:654
EventHandlerNonNull* http://localhost:8000/profile.html:603

that error can be when the wrong combination of appId serverUrl was provided

what are you doing when you get that error with request is required? on what line from your code you get that error?

lol i forgot to change the server url that time but heres the original problem i have

moralis.js:28265:21

Uncaught (in promise) Error: request is required
_construct https://unpkg.com/moralis/dist/moralis.js:28265
Wrapper https://unpkg.com/moralis/dist/moralis.js:28615
_createSuper https://unpkg.com/moralis/dist/moralis.js:11991
ParseError https://unpkg.com/moralis/dist/moralis.js:12042
handleError https://unpkg.com/moralis/dist/moralis.js:25632
promise callbackrequest https://unpkg.com/moralis/dist/moralis.js:25622
task https://unpkg.com/moralis/dist/moralis.js:17745
value https://unpkg.com/moralis/dist/moralis.js:26228
enqueueTask https://unpkg.com/moralis/dist/moralis.js:25944
save https://unpkg.com/moralis/dist/moralis.js:17758
value https://unpkg.com/moralis/dist/moralis.js:16121
promise callback
value https://unpkg.com/moralis/dist/moralis.js:16120
value https://unpkg.com/moralis/dist/moralis.js:23986
linkWith https://unpkg.com/moralis/dist/moralis.js:25055
value https://unpkg.com/moralis/dist/moralis.js:23518
value https://unpkg.com/moralis/dist/moralis.js:24393
_callee4 https://unpkg.com/moralis/dist/moralis.js:5771
tryCatch https://unpkg.com/moralis/dist/moralis.js:44099
invoke https://unpkg.com/moralis/dist/moralis.js:44330
defineIteratorMethods https://unpkg.com/moralis/dist/moralis.js:44155
asyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28197
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callbackasyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callback
asyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callbackasyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callback
asyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callbackasyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
promise callback
asyncGeneratorStep https://unpkg.com/moralis/dist/moralis.js:28207
_next https://unpkg.com/moralis/dist/moralis.js:28219
_asyncToGenerator https://unpkg.com/moralis/dist/moralis.js:28226
Wrapper https://unpkg.com/moralis/dist/moralis.js:35622
_asyncToGenerator https://unpkg.com/moralis/dist/moralis.js:28215
value https://unpkg.com/moralis/dist/moralis.js:5807
login http://localhost:8000/profile.html:568
onload http://localhost:8000/profile.html:654
EventHandlerNonNull* http://localhost:8000/profile.html:603

what do you do when you get that error?

im not really sure what to do i did nothing to the code and then i tried to use stuff i downloaded from github and put the app id and server url in and i get the same error

i found this tutorial database it was working before now i get the same error as my script

there is a lot of code there

ok here i did on pastebin

this is a metamask demo i downloaded from github from ivan i believe

i put my serverurl and app id and get same error

ok thanks for the help but the problem was on my own i feel like a fool for this 1

i made a column in the class called โ€œrequestโ€

i deleted it im going to rename it

thanks for the help sorry for wasting your time keep up the good work

1 Like