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

RustSyncManager crashes with persistedState=null #1829

Closed
grigoryk opened this issue Sep 20, 2019 · 1 comment
Closed

RustSyncManager crashes with persistedState=null #1829

grigoryk opened this issue Sep 20, 2019 · 1 comment

Comments

@grigoryk
Copy link
Contributor

grigoryk commented Sep 20, 2019

A null persisted state is our "first sync" scenario.

                         E  Caused by: java.lang.NullPointerException
                         E      at mozilla.appservices.syncmanager.MsgTypes$SyncParams.setPersistedState(MsgTypes.java:776)
                         E      at mozilla.appservices.syncmanager.MsgTypes$SyncParams.access$1100(MsgTypes.java:499)
                         E      at mozilla.appservices.syncmanager.MsgTypes$SyncParams$Builder.setPersistedState(MsgTypes.java:1605)
                         E      at mozilla.appservices.syncmanager.SyncParams.toProtobuf$syncmanager_release(SyncParams.kt:144)
                         E      at mozilla.appservices.syncmanager.SyncManager.sync(SyncManager.kt:48)
                         E      at mozilla.components.service.fxa.sync.WorkManagerSyncWorker.doWork(WorkManagerSyncManager.kt:328)
                         E      at androidx.work.CoroutineWorker$startWork$1.invokeSuspend(CoroutineWorker.kt:66)
                         E      at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
                         E      at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
                         E      at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
                         E      at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
                         E      at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:740)

┆Issue is synchronized with this Jira Story
┆Story Points: 1
┆Sprint: SYNC - 2019-10-11
┆Epic: [Q3 1.1] Sync Manager / CWTS

@grigoryk
Copy link
Contributor Author

Passing in an empty string (instead of null) appears to make things work, but let's fix this regardless.

@thomcc thomcc closed this as completed in 4136511 Sep 26, 2019
thomcc pushed a commit that referenced this issue Sep 26, 2019
Handle null persistedState properly. Fixes #1829
bors bot pushed a commit to mozilla-mobile/android-components that referenced this issue Sep 27, 2019
4480: Closes #2727: Rust SyncManager integration r=csadilek a=grigoryk

Fixes #2727.
This has most of the pieces in the right places.
I think all of the necessary public API changes are done.

It mostly works, except that I've hit some bugs in the rust library:
- mozilla/application-services#1831 (blocker)
- mozilla/application-services#1829 (minor)

Fenix PR that enables "choose what to sync" on top of this: mozilla-mobile/fenix#5450



Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant