nicolasgomollon/AppSales-Mobile

Crash when downloading reviews

Closed this issue · 6 comments

The app crashed when I try to download reviews.
Here is the debugger report :
2020-03-21 18:33:05.746806+0100 AppSalesMobile[15999:6004788] Connection 4: received failure notification
2020-03-21 18:33:05.746987+0100 AppSalesMobile[15999:6004788] Connection 4: failed to connect 12:8, reason -1
2020-03-21 18:33:05.747080+0100 AppSalesMobile[15999:6004788] Connection 4: encountered error(12:8)
2020-03-21 18:33:05.753945+0100 AppSalesMobile[15999:6004788] Task .<0> HTTP load failed, 0/0 bytes (error code: -1003 [12:8])
2020-03-21 18:33:05.754596+0100 AppSalesMobile[15999:6004788] NSURLConnection finished with error - code -1003
2020-03-21 18:33:07.148084+0100 AppSalesMobile[15999:6004569] -[NSNull objectForKeyedSubscript:]: unrecognized selector sent to instance 0x1e465bc30
2020-03-21 18:33:07.150207+0100 AppSalesMobile[15999:6004569] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull objectForKeyedSubscript:]: unrecognized selector sent to instance 0x1e465bc30'
*** First throw call stack:
(0x1a7776a48 0x1a749dfa4 0x1a767a5a8 0x1a777aaf4 0x1a777ca7c 0x102a30af8 0x102a2fcb4 0x102bad7fc 0x102baebd8 0x102bbcc34 0x1a76f45e4 0x1a76ef5d8 0x1a76eeadc 0x1b168f328 0x1ab7fc63c 0x10298ca24 0x1a7578360)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

To fix the crash go to the class "ReviewDownloadOperation.m" and replace the row 234

"if (devResp != nil) {"

with the following row:

"if (devResp != nil && devResp != (id)[NSNull null]) {"

Hope this helps.

thx works :-)

Works for me, Nicholas pls merge into main code

I have this fixed in my pull request:
ab068b1

This is now fixed as of b1694a3.