Cannot open pdf document in native viewer via ionic app

Ionic v4 was able to open pdf document in its native viewer on the device yesterday. Today the same code pops up the document but it closes instantly. This was using plugin fileopener2. Please help us resolve this issue. Thanks in advance. Gif attached to illustrate the problem.