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

Fix build problems and updated kotlin #6986

Merged
merged 4 commits into from
Aug 30, 2021

Conversation

litetex
Copy link
Member

@litetex litetex commented Aug 26, 2021

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Due diligence

@litetex litetex changed the title Fix build problems update kotlin Fix build problems and updated kotlin Aug 26, 2021
@TobiGr TobiGr added the meta Related to the project but not strictly to code label Aug 26, 2021
@tsiflimagas
Copy link
Contributor

I got this when refreshing the feed

Exception

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

java.lang.NullPointerException: throwable must not be null
	at org.schabi.newpipe.local.feed.service.FeedLoadService$resultSubscriber$1.onComplete$lambda-1(FeedLoadService.kt:304)
	at org.schabi.newpipe.local.feed.service.FeedLoadService$resultSubscriber$1.$r8$lambda$vA3c48O1JhKXuDGHBc5SdvrX30g(Unknown Source:0)
	at org.schabi.newpipe.local.feed.service.FeedLoadService$resultSubscriber$1$$ExternalSyntheticLambda0.accept(Unknown Source:6)
	at io.reactivex.rxjava3.internal.observers.BiConsumerSingleObserver.onSuccess(BiConsumerSingleObserver.java:56)
	at io.reactivex.rxjava3.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run(SingleObserveOn.java:81)
	at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7665)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:594)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)


@litetex litetex marked this pull request as draft August 27, 2021 13:16
@litetex
Copy link
Member Author

litetex commented Aug 27, 2021

@tsiflimagas

You are correct. When you refresh the feed and there is no "Feed update threshold" active it fails.
Wow, that's weird than why Android studio recommends that...

I'll revert the affected commit then 😄

@ktprograms
Copy link
Contributor

I think it's a bug / change with the kotlin plugin for android studio. When I was using the 1.5.21 versions on your PR it had a type hint of Throwable! (meaning nullable / java default unannotated). When I updated to the 1.5.30 version of the plugin the type hint was just Throwable (meaning non nullable).

@litetex litetex force-pushed the fix-build-problems-update-kotlin branch from 273249b to b061423 Compare August 27, 2021 14:05
There seems to be a bug in the kotlin plugin as it tells you when building that this can't be null:
"Condition 'throwable != null' is always 'true'"
However it can indeed be null as seen in TeamNewPipe#6986 (comment)
@litetex
Copy link
Member Author

litetex commented Aug 27, 2021

Okay so I have to revoke/alter my statement above:
It's not Android studio, it's the build itself:
grafik

I will suppress this warning and also add a comment therefore 😄

@litetex litetex marked this pull request as ready for review August 27, 2021 14:34
@litetex
Copy link
Member Author

litetex commented Aug 28, 2021

Should be ready for review again 😄

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you

@TobiGr TobiGr merged commit 0e66686 into TeamNewPipe:dev Aug 30, 2021
@litetex litetex deleted the fix-build-problems-update-kotlin branch August 31, 2021 16:37
This was referenced Sep 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
meta Related to the project but not strictly to code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants