Code Monkey home page Code Monkey logo

Comments (8)

fakkio avatar fakkio commented on May 29, 2024 1

@skydiver I think so, they must have changed CORS policy for some reason. Unfortunately, my back end is in C#, and I cannot use this library, neither I found one for that language.
For the moment I'll use https://cors-anywhere.herokuapp.com/ and then I'll decide what to do.
Thank you, I think we can close here.

from ewelink-api.

ttz642 avatar ttz642 commented on May 29, 2024

What function call was this returned by?

I'm guessing the server was down.

Generic HTML definition of error 503:

The 503 Service Unavailable error is an HTTP status code that means the website's server is simply not available right now. Most of the time, it occurs because the server is too busy or because there's maintenance being performed on it.

from ewelink-api.

fakkio avatar fakkio commented on May 29, 2024

yes, I thought so, but I still get that error for days.
I'm simply doing this, in a react hook:

React.useEffect(() => {
  const newConnection = new ewelink({
    email: "<myEmail>",
    password: "<myPass>",
    region: "eu"
  });
  newConnection.login();
  setConnection(newConnection);
}, []);

All this worked until few days ago.
Thanks,
Fakkio.

from ewelink-api.

skydiver avatar skydiver commented on May 29, 2024

@fakkio probably your browser is blocking the request to a different domain
try with a simple node script to confirm is not the server or your credentials

from ewelink-api.

fakkio avatar fakkio commented on May 29, 2024

Ok, i'll try with a node script. I don't get why this did work until few days ago.

from ewelink-api.

fakkio avatar fakkio commented on May 29, 2024

Hi, I confirm: in node it works like a charm! Any idea what can I do to make it work in the browser?

from ewelink-api.

skydiver avatar skydiver commented on May 29, 2024

@fakkio not sure if ewelink changed his CORS policy/config in the last few days or what ...
you can always make the requests to ewelink servers through your backend where CORS will not be a problem

from ewelink-api.

DatStorm avatar DatStorm commented on May 29, 2024

@fakkio how did you do that? Have the same problem in my react application.

from ewelink-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.