Skip to content

Getting an error while using Image.network => Failed to parse HTTP, 115 does not match 13 #173958

@ArbazIrshad

Description

@ArbazIrshad

Steps to reproduce

I am getting an error when using Image.network to load this image. The image gives me error on android and iOS while it loads perfectly on Chrome using flutter web.

Expected results

Image.network should show the image

Actual results

Getting the following error: Failed to parse HTTP, 115 does not match 13, uri = https://www.adorama.com/images/Large/GPHERO13A.JPG

Code sample

Code sample
import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child:
              Image.network(
            'https://www.adorama.com/images/Large/GPHERO13A.JPG',
          ),
        ),
      ),
    );
  }
}

Screenshots or Video

No response

Logs

Logs
════════ Exception caught by image resource service ════════════════════════════
The following HttpException was thrown resolving an image codec:
Failed to parse HTTP, 115 does not match 13, uri = https://www.adorama.com/images/Large/GPHERO13A.JPG

When the exception was thrown, this was the stack:
#0      _HttpIncoming.listen.<anonymous closure> (dart:_http/http_impl.dart:439:11)
http_impl.dart:439
#11     _HttpParser._reportBodyError (dart:_http/http_parser.dart:1248:22)
http_parser.dart:1248
#12     _HttpParser._parse (dart:_http/http_parser.dart:346:9)
http_parser.dart:346
#13     _HttpParser._onData (dart:_http/http_parser.dart:918:5)
http_parser.dart:918
#20     _Socket._onData (dart:io-patch/socket_patch.dart:2907:41)
socket_patch.dart:2907
#27     _RawSecureSocket._sendReadEvent (dart:io/secure_socket.dart:1208:19)
secure_socket.dart:1208
#31     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:193:12)
isolate_patch.dart:193
(elided 25 frames from class _Timer, dart:async, and dart:async-patch)

Image provider: NetworkImage("https://www.adorama.com/images/Large/GPHERO13A.JPG", scale: 1.0)
Image key: NetworkImage("https://www.adorama.com/images/Large/GPHERO13A.JPG", scale: 1.0)
══════════════════════════════════════════════════════════════════════════════

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.32.8, on macOS 15.4.1 24E263 darwin-arm64, locale en-US) [1,343ms]
    • Flutter version 3.32.8 on channel stable at /Users/muhammadharoon/sdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision edada7c56e (3 weeks ago), 2025-07-25 14:08:03 +0000
    • Engine revision ef0cd00091
    • Dart version 3.8.1
    • DevTools version 2.45.1

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.1) [4.2s]
    • Android SDK at /Users/muhammadharoon/Library/Android/sdk
    • Platform android-35, build-tools 35.0.1
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
      This is the JDK bundled with the latest Android Studio installation on this machine.
      To manually set the JDK path, use: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [2.2s]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16E140
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [77ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2) [77ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.4+-12422083-b607.1)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.3.1.1) [75ms]
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 83.0.4
    • Dart plugin version 243.23177

[✓] VS Code (version 1.103.1) [11ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.116.0

[✓] Connected device (4 available) [6.1s]
    • 23106RN0DA (mobile)              • JJYXLVFAH67HV8LR          • android-arm64  • Android 15 (API 35)
    • Dev’s iPhone (wireless) (mobile) • 00008030-001A0C311EE0202E • ios            • iOS 18.6 22G86
    • macOS (desktop)                  • macos                     • darwin-arm64   • macOS 15.4.1 24E263 darwin-arm64
    • Chrome (web)                     • chrome                    • web-javascript • Google Chrome 139.0.7258.128
    ! Error: Browsing on the local area network for iPhone. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources [556ms]
    • All expected network resources are available.

! Doctor found issues in 1 category.```

</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    r: invalidIssue is closed as not valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions