<h2 dir="auto">Steps to Reproduce</h2>
<ol dir="auto">
<li>create new plugin<br>
<code class="notranslate">flutter create --org com.example --template=plugin utf8err</code></li>
<li>modify file <code class="notranslate">utf8err\android\src\main\java\com\example\utf8err\Utf8errPlugin.java</code> content to:</li>
</ol>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="package com.example.utf8err;

import io.flutter.plugin.common.MethodChannel;
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
import io.flutter.plugin.common.MethodChannel.Result;
import io.flutter.plugin.common.MethodCall;
import io.flutter.plugin.common.PluginRegistry.Registrar;

/**
 * Utf8errPlugin
 */
public class Utf8errPlugin implements MethodCallHandler {
  /**
   * Plugin registration.
   */
  public static void registerWith(Registrar registrar) {
    final MethodChannel channel = new MethodChannel(registrar.messenger(), &quot;utf8err&quot;);
    JavaError;//&lt;--------------Any wrong statement
    channel.setMethodCallHandler(new Utf8errPlugin());
  }

  @Override
  public void onMethodCall(MethodCall call, Result result) {
    if (call.method.equals(&quot;getPlatformVersion&quot;)) {
      result.success(&quot;Android &quot; + android.os.Build.VERSION.RELEASE);
    } else {
      result.notImplemented();
    }
  }
}"><pre class="notranslate"><span class="pl-k">package</span> <span class="pl-s1">com</span>.<span class="pl-s1">example</span>.<span class="pl-s1">utf8err</span>;

<span class="pl-k">import</span> <span class="pl-s1">io</span>.<span class="pl-s1">flutter</span>.<span class="pl-s1">plugin</span>.<span class="pl-s1">common</span>.<span class="pl-s1">MethodChannel</span>;
<span class="pl-k">import</span> <span class="pl-s1">io</span>.<span class="pl-s1">flutter</span>.<span class="pl-s1">plugin</span>.<span class="pl-s1">common</span>.<span class="pl-s1">MethodChannel</span>.<span class="pl-s1">MethodCallHandler</span>;
<span class="pl-k">import</span> <span class="pl-s1">io</span>.<span class="pl-s1">flutter</span>.<span class="pl-s1">plugin</span>.<span class="pl-s1">common</span>.<span class="pl-s1">MethodChannel</span>.<span class="pl-s1">Result</span>;
<span class="pl-k">import</span> <span class="pl-s1">io</span>.<span class="pl-s1">flutter</span>.<span class="pl-s1">plugin</span>.<span class="pl-s1">common</span>.<span class="pl-s1">MethodCall</span>;
<span class="pl-k">import</span> <span class="pl-s1">io</span>.<span class="pl-s1">flutter</span>.<span class="pl-s1">plugin</span>.<span class="pl-s1">common</span>.<span class="pl-s1">PluginRegistry</span>.<span class="pl-s1">Registrar</span>;

<span class="pl-c">/**</span>
<span class="pl-c"> * Utf8errPlugin</span>
<span class="pl-c"> */</span>
<span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">Utf8errPlugin</span> <span class="pl-k">implements</span> <span class="pl-smi">MethodCallHandler</span> {
  <span class="pl-c">/**</span>
<span class="pl-c">   * Plugin registration.</span>
<span class="pl-c">   */</span>
  <span class="pl-k">public</span> <span class="pl-k">static</span> <span class="pl-smi">void</span> <span class="pl-en">registerWith</span>(<span class="pl-smi">Registrar</span> <span class="pl-s1">registrar</span>) {
    <span class="pl-k">final</span> <span class="pl-smi">MethodChannel</span> <span class="pl-s1">channel</span> = <span class="pl-k">new</span> <span class="pl-smi">MethodChannel</span>(<span class="pl-s1">registrar</span>.<span class="pl-en">messenger</span>(), <span class="pl-s">"utf8err"</span>);
    <span class="pl-s1">JavaError</span>;<span class="pl-c">//&lt;--------------Any wrong statement</span>
    <span class="pl-s1">channel</span>.<span class="pl-en">setMethodCallHandler</span>(<span class="pl-k">new</span> <span class="pl-smi">Utf8errPlugin</span>());
  }

  <span class="pl-c1">@</span><span class="pl-c1">Override</span>
  <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onMethodCall</span>(<span class="pl-smi">MethodCall</span> <span class="pl-s1">call</span>, <span class="pl-smi">Result</span> <span class="pl-s1">result</span>) {
    <span class="pl-k">if</span> (<span class="pl-s1">call</span>.<span class="pl-s1">method</span>.<span class="pl-en">equals</span>(<span class="pl-s">"getPlatformVersion"</span>)) {
      <span class="pl-s1">result</span>.<span class="pl-en">success</span>(<span class="pl-s">"Android "</span> + <span class="pl-s1">android</span>.<span class="pl-s1">os</span>.<span class="pl-s1">Build</span>.<span class="pl-c1">VERSION</span>.<span class="pl-c1">RELEASE</span>);
    } <span class="pl-k">else</span> {
      <span class="pl-s1">result</span>.<span class="pl-en">notImplemented</span>();
    }
  }
}</pre></div>
<ol start="3" dir="auto">
<li>run the example:</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="flutter run"><pre lang="cd" class="notranslate"><code class="notranslate">flutter run
</code></pre></div>
<h2 dir="auto">Logs</h2>
<p dir="auto">Run your application with <code class="notranslate">flutter run</code> and attach all the log output.</p>
<div class="highlight highlight-text-md notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Launching lib/main.dart on EVA CL00 in debug mode...
Initializing gradle...                                1.8s
Resolving dependencies...                             4.0s
Running 'gradlew assembleDebug'...                       \
Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Failed to send crash report due to a network error: SocketException: OS Error: 信号灯超时时间已到
, errno = 121, address = clients2.google.com, port = 26221
Crash report written to D:\skydrive\flutter\utf8err\example\flutter_01.log;
please let us know at https://github.com/flutter/flutter/issues."><pre class="notranslate">Launching lib/main.dart on EVA CL00 in debug mode...
Initializing gradle...                                1.8s
Resolving dependencies...                             4.0s
Running 'gradlew assembleDebug'...                       <span class="pl-c1">\</span>
Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Failed to send crash report due to a network error: SocketException: OS Error: 信号灯超时时间已到
, errno = 121, address = clients2.google.com, port = 26221
Crash report written to D:\skydrive\flutter\utf8err\example\flutter_01.log;
please let us know at <span class="pl-corl">https://github.com/flutter/flutter/issues</span>.</pre></div>
<p dir="auto">the flutter_01.log:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Flutter crash report; please file at https://github.com/flutter/flutter/issues.

## command

flutter run

## exception

FormatException: FormatException: Bad UTF-8 encoding 0xb4 (at offset 93)
``
#0      _Utf8Decoder.convert (dart:convert/utf.dart:574)
#1      _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:345)
#2      _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341)
#3      _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86)
#4      _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120)
#5      _rootRunUnary (dart:async/zone.dart:1134)
#6      _CustomZone.runUnary (dart:async/zone.dart:1031)
#7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:933)
#8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:257)
#10     _StreamController&amp;&amp;_SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:763)
#11     _StreamController._add (dart:async/stream_controller.dart:639)
#12     _StreamController.add (dart:async/stream_controller.dart:585)
#13     _Socket._onData (dart:io-patch/socket_patch.dart:1654)
#14     _rootRunUnary (dart:async/zone.dart:1138)
#15     _CustomZone.runUnary (dart:async/zone.dart:1031)
#16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933)
#17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#18     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:257)
#19     _StreamController&amp;&amp;_SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:763)
#20     _StreamController._add (dart:async/stream_controller.dart:639)
#21     _StreamController.add (dart:async/stream_controller.dart:585)
#22     new _RawSocket.&lt;anonymous closure&gt; (dart:io-patch/socket_patch.dart:1231)
#23     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:784)
#24     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#26     _runPendingImmediateCallback (dart:isolate-patch/dart:isolate/isolate_patch.dart:113)
#27     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:166)
``"><pre class="notranslate"><code class="notranslate">Flutter crash report; please file at https://github.com/flutter/flutter/issues.

## command

flutter run

## exception

FormatException: FormatException: Bad UTF-8 encoding 0xb4 (at offset 93)
``
#0      _Utf8Decoder.convert (dart:convert/utf.dart:574)
#1      _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:345)
#2      _Utf8ConversionSink.add (dart:convert/string_conversion.dart:341)
#3      _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:86)
#4      _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120)
#5      _rootRunUnary (dart:async/zone.dart:1134)
#6      _CustomZone.runUnary (dart:async/zone.dart:1031)
#7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:933)
#8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:257)
#10     _StreamController&amp;&amp;_SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:763)
#11     _StreamController._add (dart:async/stream_controller.dart:639)
#12     _StreamController.add (dart:async/stream_controller.dart:585)
#13     _Socket._onData (dart:io-patch/socket_patch.dart:1654)
#14     _rootRunUnary (dart:async/zone.dart:1138)
#15     _CustomZone.runUnary (dart:async/zone.dart:1031)
#16     _CustomZone.runUnaryGuarded (dart:async/zone.dart:933)
#17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:330)
#18     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:257)
#19     _StreamController&amp;&amp;_SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:763)
#20     _StreamController._add (dart:async/stream_controller.dart:639)
#21     _StreamController.add (dart:async/stream_controller.dart:585)
#22     new _RawSocket.&lt;anonymous closure&gt; (dart:io-patch/socket_patch.dart:1231)
#23     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:784)
#24     _microtaskLoop (dart:async/schedule_microtask.dart:41)
#25     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#26     _runPendingImmediateCallback (dart:isolate-patch/dart:isolate/isolate_patch.dart:113)
#27     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:166)
``
</code></pre></div>
<p dir="auto">Run <code class="notranslate">flutter analyze</code> and attach any output of that command also.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Analyzing D:\skydrive\flutter\utf8err\example...
No issues found!
Ran in 8.0s"><pre class="notranslate"><code class="notranslate">Analyzing D:\skydrive\flutter\utf8err\example...
No issues found!
Ran in 8.0s
</code></pre></div>
<h2 dir="auto">Flutter Doctor</h2>
<p dir="auto">Paste the output of running <code class="notranslate">flutter doctor -v</code> here.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[√] Flutter (Channel beta, v0.1.5, on Microsoft Windows [Version 10.0.16299.309], locale zh-CN)
    • Flutter version 0.1.5 at C:\flutter
    • Framework revision 3ea4d06340 (4 weeks ago), 2018-02-22 11:12:39 -0800
    • Engine revision ead227f118
    • Dart version 2.0.0-dev.28.0.flutter-0b4f01f759

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\AndroidSDK
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = C:\AndroidSDK
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] Android Studio (version 3.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[!] IntelliJ IDEA Ultimate Edition (version 2017.2)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[√] VS Code (version 1.21.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Dart Code extension version 2.10.0

[√] Connected devices (1 available)
    • EVA CL00 • GXK0216410000254 • android-arm64 • Android 7.0 (API 24)

! Doctor found issues in 1 category."><pre class="notranslate"><code class="notranslate">[√] Flutter (Channel beta, v0.1.5, on Microsoft Windows [Version 10.0.16299.309], locale zh-CN)
    • Flutter version 0.1.5 at C:\flutter
    • Framework revision 3ea4d06340 (4 weeks ago), 2018-02-22 11:12:39 -0800
    • Engine revision ead227f118
    • Dart version 2.0.0-dev.28.0.flutter-0b4f01f759

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at C:\AndroidSDK
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = C:\AndroidSDK
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] Android Studio (version 3.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[!] IntelliJ IDEA Ultimate Edition (version 2017.2)
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[√] VS Code (version 1.21.1)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Dart Code extension version 2.10.0

[√] Connected devices (1 available)
    • EVA CL00 • GXK0216410000254 • android-arm64 • Android 7.0 (API 24)

! Doctor found issues in 1 category.
</code></pre></div>
<blockquote>
<p dir="auto">For more information about diagnosing and reporting Flutter bugs, please see <a href="https://flutter.io/bug-reports/" rel="nofollow">https://flutter.io/bug-reports/</a>.</p>
</blockquote>
<h2 dir="auto">Steps to Reproduce</h2>
<ul dir="auto">
<li>Create a Material scaffold flutter app that <strong>does not</strong> use push.</li>
<li>Make sure <code class="notranslate">aps-environment</code> is not set.</li>
<li>And that the App ID settings on the Developer portal do not have Push enabled.</li>
<li>Build for iOS</li>
<li>Submit a build to Apple TestFlight.</li>
<li>You'll get an email warning you that you haven't set your <code class="notranslate">aps-environment</code> entitlement.</li>
<li>It's not going to get the app rejected, but it's annoying.</li>
</ul>
<p dir="auto">Is there a dependency in Flutter that is causing this? We can't find a trace of APNS usage in our app. Thanks!</p>
<p dir="auto">Tobin</p>