readrops/Readrops

error with 2.0 beta 01 from fdroid

Closed this issue · 18 comments

App crash on open

org.koin.core.error.InstanceCreationException: Could not create instance for '[Factory:'com.readrops.app.repositories.BaseRepository']'
at org.koin.core.instance.InstanceFactory.create(SourceFile:185)
at org.koin.core.instance.FactoryInstanceFactory.get(SourceFile:1)
at org.koin.core.scope.Scope.resolveInstance(SourceFile:109)
at org.koin.core.scope.Scope.get(SourceFile:127)
at androidx.paging.ChannelFlowCollector.emit(SourceFile:38)
at kotlinx.coroutines.flow.DistinctFlowImpl$collect$2.emit(SourceFile:763)
at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SourceFile:5)
at kotlinx.coroutines.flow.internal.SafeCollector.emit(SourceFile:10)
at kotlinx.coroutines.flow.internal.SafeCollector.emit(SourceFile:1)
at kotlinx.coroutines.flow.FlowKt.emitAllImpl$FlowKt__ChannelsKt(SourceFile:130)
at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(SourceFile:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:96)
at androidx.work.Worker$2.run(SourceFile:32)
at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:96)

I just saw https://mastodon.tetaneutral.net/@thomasbourdon/113038436089475948

the recipe does not change anything so, I guess, it's not an F-Droid thing specifically

@talkingseedling can you test with the dev apk from https://github.com/readrops/Readrops/releases/tag/v2.0-beta01 ?

To show you what I did:

  • Readrops 1.3.1 from frdroid, working
  • Update to Readdrops 2.0beta01 from fdroid, crash as in OP
  • Can't downgrade on fdroid
  • Can't use obtanium to downgrade because of fdroid signature
  • Uninstall Readrops
  • Install Readrops 1.3.1 from github via obtanium, works
  • Uninstall Readrops
  • Install Readrops 2.0beta01 from fdroid (to test if it needed uninstalling first), same crash in OP
  • Uninstall Readrops
  • Attempt install to 2.0beta01 from github via obtanium, install error "Downloaded package ID does not match existing App ID - com.readrops.app.beta [Readrops]" (So during this step, Readrops was -not- installed, but the Readrops listing in obtanium of "https://github.com/readrops/Readrops/releases" was still there from a previous step)
  • Remove Readrops as an app from obtanium completely, and re-add it with the exact same "https://github.com/readrops/Readrops/releases"
  • Install Readrops 2.0beta01 from github via obtanium, works, opens without crashing, though the app name as presented by Android is "ReadropsBeta"

As a non-developer I would guess that fdroid, like obtanium, has had an issue with the app name changing? I have a feeling obtanium will have the same issue when the app comes out of beta and has a name change again.
In obtanium you can turn off installing packages marked "Pre-release", but in fdroid there is no option. Is it possible to only push the "Latest" tag to fdroid?

F-Droid will not change the appID

Obtainium just tells you that the Github APK has a different appID, but that's already signaled in the release notes "This beta version can be safely installed along any stable version you could already have installed. No data will be shared between beta version and a stable one." And also, this is not an issue :)

Install Readrops 2.0beta01 from github via obtanium, works, opens without crashing,

ok interesting, will check out locally then

Okay so I am a bit confused by the fact that F-Droid did push a beta release as a stable one as I thought it wouldn't. I have memories of manually installing a beta version from an app because F-Droid wouldn't update it automatically .

I am personally not able to reproduce the crash. Instead I got an exception when syncing but I think the root cause is the same: I didn't handle credentials migration. In 1.3.1 and below, credentials would be stored in a plain text preferences file and starting from 2.0-beta01 they are encrypted in a separated file. Currenty 2.0-beta01 will just assume credentials are in the right place and won't migrate anything.

* Install Readrops 2.0beta01 from fdroid (to test if it needed uninstalling first), same crash in OP

Would this step not have tested any credential migration issue? I had uninstalled the app, then installed fdroid 2.0beta01 and it still crashed.
I just tried again, uninstalled the working github/obtanium one, installed the fdroid one, crash happens.

I'm running Samsung Galaxy A52, SM-A525F/DS, Android 14

I'm not able to reproduce this case either. If you get the exact same error after uninstalling v1.3.1 and installing just after v2.0-beta01, that means that you still got some local data and cache existing somewhere. When opening the app for the first time, Readrops doesn't instantiate any repository at launch. How do you uninstall apps?

Previously I would just long hold the app, and click uninstall.
To try a different way, I swiped down from top, settings, apps, readrops, storage, clicked "clear data", back one level out of storage, clicked uninstall. Opened fdroid, installed readrops, open readrops, get the below:

org.koin.core.error.InstanceCreationException: Could not create instance for '[Factory:'com.readrops.app.repositories.BaseRepository']'
at org.koin.core.instance.InstanceFactory.create(SourceFile:185)
at org.koin.core.instance.FactoryInstanceFactory.get(SourceFile:1)
at org.koin.core.scope.Scope.resolveInstance(SourceFile:109)
at org.koin.core.scope.Scope.get(SourceFile:127)
at androidx.paging.ChannelFlowCollector.emit(SourceFile:38)
at kotlinx.coroutines.flow.DistinctFlowImpl$collect$2.emit(SourceFile:763)
at kotlinx.coroutines.flow.internal.SafeCollectorKt$emitFun$1.invoke(SourceFile:5)
at kotlinx.coroutines.flow.internal.SafeCollector.emit(SourceFile:10)
at kotlinx.coroutines.flow.internal.SafeCollector.emit(SourceFile:1)
at kotlinx.coroutines.flow.FlowKt.emitAllImpl$FlowKt__ChannelsKt(SourceFile:130)
at kotlinx.coroutines.flow.FlowKt__ChannelsKt$emitAllImpl$1.invokeSuspend(SourceFile:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:96)
at androidx.work.Worker$2.run(SourceFile:32)
at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:96)

If it helps at all, when the app is installed via github/obtanium, it shows as having the name "ReadropsBeta" but when installed by fdroid it just has the name "Readrops".

If it helps at all

read #182 (comment) :)

anyway, testing on my Android 14 and 2.0beta01 starts fine, I've added https://f-droid.org/en/news/ feed to Local Account, updated feed, read articles, no crash.

trying again, installed 1.3.1, added the same feed, all ok, updated to 2.0beta01, all ok still

/LE: I've set the recipe to skip alpha/beta/rc tags for now: https://gitlab.com/fdroid/fdroiddata/-/commit/9c3a6e5b12b30f7d45bfbd4ad272e6832ec22977

read #182 (comment) :)

I must be miss-understanding, when I view the app in android under settings-apps, it shows "Readrops" when installed via fdroid, and "ReadropsBeta" when installed via github/obtanium. I'm not talking about the app name as it is viewed inside the fdroid store, nor the obtanium installer.

this is not an issue :)

@talkingseedling

Thanks @licaon-kter for updating the recipe. Does this mean that F-Droid won't build beta versions or just not considerate them as a stable update?

@talkingseedling indeed the version from the releases page is not the same than the F-Droid one, as intended for testing.

Does this mean that F-Droid won't build beta versions or just not considerate them as a stable update?

They will not be picked up

If you want to add betas, you'll have to open a manual MR, and users need to opt-in into betas per-app or globally

Okay thank you! As some F-Droid users got the first beta and reported issues, it would be nice for them to get the next one so I will open a MR for that.

@talkingseedling I submitted v2.0-beta02 to F-Droid a few days ago. Could you test when it is available and tell me if you still got a crash at launch?

Installed beta02 from fdroid, installed alongside beta02 from GitHub. Opens without crash, but automatically logs into my freshrss account. The feed has items from 07 may 24 and before. Seems strange since I "cleared data" many times as part of our previous fault finding attempts? And the timeline feed had been updated the day this error was logged, so 07 may 24 seems strange.

Upon clearing data, app works as intended, no crash and requires me to login to freshrss again.

Your rom seems to have problems, as those app data behaviors are really weird. But at least the launch crash seems to be fixed. Thanks both you and @licaon-kter for your help!