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

dart run auto_updater:generate_keys error #52

Open cpsoft opened 1 year ago

cpsoft commented 1 year ago

Building package executable... Built auto_updater:generate_keys. Unhandled exception: FormatException: Unexpected extension byte (at offset 10)

0 _Utf8Decoder.convertChunked (dart:convert-patch/convert_patch.dart:1851:7)

1 _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:304:28)

2 _Utf8ConversionSink.add (dart:convert/string_conversion.dart:300:5)

3 _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:69:18)

4 _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)

5 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)

6 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)

7 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)

8 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:776:19)

9 _StreamController._add (dart:async/stream_controller.dart:650:7)

10 _StreamController.add (dart:async/stream_controller.dart:598:5)

11 _Socket._onData (dart:io-patch/socket_patch.dart:2381:41)

12 _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)

13 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)

14 _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)

15 _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:776:19)

16 _StreamController._add (dart:async/stream_controller.dart:650:7)

17 _StreamController.add (dart:async/stream_controller.dart:598:5)

lingsifeng commented 1 year ago

I also ran into this issue, how did you solve it?

yuhaya commented 1 year ago

same

yuhaya commented 1 year ago

It may be a network problem. After adjusting the network here, it is normal.

Eric0x commented 10 months ago

auto_updater/bin /generate_keys.dart Finally, this was executed windows/WinSparkle-0.8.0/bin/generate_keys.bat

ismanong commented 1 month ago

windows中文环境下的dart的Process进程需要chcp 65001

a1239897580 commented 3 weeks ago

同样的问题 怎么解决

LIAO-JIA-LE commented 2 days ago

I tried using this method to resolve the issue and successfully fixed it. I hope it helps you.

The issue might be caused by using OpenSSL. First, you need to install OpenSSL (I didn’t use Chocolatey(It may be because if you use Chocolatey to install it, it will automatically add the path to openssl to the environment variable.); instead, I downloaded Win64 OpenSSL v3.3.2 EXE from this link).

Next, you need to set the OpenSSL executable in the environment variables, making sure that when you run dart run auto_updater:generate_keys, it can utilize OpenSSL to generate keys. (I added C:\Program Files\OpenSSL-Win64\bin to the system environment variable PATH, as openssl.exe is located in this directory.)

After that, running dart run auto_updater:generate_keys should work!

I hope this helps you resolve the issue!