Edit event handler from market place?

I’m getting reports from my users that they are getting a “network error” message when trying to log in. I do not see an error like that in any of my logs. I want to look at where the “network error” message gets set, which I think is in an event handler.

Can I look at the code for these somewhere? I tried in the coding section under JS and don’t see anything -

Thanks,
Tim

Hi, @Tim_Jones

At this moment, there is no opportunity to see the code of the products from the marketplace. Are you (your users) experience an issue when handlers are disabled? How we can reproduse the issue? What product should be installed?

Regards,
Marina

Hi Marina,

Thanks for the information that it is not possible to see the code.

If I disable the handlers, I don’t think login will work at all. I don’t know how to reproduce the issue, but we’ve been getting reports from users about this error intermittently since we launched.

Is the “network error” message a generic message that gets thrown? This entire login process is, I believe, an out-of-the-box feature we used from you. I didn’t build this part of the app so I can’t say for certain.

Tim

Is this error shown in the logs?

Is the “network error” message a generic message that gets thrown?

Yes, I think so. But this error could occur in many situations, and most of them are not related to Backendless.

I could offer you to check the logs, and share a part of the code where it happens(if logs with errors exist). And after that, we could move on.

Regards, Dima.

Hi @Dima,

I received two reports from customers having trouble logging in because of a “network error” yesterday, but I don’t see anything in the logs.

However, we’ve also had issues (end of September) where “network error” did show up in the logs. I don’t have a satisfactory understanding of why someone would get “network error” so I don’t know how to help my customer service team when someone reaches out with that issue.

That is why I wanted to see what conditions would result in someone seeing that message.

Tim

As I said earlier there are many options why that could happen. So we must find steps to reproduce that issue. Could you ask your customers to share an error that they have?

If it is some client error - no wonder why don’t sow them at logs.
Also, if it happens with login - there are could be a Twillio error.

Regards, Dima.

In all cases, the users were trying to login and they’re getting this message (this is a screenshot from the user) -

We don’t use a text message login (that I’m aware of) so it shouldn’t relate to Twilio.

To me, it looks like an error is handled in your app’s logic and displayed in your app. This makes me wonder - what does it have to do with an event handler from marketplace?

Fair point @mark-piller. I can’t find anywhere in the login process that includes “Network error” as an error message. I only kind of understand event handlers, but since they have to do with the login process it seemed like a good place to dig around.

If the “Network error” isn’t coming from the event handler, is it coming out of the “Login user” block?

Hi @Tim_Jones

generally, the Network error comes from the client side when the browser is not able to send/finish a request

is there any way to see the error in the browser dev tool (Network section)?

Hi @vladimir-upirov

I cannot replicate the issue and am getting customer emails after the fact. The people getting the error are not very computer savvy, so I don’t think I could get them to get to dev tools.

What would cause the client browser to be unable to send/finish a request?

Tim

Hello @Tim_Jones

What would cause the client browser to be unable to send/finish a request?

There was no internet access at the time of the requestfor example.

Without steps to reproduce, it’s hard for us to figure out what the problem is.

Regards

Around the same time, two users reported getting network errors when trying to login. The steps would simply be:

  1. Open a browser to portal.meadowfarms.com
  2. Enter username and password
  3. Receive network error message

I don’t know more than that, but two users around the same time made me think it wasn’t something with them. I want to troubleshoot this but everything is a black box it seems.

Tim

We are really sorry but we are not able to investigate the issue without seeing the error log.

The “network error” comes from the client, so I believe it’s not related to the CloudCode. In our BackendlessRequest library which is used in the UI-Builder the error appears here

as you can see it’s only for ClientRequest, so it can not come from the CloudCode (Nodejs)

In addition, the error might happen by several reason, but in common it means the client is not able to finish the request, for example I’ve created a simple html to demonstrate the error:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>

  <script src="https://unpkg.com/backendless-request@latest/dist/backendless-request.js"></script>
  <script>

    async function run() {
      await BackendlessRequest.get('https://somewhere.org/i-dont-exist')
    }

    run()
      .catch(e => {
        console.log('Error:', e.message)
        console.log({ e })
      })
  </script>
</head>
<body>

</body>
</html>

as a result we receive the same “Network Error” and in the log we can see what’s the problem

I just open the FormSubmit logic on the authSignup page and it looks different as you shared here

there is a logic to add a new user and then log in it if possible, so there a couple of requests to the server, can you add some text to identify in the UI what exactly request was failed

@vladimir-upirov, the code I shared is from authLogin. That is where folks are having trouble.

Why would a client not be able to finish the request? In your example, you’re calling something that doesn’t exist, so it can’t be complete. How would that be happening in my code that is working? If they’re requesting a connection to something that doesn’t respond, that seems like an issue with the service?

Perhaps related, someone received this message -

There is a consistency in “network errors” from customers having trouble. I can’t see how many different customers are all having client-side issues. Or we need to handle the errors better, which I am not clear on how to do since you’re saying it is all the client.

TIm

@Tim_Jones to be able to resolve this issue, we need to have steps to reproduce it. Please reach out to a customer who experiences the problem and see if you can capture specific steps reproducing the problem. Only after that, we can look into it. Without being able to reproduce it, we will be going in circles.

Regards,
Mark

Sorry for the slow reply, I had to find a friendly customer to help me troubleshoot this. Plus, we had some other fires.

The logon network error I was finally able to replicate in iOS Safari.

Steps (only works if you haven’t been to our site before):

In summary, it doesn’t seem like Safari (and maybe other browsers) are not getting redirected to https. I thought this was done automatically, but maybe not. I’m not sure what the best way to fix this is.

Tim

I was also able to replicate this in Win10 Edge Version 106.0.1370.47 (says it is up to date) -

The CORS policy violation makes sense. I’m surprised to see magicaljelly being referenced.

Tim

What do you have configured here in UI Builder?

I bet it is magicaljelly. Change to your domain and republish the UI container.