Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read any data after upgrade to 2 #46

Closed
Panksy opened this issue Apr 15, 2016 · 1 comment
Closed

Cannot read any data after upgrade to 2 #46

Panksy opened this issue Apr 15, 2016 · 1 comment
Labels

Comments

@Panksy
Copy link

Panksy commented Apr 15, 2016

[ArgumentNullException: Array cannot be null.
Parameter name: bytes]
System.Text.Encoding.GetString(Byte[] bytes) +11445618
ShopifySharp.RequestEngine.CheckResponseExceptions(IRestResponse response) +242
ShopifySharp.d__4`1.MoveNext() +471

Code is:
var pages = await new ShopifyPageService(AuthState.ShopName, AuthState.AccessToken).ListAsync();

@nozzlegear
Copy link
Owner

nozzlegear commented Apr 15, 2016

Thanks for the report! I haven't seen this before, it looks like Shopify is returning a completely empty error response rather than a message that could be decoded. I've just pushed a fix with v2.0.1 that should prevent this ArgumentNullException and make the lib throw a ShopifyException instead. That will at least tell you the response received from Shopify.

As for why you're getting an error from Shopify when trying to list pages, I'm not really sure. I re-ran the tests for the ShopifyPageService and they're all passing, so it might help if you load up Fiddler to see what might be going on with your shop.

tests-passing

Edit: Some quick guesses as to why you might be getting an empty response. These are just off the top of my head, there could very well be something else going on:

  • The shop URL isn't actually a Shopify shop.
  • No internet connection.
  • Site is not online and lib received no response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants