ReadYouApp / ReadYouApp/ReadYou

Crash on installation

Open
#600 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Kotlin
Stars
7.5k
Forks
330
PR merge metrics
No merged PRs in 30d

Description

1. Environment

  • Device: Lenovo Tab4 8 Plus
  • OS: Android 9
  • APP: 0.9.12

2. Describe the bug

App crashed when installed & opened 1st time.
1time crash, can't reproduce it.

Logs:

FATAL EXCEPTION: main
Process: me.ash.reader, PID: 19095
java.lang.NullPointerException
	at me.ash.reader.ui.ext.DataStoreExtKt.getCurrentAccountId(DataStoreExt.kt:16)
	at me.ash.reader.infrastructure.preference.AccountSettingsKt.AccountSettingsProvider(AccountSettings.kt:80)
	at me.ash.reader.infrastructure.android.MainActivity$onCreate$2$1.invoke(MainActivity.kt:4)
	at me.ash.reader.infrastructure.android.MainActivity$onCreate$2$1.invoke(MainActivity.kt:1)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:8)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:31)
	at me.ash.reader.infrastructure.android.MainActivity$onCreate$2.invoke(MainActivity.kt:8)
	at me.ash.reader.infrastructure.android.MainActivity$onCreate$2.invoke(MainActivity.kt:1)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:8)
	at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:26)
	at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:31)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:8)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:31)
	at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:332)
	at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:41)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:8)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:31)
	at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:532)
	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$3.invoke(Wrapper.android.kt:35)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:8)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:31)
	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:162)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:8)
	at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:23)
	at coil.size.-Dimensions.observeDerivedStateRecalculations(Dimension.kt:43)
	at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:120)
	at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:14)
	at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:18)
	at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:45)
	at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:13)
	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:66)
	at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:12)
	at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:13)
	at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:19)
	at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:18)
	at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.java:115)
	at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:35)
	at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:129)
	at android.view.View.dispatchAttachedToWindow(View.java:18347)
	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3397)
	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
	at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3404)
	at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1764)
	at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1463)
	at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7190)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
	at android.view.Choreographer.doCallbacks(Choreographer.java:761)
	at android.view.Choreographer.doFrame(Choreographer.java:696)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6718)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting getCurrentAccountId in DataStoreExt.kt:16, then follow its use through AccountSettings.kt:80 and MainActivity.kt. Test a clean installation on Android 9 if possible and investigate the first-launch path shown in the stack trace. Done means the app no longer crashes when opened for the first time after installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.