OpenGraphParser icon indicating copy to clipboard operation
OpenGraphParser copied to clipboard

Hang (never calls onPostResponse or onError)

Open singpolyma opened this issue 2 years ago • 5 comments
trafficstars

Describe the bug Trying to parse with URL https://www2.hm.com/en_ca/productpage.1101542003.html I never get a call to either of onPostResponse or onError and my app hangs.

Expected behavior Should always call one or the other.

singpolyma avatar Sep 18 '23 23:09 singpolyma

Hello @singpolyma What configuration did you use for OGP, I tried the same link and got a successful response

Thanks

pknotfound avatar Sep 19 '23 01:09 pknotfound

Hmm. This is my code: https://git.singpolyma.net/cheogram-android/tree/master/item/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java#L1828

singpolyma avatar Sep 19 '23 01:09 singpolyma

Hello @singpolyma First, if you increase the max body size and timeout you should get a response (check README to see how they are specified).

In case you do not want to change the values and get error message thrown, you need showNullOnEmpty to be true in that case as the empty response is taken to be null

Let me know how it works out

Thanks

pknotfound avatar Sep 19 '23 01:09 pknotfound

yes, setting showNullOnEmpty to true fixes it. Is it intended that a null result with that set to false will simply call neither callback?

singpolyma avatar Sep 19 '23 03:09 singpolyma

No this is not ideal.

I shall fix this and release an update.

Thanks

pknotfound avatar Sep 19 '23 03:09 pknotfound