Git Product home page Git Product logo

Comments (11)

jeremyruppel avatar jeremyruppel commented on August 17, 2024 1

Wow, sorry it took so long to get around to this! You're absolutely right, our browser REST client was 100% broken. I just released v3.4.0 with a fix for that. Can you try that out and let me know if it fixes things for you?

from flickr-sdk.

superic avatar superic commented on August 17, 2024 1

@ebisbe, thank you for your bug report! Hit me up at [email protected] so we can send you something :)

from flickr-sdk.

jeremyruppel avatar jeremyruppel commented on August 17, 2024 1

@baohouse @ebisbe thanks again for sticking with this issue. The CORS hint was the crucial thing I think we were missing. I just shipped v3.7.0 that should address the preflight issue. Please let me know if things still aren't working as you'd expect.

from flickr-sdk.

jeremyruppel avatar jeremyruppel commented on August 17, 2024

This error is likely a superagent error since it comes from well within the superagent client code. I did a brief search over the superagent issues and didn't see anything that sounded like this particular issue. If you keep seeing this issue, feel free to reopen this and we'll investigate.

To your original issue, [email protected] is out now and should eliminate the need for you to call unset() in the first place as we've removed the custom header. Please let me know if that fixed your issue or not!

from flickr-sdk.

ebisbe avatar ebisbe commented on August 17, 2024

@jeremyruppel The issue is with the parseFlickr() method. If I delete from _parseBody this condition it works as it should.

if(this.req._parser) {
return this.req._parser(this, str);
}

Inside this if it's callgin parseFlickr

from flickr-sdk.

ebisbe avatar ebisbe commented on August 17, 2024

@pdokas @jeremyruppel I still have this problem.

Uncaught (in promise) Error: Parser is unable to parse the response
    at Request.eval (client.js?a54e:399)
    at Request.Emitter.emit (index.js?ea2f:133)
    at XMLHttpRequest.xhr.onreadystatechange (client.js?a54e:708)

The issue happens as I say in the previous command. I'm trying this in a new project with a fresh installation.

from flickr-sdk.

ebisbe avatar ebisbe commented on August 17, 2024

Hi Again!
I still have some issues related with that. I don't think it's a regression but more an edge case.

Error: Parser is unable to parse the response at Request.eval (client.js?a54e:399) at Request.Emitter.emit (index.js?7aa5:133) at XMLHttpRequest.xhr.onreadystatechange (client.js?a54e:708)

This error pops when I do flickr.groups.pools.getPhotos to a private group from the browser directly ( no keys uses, apart from the app key). The response of the body is correct

{stat: "fail", code: 2, message: "You don't have permission to view this pool"}
But I cannot use the message due to the Parser error.

from flickr-sdk.

ebisbe avatar ebisbe commented on August 17, 2024

@jeremyruppel @superic

from flickr-sdk.

jeremyruppel avatar jeremyruppel commented on August 17, 2024

@ebisbe hm, that's definitely a weird error. I just cut a v3.5.0 release that cleans up some of the response parsing code for the REST API client. Would you mind trying that out and see if that fixes the error? If not, feel free to open up a new GH issue and we'll get to the bottom of it.

from flickr-sdk.

baohouse avatar baohouse commented on August 17, 2024

I wonder how everyone dealt with the CORS OPTIONS preflight. I'm having a browser app (built with webpack) make a call with flickr.interestingness.getList() and it always sends an OPTIONS request, which gives me this error in Chrome browser:

Failed to load https://api.flickr.com/services/rest?method=flickr.interestingness.getList&format=json&nojsoncallback=1&api_key=<API_KEY_REDACTED>: Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.

from flickr-sdk.

ebisbe avatar ebisbe commented on August 17, 2024

@baohouse Theres an error that didn't get solved correctly but I'm using a GraphQL project over Flickr that didn't have this issues so I don't bothered any more on this. The two or three functions that I use directly on the browser works fine for me. Sorry couldn't help

from flickr-sdk.

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.