Skip to content

Disable updates notification #114

Closed
Closed

Description

@n1c0saurio

Problem Description

When the extension and the native connector haven't the same version or when the connector get updated, it always open a tab to warn/inform about that. This is not a big problem, but if I want to set up a webapp in a device of a non-tech-savvy-person this may be pretty confusing.

Proposed Solution

Should be useful to have an option to disable that messages.

Activity

  1. added
    enhancement
    on Dec 28, 2021
  2. filips123 commented on Dec 28, 2021

    @filips123
    Owner

    Yeah, I know about this can be pretty confusing and annoying, and I was trying to find a proper solution.

    The problem when the extension and the native connector are not updated to the same version is that things could break when the extension tried to call some newer connector function or connector behaved differently than the extension expected. For example, with the recent 1.4.0 release, a few things could break:

    • I added some additional features to the extension (changing native config, updating all sites) that depend on some changes in the connector (8c6e82b, 7bed83a). So, if the extension was updated to 1.4.0 but the connector was still using the old version, those features won't work. In the best case, the user would just get some "Unexpected error" when trying to use them, and in the worst case (in case error crashed the whole script), the error could prevent the whole extension from functioning.

    • Because of those previously mentioned changes (8c6e82b), I also had to change some behavior of the connector (specifically, it now expects system_integration is explicitly provided by the extension). So, if the connector was on 1.4.0 but the extension was still using an old version, some features (in this case editing a site) would behave differently than how they should and how the user would expect.

    Because this could cause problems and be confusing for users, I decided to just force them to update both programs to the same version.


    I thought about some ways how this could be properly solved.

    The least user-intrusive solution would be to set up auto-updates for the native connector, which I partially implemented by adding the project to some package managers and repos. However, this still causes a problem when the extension and the connector don't receive updates at the same time. In this case, even a built-in auto-updating script probably won't solve the issue, as it probably wouldn't be able to know if the extension is already updated or not.

    Another, probably more realistic possibility is to change how the extension determines whether the native connector needs updates. Currently, the extension checks if the connector version satisfies ^extension.version SemVer check (source) which basically forces update every time the extension is newer than the connector. However, not all updates require both extension and connector to be updated to the same version (in fact, I think most of them didn't). Because of this, maybe this check could be updated to only require updates when they are actually needed. For this, there are two possibilities:

    • Extension and connector could contain some hard-coded version number (probably just an integer, without any "fancy" version identifiers) to indicate changes in the connector protocol. So every time extension is changed to require a new feature from the connector (or otherwise), this number would be increased, and an update check would require both the extension and the connector to have this number the same. The advantage of this is that it is hidden for the user, but at the same time I'm not sure this is the best idea, and hard-coding and manually incrementing some number in the source code kinda feels weird.

    • Other solution is to just use the actual project version for this, and treat any changes in the protocol as a major SemVer version (so in this case, 1.4.0 would probably be 2.0.0). Then, the update check would only require updates when the major versions are different. The advantage of this is that we are using versions as they were intended, but I'm not sure if "any change in protocol" should really become a new major version (SemVer was mainly made for public APIs, but I'm not sure what is the public API here).

    What do you think? Do you have any other ideas?


    If you want to ignore those potential problems with incompatible versions, the extension already contains a "secret" option to disable the same version requirement (9142101). Note that the update tab will still be opened every time the extension is updated, but you will be able to close it and use the extension like normally.

    To disable update check, go to about:debugging, inspect the extension and set the correct local storage option using console:

    await browser.storage.local.set({ 'updates.native-version-check-disabled': true })
  3. n1c0saurio commented on Dec 29, 2021

    @n1c0saurio
    Author

    As far as I understand, most of the potential issues are related to interact with the extension (and not in the normal usage of any webapp installed), in that case the message should appear just when you open the toolbar icon. Even if would be possible, popup in the webapp itself when you open the settings or any other configuration-related menu.

    What do you think? Do you have any other ideas?

    I don't know much about versioning, but the second one sounds the most appropriate to me. If a new feature breaks compatibility with an older version, seems fair to make a new mayor version. Or if would be possible, gathering various changes before make the update if they seems too trivial.

    Also, nice to know about that secret option! :>

  4. filips123 commented on Dec 31, 2021

    @filips123
    Owner

    I decided to choose the second solution (with proper versioning). I will probably keep opening that tab even on compatible updates by default (to inform user a new update is available), but you will be able to ignore it or even disable it in the settings. Otherwise, I agree with what you said.

    To implement those changes, the next update will probably be 2.0.0 (even if it doesn't contain any breaking changes), but I'm not sure when I will release it yet.

  5. added this to the 2.0.0 milestone on Jan 1, 2022
  6. moved this from To Do to In Progress in PWAsForFirefoxon Jul 28, 2022
  7. Repository owner moved this from In Progress to Done in PWAsForFirefoxon Jul 31, 2022
  8. added a commit that references this issue on Dec 12, 2024
    ccdc6de
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions