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

"NumberFormatException" when loading a certain YouTube video #7069

Closed
4 tasks done
xxxxme opened this issue Sep 6, 2021 · 4 comments
Closed
4 tasks done

"NumberFormatException" when loading a certain YouTube video #7069

xxxxme opened this issue Sep 6, 2021 · 4 comments
Labels
bug Issue is related to a bug youtube Service, https://www.youtube.com/

Comments

@xxxxme
Copy link

xxxxme commented Sep 6, 2021

Checklist

Steps to reproduce the bug

  1. Go to youtube.com/watch?v=g5ZgUIobSj0 in NewPipe

Actual behavior

After loading for a short period, an error report screen appears.

Expected behavior

The video page displays.

Logs

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: GB
  • Content Language: en
  • App Language: en_US
  • Service: none
  • Version: 0.21.9
  • OS: Linux Android 10 - 29
Crash log

java.lang.NumberFormatException: For input string: "61803398875"
	at java.lang.Integer.parseInt(Integer.java:618)
	at java.lang.Integer.parseInt(Integer.java:650)
	at org.schabi.newpipe.info_list.holder.CommentsMiniInfoItemHolder$1.transformUrl(CommentsMiniInfoItemHolder.java:64)
	at android.text.util.Linkify.makeUrl(Linkify.java:615)
	at android.text.util.Linkify.addLinks(Linkify.java:593)
	at android.text.util.Linkify.addLinks(Linkify.java:536)
	at android.text.util.Linkify.addLinks(Linkify.java:469)
	at android.text.util.Linkify.addLinks(Linkify.java:444)
	at org.schabi.newpipe.info_list.holder.CommentsMiniInfoItemHolder.linkify(CommentsMiniInfoItemHolder.java:258)
	at org.schabi.newpipe.info_list.holder.CommentsMiniInfoItemHolder.ellipsize(CommentsMiniInfoItemHolder.java:230)
	at org.schabi.newpipe.info_list.holder.CommentsMiniInfoItemHolder.lambda$a9Jqshj_OD1wN932a-ym1V5C7tk(Unknown Source:0)
	at org.schabi.newpipe.info_list.holder.-$$Lambda$CommentsMiniInfoItemHolder$a9Jqshj_OD1wN932a-ym1V5C7tk.run(Unknown Source:2)
	at android.os.Handler.handleCallback(Handler.java:883)
	at android.os.Handler.dispatchMessage(Handler.java:100)
	at android.os.Looper.loop(Looper.java:214)
	at android.app.ActivityThread.main(ActivityThread.java:7356)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:925)


@xxxxme xxxxme added the bug Issue is related to a bug label Sep 6, 2021
@xxxxme xxxxme changed the title "NumberFormatException" when loading certain YouTube videos "NumberFormatException" when loading a certain YouTube video Sep 6, 2021
@triallax
Copy link
Contributor

triallax commented Sep 7, 2021

The error is happening because the integer shown in the log is higher (much higher) than the maximum value of a Java integer (which is 2 ** 31 - 1 or 2,147,483,647). I imagine a possible fix would be using a long instead, but I haven't really seen the code.

@triallax triallax added the youtube Service, https://www.youtube.com/ label Sep 7, 2021
@litetex
Copy link
Member

litetex commented Sep 10, 2021

Comment causing the problem:
grafik

@litetex
Copy link
Member

litetex commented Sep 10, 2021

@xxxxme

This should be fixed with #6851

However it wasn't released yet.
Could you check if the problem still happens with the preview for the next release which is available at #7066

@litetex litetex added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Sep 10, 2021
@xxxxme
Copy link
Author

xxxxme commented Sep 10, 2021

@litetex The preview release at #7066 fixes the issue for me.

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Sep 10, 2021
@xxxxme xxxxme closed this as completed Sep 10, 2021
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 youtube Service, https://www.youtube.com/
Projects
None yet
Development

No branches or pull requests

3 participants