Comments (11)
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.
@ebisbe, thank you for your bug report! Hit me up at [email protected] so we can send you something :)
from flickr-sdk.
@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.
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.
@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.
@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.
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.
from flickr-sdk.
@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.
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.
@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)
- Ampersands in API content
- Unable to subscribe to a topic HOT 1
- Migration guide from flickrapi HOT 1
- Error when passing Buffer as file argument to Upload
- ./examples/oauth.js "Secure Connection Failed" HOT 1
- Intermitten issues permissions
- flickr.people.getGroups with perPage and Page HOT 1
- Hitting 413 (Request Too Large) error on flickr.photosets.editPhotos HOT 3
- Which API do I call to add an album (photoset) to a collection ?
- Usage with WebCrypto instead of node's crypto HOT 1
- Suggestion to improve Flickr.Upload
- Add a license_id argument to file upload
- Flickr.Upload superagent buffer config
- Please add photoset_id to flickr.photos.search
- Add user-agent HOT 4
- Please upgrade xml2js to 0.5.0 HOT 1
- Missing single quote in ts definition HOT 1
- CORS preflight fails because of custom user-agent header HOT 2
- 7.0.0-beta.2: issue finding typescript types HOT 5
- Why there are private actions only available for Flickr? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flickr-sdk.