After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791668 - ephy-profile-migrator warnings on Debian
ephy-profile-migrator warnings on Debian
Status: RESOLVED FIXED
Product: epiphany
Classification: Core
Component: Sync
3.26.x
Other Linux
: Normal minor
: ---
Assigned To: Epiphany Maintainers
Epiphany Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-12-16 01:12 UTC by Dan Jacobson
Modified: 2017-12-17 19:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
profile-migrator: Fix migrate_sync_settings_path() (1.62 KB, patch)
2017-12-17 16:07 UTC, Gabriel Ivașcu
committed Details | Review

Description Dan Jacobson 2017-12-16 01:12:56 UTC
After
upgrade epiphany-browser:amd64 3.26.2-1 3.26.4-1
one sees three of
(ephy-profile-migrator:7802): GLib-GIO-CRITICAL **: g_settings_set_value: key 'sync-history-time' in 'org.gnome.Epiphany.sync' expects type 'x', but a GVariant of type 'd' was given

And also
** (ephy-profile-migrator:7802): WARNING **: Failed to clear the password schema: Timeout was reached

** (epiphany:7800): WARNING **: Failed to upload batch. Status code: 400, response: 8
Comment 1 Michael Catanzaro 2017-12-16 16:22:51 UTC
Uh-oh, thanks for reporting it....

(In reply to Dan Jacobson from comment #0)
> And also
> ** (ephy-profile-migrator:7802): WARNING **: Failed to clear the password
> schema: Timeout was reached

This seems like gnome-keyring misbehaving; I don't think it's our fault.

> ** (epiphany:7800): WARNING **: Failed to upload batch. Status code: 400,
> response: 8

This one's probably caused by the failed migration:

(In reply to Dan Jacobson from comment #0)
> After
> upgrade epiphany-browser:amd64 3.26.2-1 3.26.4-1
> one sees three of
> (ephy-profile-migrator:7802): GLib-GIO-CRITICAL **: g_settings_set_value:
> key 'sync-history-time' in 'org.gnome.Epiphany.sync' expects type 'x', but a
> GVariant of type 'd' was given

What went wrong here is that the 3.26.4 migration is incompatible with the 3.26.3 migration, migrate_sync_settings_path(). migrate_sync_settings_path() assumes that the setting it's migrating from (a double) has the same type as the new setting, which used to be double as well, but it's now an int. So we need to get the double out of the GVariant, convert it to an int, and create a new GVariant using the old settings. Gabriel, do you want to work on this and test it out?

Fortunately, as long as we get this fixed in 3.26.5, this will probably only affect Debian users, because Debian decided to skip 3.26.3. (It's also good for us that Debian skipped this release, because otherwise this problem would have taken a lot longer to find.)
Comment 2 Gabriel Ivașcu 2017-12-16 17:06:41 UTC
(In reply to Dan Jacobson from comment #0)
> ** (epiphany:7800): WARNING **: Failed to upload batch. Status code: 400,
> response: 8

Status 400 is Bad Request, and response code 8 is invalid or badly-formed data. Seems that the previous errors propagated in such a way that some malformed data was uploaded to the sync storage server.

(In reply to Michael Catanzaro from comment #1)
]> What went wrong here is that the 3.26.4 migration is incompatible with the
> 3.26.3 migration, migrate_sync_settings_path(). migrate_sync_settings_path()
> assumes that the setting it's migrating from (a double) has the same type as
> the new setting, which used to be double as well, but it's now an int. So we
> need to get the double out of the GVariant, convert it to an int, and create
> a new GVariant using the old settings. Gabriel, do you want to work on this
> and test it out?

I'm not sure how to fix this if migrate_sync_settings_path() had already run and failed. Changing migrate_sync_settings_path() to convert from double to gint64 wouldn't be too late now?

> Fortunately, as long as we get this fixed in 3.26.5, this will probably only
> affect Debian users, because Debian decided to skip 3.26.3. (It's also good
> for us that Debian skipped this release, because otherwise this problem
> would have taken a lot longer to find.)

Why did Debian skip 3.26.3?
Comment 3 Michael Catanzaro 2017-12-17 03:47:03 UTC
(In reply to Gabriel Ivașcu from comment #2)
> I'm not sure how to fix this if migrate_sync_settings_path() had already run
> and failed. Changing migrate_sync_settings_path() to convert from double to
> gint64 wouldn't be too late now?

The case where the migration has already run and failed is probably unfixable. But you can fix migrate_sync_settings_path() for users who have not run that migration yet.

> Why did Debian skip 3.26.3?

Debian regularly skips releases; there's probably no particular reason for it.
Comment 4 Gabriel Ivașcu 2017-12-17 16:07:22 UTC
Created attachment 365641 [details] [review]
profile-migrator: Fix migrate_sync_settings_path()

Account for the recent migration of sync timestamps from double to
gint64.
Comment 5 Michael Catanzaro 2017-12-17 18:30:15 UTC
Review of attachment 365641 [details] [review]:

::: src/profile-migrator/ephy-profile-migrator.c
@@ +916,3 @@
+      type = g_variant_get_type (value);
+
+      /* All double values in the sync schema have been converted to gint64 recently. */

/* All double values in the old sync schema have been converted to gint64 in the new schema. */
Comment 6 Gabriel Ivașcu 2017-12-17 19:00:42 UTC
Attachment 365641 [details] pushed as 7c3c01d - profile-migrator: Fix migrate_sync_settings_path()