Can't log in to my weweb app as ANY user!

Hi. Trying to log into my unpublished weweb app, and it won’t let me log in. Nor can I log in as any user in my app. This has never happened before. I relaunched the editor, refreshed data, etc… but can’t test my screens, cause many of them require user authentication. Does anyone know if there’s an issue with weweb??

Hi @fredo22 :wave:

If you go to the login page of your app inside the WeWeb editor, add login credentials in preview mode and test the login action, do you get an error?

Here’s an article on debugging workflows that will help you see the error message returned by your backend if there is one.

Thanks Joyce. I deleted my login element (and its variables), and added a New Login Element. The workflow on the form container is “Login with Xano”. When I test this workflow step in WeWeb, I get this message. I’m entering the correct email and password. This happens regardless of which user I try to sign in as. Stumped as to why I’m getting this error. Current value for accessToken and user are both Null, and the isAuthenticated Boolean is currently False. Any suggestions?

Any suggestions @Broberto ?

Sup Fredo, could you send us the response data? you have it right there. There might be some clues about what’s wrong.

“Error: Request failed with status code 404 at e.exports (https://editor-cdn.weweb.io/public/js/chunk-vendors.c5b4dd71.js:1:120680) at e.exports (https://editor-cdn.weweb.io/public/js/chunk-vendors.c5b4dd71.js:1:123139) at XMLHttpRequest.w (https://editor-cdn.weweb.io/public/js/chunk-vendors.c5b4dd71.js:1:115226)”

function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}

Is that the content of this?

1 Like

Hi @fredo22 :wave:

As @Broberto said, it’s hard for us to help if you share the error code without the response.

Please take the time to review the article I shared earlier: Debugging workflows | WeWeb documentation

It will walk you through how to debug a workflow step by step, including where to find the response from the API to learn more about what the status code means and what may be going wrong.

  • name: “Error”

stack: “Error: Request failed with status code 404 at e.exports (https://editor-cdn.weweb.io/public/js/chunk-vendors.c5b4dd71.js:1:120680) at e.exports (https://editor-cdn.weweb.io/public/js/chunk-vendors.c5b4dd71.js:1:123139) at XMLHttpRequest.w (https://editor-cdn.weweb.io/public/js/chunk-vendors.c5b4dd71.js:1:115226)”

message: “Request failed with status code 404”

isAxiosError: true

toJSON: function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}

configObject

requestObject

response

status: 404

statusText: “”

data

code: “ERROR_CODE_NOT_FOUND”

message: “Unable to locate request.”

headers

cache-control: “private, no-cache, no-store, must-revalidate”

content-type: “application/json; charset=UTF-8”

expires: “Mon, 18 Nov 2013 17:02:17 GMT”

pragma: “no-cache”

config

adapter: function(e){return new Promise((function(t,i){var p,g=e.data,f=e.headers,m=e.responseType;function A(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener(“abort”,p)}n.isFormData(g)&&delete f[“Content-Type”];var =new XMLHttpRequest;if(e.auth){var v=e.auth.username||“”,y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):“”;f.Authorization=“Basic “+btoa(v+”:”+y)}var b=a(e.baseURL,e.url);function w(){if(){var n="getAllResponseHeaders"in ?l(.getAllResponseHeaders()):null,s=m&&“text”!==m&&“json”!==m?.response:.responseText,o={data:s,status:.status,statusText:.statusText,headers:n,config:e,request:};r((function(e){t(e),A()}),(function(e){i(e),A()}),o),=null}}if(.open(e.method.toUpperCase(),o(b,e.params,e.paramsSerializer),!0),.timeout=e.timeout,"onloadend"in ?.onloadend=w:.onreadystatechange=function(){&&4===.readyState&&(0!==.status||.responseURL&&0===.responseURL.indexOf(“file:”))&&setTimeout(w)},.onabort=function(){&&(i(c(“Request aborted”,e,“ECONNABORTED”,)),=null)},.onerror=function(){i(c(“Network Error”,e,null,)),=null},.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+“ms exceeded”:“timeout exceeded”,n=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(c(t,e,n.clarifyTimeoutError?“ETIMEDOUT”:“ECONNABORTED”,)),=null},n.isStandardBrowserEnv()){var C=(e.withCredentials||u(b))&&e.xsrfCookieName?s.read(e.xsrfCookieName):void 0;C&&(f[e.xsrfHeaderName]=C)}"setRequestHeader"in &&n.forEach(f,(function(e,t){“undefined”===typeof g&&“content-type”===t.toLowerCase()?delete f[t]:.setRequestHeader(t,e)})),n.isUndefined(e.withCredentials)||(.withCredentials=!!e.withCredentials),m&&“json”!==m&&(.responseType=e.responseType),“function”===typeof e.onDownloadProgress&&.addEventListener(“progress”,e.onDownloadProgress),“function”===typeof e.onUploadProgress&&.upload&&.upload.addEventListener(“progress”,e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){&&(i(!e||e&&e.type?new h(“canceled”):e),.abort(),=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener(“abort”,p))),g||(g=null),_.send(g)}))}

timeout: 0

xsrfCookieName: “XSRF-TOKEN”

xsrfHeaderName: “X-XSRF-TOKEN”

maxContentLength: -1

maxBodyLength: -1

validateStatus: function(e){return e>=200&&e<300}

method: “post”

data: “{“email”:“fred@baller.run”,“password”:“fredo1”}”

params: null

url: “https://x8ki-letl-twmt.n7.xano.io/api:Pfq8Qnqu/auth/login

transitional

silentJSONParsing: true

forcedJSONParsing: true

clarifyTimeoutError: false

transformRequest

0: function(e,t){return r(t,“Accept”),r(t,“Content-Type”),n.isFormData(e)||n.isArrayBuffer(e)||n.isBuffer(e)||n.isStream(e)||n.isFile(e)||n.isBlob(e)?e:n.isArrayBufferView(e)?e.buffer:n.isURLSearchParams(e)?(l(t,“application/x-www-form-urlencoded;charset=utf-8”),e.toString()):n.isObject(e)||t&&“application/json”===t[“Content-Type”]?(l(t,“application/json”),c(e)):e}

transformResponse

0: function(e){var t=this.transitional||d.transitional,i=t&&t.silentJSONParsing,r=t&&t.forcedJSONParsing,o=!i&&“json”===this.responseType;if(o||r&&n.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(o){if(“SyntaxError”===a.name)throw s(a,this,“E_JSON_PARSE”);throw a}}return e}

headers

Accept: “application/json, text/plain, /

Content-Type: “application/json”

request

onreadystatechange: null

readyState: 4

timeout: 0

withCredentials: false

responseURL: “https://x8ki-letl-twmt.n7.xano.io/api:Pfq8Qnqu/auth/login

status: 404

statusText: “”

responseType: “”

response: “{“code”:“ERROR_CODE_NOT_FOUND”,“message”:“Unable to locate request.”}”

responseText: “{“code”:“ERROR_CODE_NOT_FOUND”,“message”:“Unable to locate request.”}”

responseXML: null

UNSENT: 0

OPENED: 1

HEADERS_RECEIVED: 2

LOADING: 3

DONE: 4

abort: function abort() { [native code] }

getAllResponseHeaders: function getAllResponseHeaders() { [native code] }

getResponseHeader: function getResponseHeader() { [native code] }

open: function open() { [native code] }

overrideMimeType: function overrideMimeType() { [native code] }

send: function send() { [native code] }

setRequestHeader: function setRequestHeader() { [native code] }

onloadstart: null

onprogress: null

onabort: function(){&&(i(c(“Request aborted”,e,“ECONNABORTED”,)),_=null)}

onerror: function(){i(c(“Network Error”,e,null,)),=null}

onload: null

ontimeout: function(){var t=e.timeout?"timeout of "+e.timeout+“ms exceeded”:“timeout exceeded”,n=e.transitional||d;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),i(c(t,e,n.clarifyTimeoutError?“ETIMEDOUT”:“ECONNABORTED”,)),=null}

onloadend: function w(){if(){var n="getAllResponseHeaders"in ?l(.getAllResponseHeaders()):null,s=m&&“text”!==m&&“json”!==m?.response:.responseText,o={data:s,status:.status,statusText:.statusText,headers:n,config:e,request:};r((function(e){t(e),A()}),(function(e){i(e),A()}),o),_=null}}

addEventListener: function addEventListener() { [native code] }

dispatchEvent: function dispatchEvent() { [native code] }

removeEventListener: function removeEventListener() { [native code] }

uploadObject

12:02:17 PM

This suggest to me that your endpoint no longer exists in Xano:

  • 404 means “the server cannot find the requested resource” (similar to a page URL that doesn’t exist, the endpoint URL may not exist)
  • Xano is telling you they are unable to locate the request

In Xano, you might want to check your API group base URL to make sure it matches the instance and API group you selected in WeWeb:

Aha! thanks Joyce. Yesterday I reorganized. my Xano API’s into new folders. Makes sense - The Weweb collections have the wrong paths!

Thanks so much!

1 Like