opened
ebisbe
username_0
After adding **.unset('X-Flickr-API-Method')** I got the following error: 
**Error: Parser is unable to parse the response**
I've reviwed the code and the error occurs on line 6220 from flickr-sdk.js
Rest api not working in Browser
issue
created
jeremyruppel
username_1
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](https://github.com/flickr/flickr-sdk/pull/64/files#r139765795), [flickr-sdk@3.3.0](https://www.npmjs.com/package/flickr-sdk) 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!
comment
closed
jeremyruppel
username_1
issue
created
ebisbe
username_0
@username_1 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
comment
created
ebisbe
username_0
@pdokas @username_1 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.
comment
reopened
jeremyruppel
username_1
After adding **.unset('X-Flickr-API-Method')** I got the following error: 
**Error: Parser is unable to parse the response**
I've reviwed the code and the error occurs on line 6220 from flickr-sdk.js
Rest api not working in Browser
issue
closed
jeremyruppel
username_1
issue
created
jeremyruppel
username_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](https://github.com/flickr/flickr-sdk/releases/tag/v3.4.0) with a fix for that. Can you try that out and let me know if it fixes things for you?
comment
created
superic
username_2
@username_0, thank you for your bug report! Hit me up at eric@flickr.com so we can send you something :)
comment
created
ebisbe
username_0
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.
comment
created
ebisbe
username_0
@username_1 @username_2
comment
created
jeremyruppel
username_1
@username_0 hm, that's definitely a weird error. I just cut a [v3.5.0](https://github.com/flickr/flickr-sdk/releases/tag/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.
comment
created
ebisbe
username_0
@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
comment
created
jeremyruppel
username_1
@baohouse @username_0 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.
comment