leanflutter / auto_updater

This plugin allows Flutter desktop apps to automatically update themselves (based on sparkle and winsparkle).
MIT License
278 stars 38 forks source link

【Windows】Update Error! search update info error,Please confirm your network is ok? please try again #61

Closed iOSBoy closed 1 month ago

iOSBoy commented 4 months ago
  1. main.dart

      String feedURL = 'http://xxxx.com/appcast.xml'; //replace my url
      await autoUpdater.setFeedURL(feedURL);
      await autoUpdater.checkForUpdates();
      await autoUpdater.setScheduledCheckInterval(3600);
  2. dsa_priv.pen & dsa_pub.pem is ok

  3. Runner.rc

    
    /////////////////////////////////////////////////////////////////////////////
    //
    // WinSparkle
    //

// And verify signature using DSA public key: DSAPub DSAPEM "../../dsa_pub.pem"


5.appcast.xml
    <item>
        <title>Version 1.1.0</title>
        <sparkle:releaseNotesLink>
            https://your_domain/your_path/release_notes.html
        </sparkle:releaseNotesLink>

        <pubDate>Sun, 16 Feb 2022 12:00:00 +0800</pubDate>
        <enclosure url="https://static.aaa.aa.hat/2.5.15/aaaa_pro.exe"
            sparkle:dsaSignature="MDwCHF9qghqq+sDibyEk6PPB3Fd8Kdw**********************R5gfE08ed4zTQ="
            sparkle:version="1.1.0+2"
            sparkle:os="windows"
            length="0"
            type="application/octet-stream" />
    </item>
wangdenkun commented 3 months ago

see https://github.com/vslavik/winsparkle/wiki/Appcast-Feeds change the url to be a full link that`s work for me

GolnazMirzaie commented 3 months ago

@wangdenkun I get this error on windows, this is my appcast file for second update:

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
    <channel>
        <title>app update</title>
<description>Most recent updates to app</description>
<language>en</language>
<item>
<title>Version 1.0.2</title>
<pubDate>Wed, 6 June 2024 10:28:00 +0800</pubDate>
<enclosure url="......./app-1.0.2%2B1-windows-setup.exe" sparkle:dsaSignature="MD0CHQCRaSvL.................rUnT9d/0LKk/8b0qR5fUHsLp" sparkle:version="1.0.2+1" sparkle:os="windows" length="0" type="application/octet-stream"/>
</item>
    </channel>
</rss>

when I open the app it detects that a newer version exists, but when I click on install update, after a few seconds of downloading updates, it says:

Annotation 2024-06-06 122534

amorenew commented 2 months ago

it requires a real url enclosure url="https://github.com/coreybutler/nvm-windows/releases/download/1.1.12/nvm-setup.exe"

the exe will download but it will crash as it is not signed by your key but you will see that it is a URL issue

iOSBoy commented 1 month ago

is my network error