question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Clipboard isn't working anymore

See original GitHub issue

Short description

Describe what you were doing that could’ve led to the crash.

Steps to reproduce

  1. Simply click on the clipboard button to view history
  2. See crash

Environment information

  • FlorisBoard Version: 0.3.14-rc02 (72)
  • Device: Condor PGN528
  • Android: 7.0 (cn=N sdk=24)

Features enabled

smartbar = true
suggestions = true
suggestions_clipboard = true
suggestions_next_word = true
glide = true
clipboard_internal = false
clipboard_history = true

Attached stacktrace files

1647641977037.stacktrace
java.lang.NullPointerException: decodeFile(file.absolutePath) must not be null
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt$ClipboardInputLayout$ClipItemView$4.invoke(ClipboardInputLayout.kt:223)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt$ClipboardInputLayout$ClipItemView$4.invoke(ClipboardInputLayout.kt:218)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt$SnyggSurface$1.invoke(SnyggSurface.kt:99)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt$SnyggSurface$1.invoke(SnyggSurface.kt:52)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt.SnyggSurface(SnyggSurface.kt:49)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt.ClipboardInputLayout$ClipItemView(ClipboardInputLayout.kt:200)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt.access$ClipboardInputLayout$ClipItemView(ClipboardInputLayout.kt:1)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt$ClipboardInputLayout$HistoryMainView$1$1$3.invoke(ClipboardInputLayout.kt:287)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt$ClipboardInputLayout$HistoryMainView$1$1$3.invoke(ClipboardInputLayout.kt:285)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at dev.patrickgold.florisboard.app.ui.components.FlorisStaggeredVerticalGridKt.FlorisStaggeredVerticalGrid-uFdPcIQ(FlorisStaggeredVerticalGrid.kt:112)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt.ClipboardInputLayout$HistoryMainView(ClipboardInputLayout.kt:285)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt.ClipboardInputLayout(ClipboardInputLayout.kt:515)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2$3$1$1.invoke(FlorisImeService.kt:511)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2$3$1$1.invoke(FlorisImeService.kt:502)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2$3.invoke(FlorisImeService.kt:502)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2$3.invoke(FlorisImeService.kt:475)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt$SnyggSurface$1.invoke(SnyggSurface.kt:99)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt$SnyggSurface$1.invoke(SnyggSurface.kt:52)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt.SnyggSurface(SnyggSurface.kt:49)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2.invoke(FlorisImeService.kt:466)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2.invoke(FlorisImeService.kt:465)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
	at dev.patrickgold.florisboard.FlorisImeService.ImeUi(FlorisImeService.kt:465)
	at dev.patrickgold.florisboard.FlorisImeService.access$ImeUi(FlorisImeService.kt:115)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$3.invoke(FlorisImeService.kt)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$3.invoke(FlorisImeService.kt)
	at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:140)
	at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2158)
	at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2404)
	at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2585)
	at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2571)
	at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:247)
	at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source)
	at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:2571)
	at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:2547)
	at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:620)
	at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:786)
	at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:105)
	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:456)
	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:425)
	at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:34)
	at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
	at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
	at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:905)
	at android.view.Choreographer.doCallbacks(Choreographer.java:709)
	at android.view.Choreographer.doFrame(Choreographer.java:641)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:893)
	at android.os.Handler.handleCallback(Handler.java:836)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loop(Looper.java:203)
	at android.app.ActivityThread.main(ActivityThread.java:6269)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
patrickgoldcommented, Mar 20, 2022

Unknown URL content://dev.patrickgold.florisboard.beta.provider.clip/clips/2072899223352

That’s indeed unknown and confirms my theory that you still have old images on your history. (The provider ID has changed as well as the path). Above commit thus wraps the delete call in a try block and thus it won’t crash anymore for old images (hopefully). This means I will have to make an rc04 release, which will be released later today.

0reactions
z0xrvcommented, Mar 19, 2022

I still get the error when i try to clear the clipboard with 0.3.14-rc03

Environment information

  • FlorisBoard Version: 0.3.14-rc03 (73)
  • Device: Condor PGN528
  • Android: 7.0 (cn=N sdk=24)

Features enabled

smartbar = true
suggestions = true
suggestions_clipboard = true
suggestions_next_word = true
glide = true
clipboard_internal = true
clipboard_history = true

Attached stacktrace files

1647707809107.stacktrace
java.lang.NullPointerException: decodeFile(file.absolutePath) must not be null
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt$ClipboardInputLayout$ClipItemView$4.invoke(ClipboardInputLayout.kt:223)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt$ClipboardInputLayout$ClipItemView$4.invoke(ClipboardInputLayout.kt:218)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt$SnyggSurface$1.invoke(SnyggSurface.kt:99)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt$SnyggSurface$1.invoke(SnyggSurface.kt:52)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt.SnyggSurface(SnyggSurface.kt:49)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt.ClipboardInputLayout$ClipItemView(ClipboardInputLayout.kt:200)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt.access$ClipboardInputLayout$ClipItemView(ClipboardInputLayout.kt:1)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt$ClipboardInputLayout$HistoryMainView$1$1$3.invoke(ClipboardInputLayout.kt:287)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt$ClipboardInputLayout$HistoryMainView$1$1$3.invoke(ClipboardInputLayout.kt:285)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at dev.patrickgold.florisboard.app.ui.components.FlorisStaggeredVerticalGridKt.FlorisStaggeredVerticalGrid-uFdPcIQ(FlorisStaggeredVerticalGrid.kt:112)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt.ClipboardInputLayout$HistoryMainView(ClipboardInputLayout.kt:285)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardInputLayoutKt.ClipboardInputLayout(ClipboardInputLayout.kt:515)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2$3$1$1.invoke(FlorisImeService.kt:511)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2$3$1$1.invoke(FlorisImeService.kt:502)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2$3.invoke(FlorisImeService.kt:502)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2$3.invoke(FlorisImeService.kt:475)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:116)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt$SnyggSurface$1.invoke(SnyggSurface.kt:99)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt$SnyggSurface$1.invoke(SnyggSurface.kt:52)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
	at dev.patrickgold.florisboard.snygg.ui.SnyggSurfaceKt.SnyggSurface(SnyggSurface.kt:49)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2.invoke(FlorisImeService.kt:466)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$2.invoke(FlorisImeService.kt:465)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
	at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
	at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
	at dev.patrickgold.florisboard.FlorisImeService.ImeUi(FlorisImeService.kt:465)
	at dev.patrickgold.florisboard.FlorisImeService.access$ImeUi(FlorisImeService.kt:115)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$3.invoke(FlorisImeService.kt)
	at dev.patrickgold.florisboard.FlorisImeService$ImeUi$3.invoke(FlorisImeService.kt)
	at androidx.compose.runtime.RecomposeScopeImpl.compose(RecomposeScopeImpl.kt:140)
	at androidx.compose.runtime.ComposerImpl.recomposeToGroupEnd(Composer.kt:2158)
	at androidx.compose.runtime.ComposerImpl.skipCurrentGroup(Composer.kt:2404)
	at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2585)
	at androidx.compose.runtime.ComposerImpl$doCompose$2$5.invoke(Composer.kt:2571)
	at androidx.compose.runtime.SnapshotStateKt__DerivedStateKt.observeDerivedStateRecalculations(DerivedState.kt:247)
	at androidx.compose.runtime.SnapshotStateKt.observeDerivedStateRecalculations(Unknown Source)
	at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:2571)
	at androidx.compose.runtime.ComposerImpl.recompose$runtime_release(Composer.kt:2547)
	at androidx.compose.runtime.CompositionImpl.recompose(Composition.kt:620)
	at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:786)
	at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt:105)
	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:456)
	at androidx.compose.runtime.Recomposer$runRecomposeAndApplyChanges$2$2.invoke(Recomposer.kt:425)
	at androidx.compose.ui.platform.AndroidUiFrameClock$withFrameNanos$2$callback$1.doFrame(AndroidUiFrameClock.android.kt:34)
	at androidx.compose.ui.platform.AndroidUiDispatcher.performFrameDispatch(AndroidUiDispatcher.android.kt:109)
	at androidx.compose.ui.platform.AndroidUiDispatcher.access$performFrameDispatch(AndroidUiDispatcher.android.kt:41)
	at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:69)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:905)
	at android.view.Choreographer.doCallbacks(Choreographer.java:709)
	at android.view.Choreographer.doFrame(Choreographer.java:641)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:893)
	at android.os.Handler.handleCallback(Handler.java:836)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loop(Looper.java:203)
	at android.app.ActivityThread.main(ActivityThread.java:6269)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1063)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:924)

1647722931083.stacktrace
java.lang.IllegalArgumentException: Unknown URL content://dev.patrickgold.florisboard.beta.provider.clip/clips/2072899223352
	at android.content.ContentResolver.delete(ContentResolver.java:1418)
	at dev.patrickgold.florisboard.ime.clipboard.provider.ClipboardItem.close(ClipboardDatabase.kt:156)
	at dev.patrickgold.florisboard.ime.clipboard.ClipboardManager$clearHistory$1.invokeSuspend(ClipboardManager.kt:272)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:39)
	at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Windows Clipboard Not Working on Windows 10
1. Switch on Clipboard History ... I know, you might have already checked this. But then again, it doesn't hurt to run a...
Read more >
[SOLVED] Copy and Paste Not Working on Windows 10
How to fix copy and paste not working? · Close any video players · Close any open applications · Clear your clipboard ·...
Read more >
broken clipboard - Microsoft Q&A
The simplest fix when clipboard functionality is not working is to open Task Manager (Ctrl + Shift + Esc) and select Windows Explorer...
Read more >
Clipboard History not working or showing in Windows 11/10
Clipboard History not working or showing in Windows 11/10 · Make sure Clipboard History is Enabled · Restart File Explorer · Enable Clipboard ......
Read more >
How to Fix It When Copy and Paste Isn't Working in Windows ...
One of the most common causes of copy and paste issues on Windows is when an installed application is interfering with the clipboard....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found