Git-point: Application crashes when user try to open a PDF file

Created on 30 Nov 2017  路  8Comments  路  Source: gitpoint/git-point

On repositories that have any PDF file, if the user try to open (or accidently open) the file, the application crashes.

Steps to Reproduce

  • using Gitpoint, open any repository that contains a .pdf file on files viewer tree.
  • tap on the file, to view it.
  • the app crash.

Environment

  • Android 7.0
  • GitPoint 1.3.1
bug hacktoberfest help wanted

All 8 comments

@reebr Thanks for reporting! Sorry that I opened with a blank view in my iPhone 6P, iOS 11.1, GitPoint 1.3. No crash happened.

@machour Can you take a try to confirm this issue?

I got the same error here (Nexus 5X, Android 8.0) :/

Confirmed. On android the error message is error calling RTCDeviceEventEmitter.emit failed to create Value from Json.

I guess we shouldn't try to render PDF (and other binary files) through <SyntaxHighlighter /> 馃槃

Here's what currently Github provides for files:
screen shot 2017-12-01 at 3 44 42 pm

We could use download_url with react-native-fetch-blob to enable the user to download the file.

We could also implement PDF rendering using https://github.com/wonday/react-native-pdf for example, although I think we should consider something more generic and able to handle more file formats, like https://github.com/philipphecht/react-native-doc-viewer

Hi!
Is this issue still actual?
I can open PDFs from my Xiaomi Mi A1:

android_xiaomi

@olegkorol yes, It still crashing.
Are you opening directly through the app? Did not associate any standard applications to open PDF files?

I've created a repository for tests, check it and try to open the file on tree:
https://github.com/reebr/gitpoint-pdf-issue

Error:

Oh ok, now I understood the issue and could reproduce it. Thanks @reebr 馃憤

So basically if you click on a link in a README file that points to a .pdf file it works.
On the other hand, when trying to open a .pdf file that is part of the source code it crashes.

Do you guys mind if I try to fix the bug?

Hey @olegkorol

We will be very happy if you fix this bug :open_hands:

Thanks a million @olegkorol, we would _love_ a fix for this :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

patw0929 picture patw0929  路  5Comments

umarmughal picture umarmughal  路  4Comments

TautFlorian picture TautFlorian  路  5Comments

randy3k picture randy3k  路  5Comments

machour picture machour  路  3Comments