Priyansh-Kedia / OpenGraphParser

Open Graph Parser for Android
MIT License
85 stars 15 forks source link

Hang (never calls onPostResponse or onError) #27

Open singpolyma opened 11 months ago

singpolyma commented 11 months ago

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.

Priyansh-Kedia commented 11 months ago

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

Thanks

singpolyma commented 11 months ago

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

Priyansh-Kedia commented 11 months ago

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

singpolyma commented 11 months ago

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

Priyansh-Kedia commented 11 months ago

No this is not ideal.

I shall fix this and release an update.

Thanks