Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while opening content in browser #3925

Closed
ghost opened this issue Jul 23, 2020 · 13 comments · Fixed by #5187
Closed

Error while opening content in browser #3925

ghost opened this issue Jul 23, 2020 · 13 comments · Fixed by #5187
Labels
bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software good first issue Easy/simple issues perfect for newcomers to get involved in the project

Comments

@ghost
Copy link

ghost commented Jul 23, 2020

Version

0.19.6

Steps to reproduce the bug

  1. Go to 'info about video'
  2. Press on 'open in browser'

Expected behavior

Opening url in browser.

Actual behaviour

UI crashes

Logs

Exception

  • User Action: ui error
  • Request: App crash, UI failure
  • Content Language: ru
  • Service: none
  • Version: 0.19.6
  • OS: Linux Android 7.0 - 24
Crash log

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=https://www.youtube.com/... pkg=com.huawei.android.internal.app }
	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1854)
	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1544)
	at android.app.Activity.startActivityForResult(Activity.java:4391)
	at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:675)
	at android.app.Activity.startActivityForResult(Activity.java:4335)
	at androidx.fragment.app.FragmentActivity.startActivityForResult(FragmentActivity.java:662)
	at android.app.Activity.startActivity(Activity.java:4697)
	at android.app.Activity.startActivity(Activity.java:4665)
	at org.schabi.newpipe.util.ShareUtils.openUrlInBrowser(ShareUtils.java:36)
	at org.schabi.newpipe.fragments.detail.VideoDetailFragment.onOptionsItemSelected(VideoDetailFragment.java:702)
	at androidx.fragment.app.Fragment.performOptionsItemSelected(Fragment.java:2830)
	at androidx.fragment.app.FragmentManager.dispatchOptionsItemSelected(FragmentManager.java:2717)
	at androidx.fragment.app.FragmentController.dispatchOptionsItemSelected(FragmentController.java:412)
	at androidx.fragment.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:389)
	at androidx.appcompat.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:219)
	at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
	at androidx.appcompat.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:109)
	at androidx.appcompat.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:64)
	at androidx.appcompat.widget.Toolbar$1.onMenuItemClick(Toolbar.java:207)
	at androidx.appcompat.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:781)
	at androidx.appcompat.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:840)
	at androidx.appcompat.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:158)
	at androidx.appcompat.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:991)
	at androidx.appcompat.view.menu.MenuPopup.onItemClick(MenuPopup.java:128)
	at android.widget.AdapterView.performItemClick(AdapterView.java:313)
	at android.widget.AbsListView.performItemClick(AbsListView.java:1203)
	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3197)
	at android.widget.AbsListView$3.run(AbsListView.java:4140)
	at android.os.Handler.handleCallback(Handler.java:761)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:156)
	at android.app.ActivityThread.main(ActivityThread.java:6617)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)


@ghost ghost added the bug Issue is related to a bug label Jul 23, 2020
@Stypox
Copy link
Member

Stypox commented Jul 25, 2020

Apparently there is no default browser on your phone and neither there is an application able to handle that url. Do other apps open things correctly in browser?
Btw, please use the Incredible Error Report to Markdown Converter before sending bug reports next time, as you should have been told when creating the issue, or copy the formatted report directly from the app.

@Stypox Stypox added more info needed and removed bug Issue is related to a bug labels Jul 25, 2020
@test2a
Copy link

test2a commented Aug 16, 2020

@Stypox i had the same error in #4140 and setting the default browser did the trick. How about there is an error message instead of a crash?

@wb9688
Copy link
Contributor

wb9688 commented Aug 16, 2020

Imho we should catch that exception and fall back to a regular share

@Stypox Stypox added bug Issue is related to a bug good first issue Easy/simple issues perfect for newcomers to get involved in the project and removed more info needed labels Sep 3, 2020
@AudricV
Copy link
Member

AudricV commented Nov 30, 2020

@test2a @DrovGamedev With my debug apk above, when setting no default browser on your device, did you get a list of apps to open the URL (when using open in browser command), or something else?
Thanks in advance for your answer.

@test2a
Copy link

test2a commented Nov 30, 2020

@TiA4f8R hi. i just checked your debug app but just like .20.4, if i click on globe icon, a new newpipe app opens and video plays. i think it might be due to url intent given to newpipe for opening all youtube apps. because i still have no default browser, it is falling back to url intent.

clicking on any other link in the descrption for example opens the browser intent popup correctly.

@AudricV
Copy link
Member

AudricV commented Nov 30, 2020

@test2a does it opens the NewPipe release or my debug APK? Here is my behavior on my device:

Screenshot Open in Browser NewPipe debug.jpg

Thanks for your fast reply!

@test2a
Copy link

test2a commented Nov 30, 2020

recording_20201130_223713

no. it opens the installed base newpipe. i have that sponsorblock apk also installed, but plain newpipe opens always

@AudricV
Copy link
Member

AudricV commented Nov 30, 2020

@test2a Can you go to Settings, Apps, NewPipe release v0.20.4, Open by default and check if the Remove default settings button is clickable? If yes, tap it and retry and let me know.

@AudricV
Copy link
Member

AudricV commented Nov 30, 2020

@test2a If you want to test if my fix is working in an other way, you can also share a URL which NewPipe can't open to my debug APK and use Open in browser command. If a list of apps is showing, it means that my fix is working.

@test2a
Copy link

test2a commented Nov 30, 2020

OK. I checked the settings. I have set "open supported links" as "aways in this app". If I set it to don't open, then it works as expected.

Dunno. Is there a way around this? If I set to always open, this would always happen unless there is some way to break the URL intent somehow

@AudricV
Copy link
Member

AudricV commented Nov 30, 2020

@test2a I don't really know, I think not, but I am not an Android developer. May be someone from NewPipe's team can really answer you, like @TobiGr or @Stypox.
Just beacuse I am curious, can you share a screenshot of your "Open in browser" dialog?

@test2a
Copy link

test2a commented Nov 30, 2020

Screenshot_20201130-232952

this is your debug app click on browser button with newpipe dont open default links set

@test2a
Copy link

test2a commented Nov 30, 2020

Sounds a nice compromise. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug device/software specific Issues that only happen on some devices or with some specific hardware/software good first issue Easy/simple issues perfect for newcomers to get involved in the project
Projects
None yet
4 participants