pockethub / PocketHub

PocketHub Android App
Apache License 2.0
9.4k stars 3.45k forks source link

Crash when I click on some links #441

Open HassanCehef opened 11 years ago

HassanCehef commented 11 years ago

Good evening,

I'm running the GitHub's app version 1.7.3 on a Samsung Galaxy S2 running Android 4.1.2. I have several browser (3 Opera + Firefox) and none is set as default.

With Markdown, you can write links with this syntax :

This is [an example](http://example.com/ "Title") inline link.

[This link](http://example.net/) has no title attribute.

source : http://daringfireball.net/projects/markdown/syntax#link

In this repo (https://github.com/domnikl/DesignPatternsPHP/blob/master/README.md) you have interesting links. On a desktop browser, these links point to specifics folders in the repository.

* [AbstractFactory](AbstractFactory) [:notebook:](http://en.wikipedia.org/wiki/Abstract_factory_pattern)
* [Builder](Builder) [:notebook:](http://en.wikipedia.org/wiki/Builder_pattern)

If I click on the notebook, a browser opens the page. But with the app, if I click on the first link of the list (in the example, AbstractFactory and Builder), the application crashes. I tried with Octodroid, and my phone crashed :D

rmtheis commented 10 years ago

I see this crash when following a relative link in a rendered markdown file. No activity is found to handle the intent because the base URL is missing from the intent data URL.

Here, the intent data URL is "device-2013-12-24-191247.png" when it should be "https://github.com/rmtheis/android-treemap/blob/master/device-2013-12-24-191247.png". The markdown text is

![Screenshot](device-2013-12-24-191247.png)

12-28 16:43:07.063: E/AndroidRuntime(30321): FATAL EXCEPTION: main 12-28 16:43:07.063: E/AndroidRuntime(30321): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=device-2013-12-24-191247.png } 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1622) 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1417) 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.app.Activity.startActivityForResult(Activity.java:3370) 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.app.Activity.startActivityForResult(Activity.java:3331) 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.support.v4.app.FragmentActivity.startActivityForResult(FragmentActivity.java:674) 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.app.Activity.startActivity(Activity.java:3566) 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.app.Activity.startActivity(Activity.java:3534) 12-28 16:43:07.063: E/AndroidRuntime(30321): at com.github.mobile.util.SourceEditor$1.shouldOverrideUrlLoading(SourceEditor.java:69) 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:270) 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:372) 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.os.Handler.dispatchMessage(Handler.java:99) 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.os.Looper.loop(Looper.java:137) 12-28 16:43:07.063: E/AndroidRuntime(30321): at android.app.ActivityThread.main(ActivityThread.java:5041) 12-28 16:43:07.063: E/AndroidRuntime(30321): at java.lang.reflect.Method.invokeNative(Native Method) 12-28 16:43:07.063: E/AndroidRuntime(30321): at java.lang.reflect.Method.invoke(Method.java:511) 12-28 16:43:07.063: E/AndroidRuntime(30321): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 12-28 16:43:07.063: E/AndroidRuntime(30321): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 12-28 16:43:07.063: E/AndroidRuntime(30321): at dalvik.system.NativeStart.main(Native Method)

rmtheis commented 10 years ago

Looks like a duplicate of #405.

atermenji commented 10 years ago

yeah, this one is a duplicate, but I'll leave the issue open until fixed, because it has some useful information :)

HassanCehef commented 10 years ago

Sorry about the duplicate, I didn't go through old issues.