8000 parse error when listening to notifications · Issue #6 · xtyxtyx/minio-dart · GitHub
[go: up one dir, main page]

Skip to content

parse error when listening to notifications #6

Open

Description

@janoschp

This is what I call:

    final NotificationPoller bucketNotificationPoller = _otpMinio.listenBucketNotification(
      _userBucket,
      prefix: 'Dido_otp/',
      events: <String>['s3:ObjectCreated:*'],
    );

This is the error I get:

[ERROR:flutter/lib/ui/ui_dart_state.cc(171)] Unhandled Exception: FormatException: Unexpected character (at character 1)
<?xml version="1.0" encoding="UTF-8"?>
^

#0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1404:5)
#1      _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1271:9)
#2      _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:936:22)
#3      _parseJson (dart:convert-patch/convert_patch.dart:40:10)
#4      JsonDecoder.convert (dart:convert/json.dart:505:36)
#5      JsonCodec.decode (dart:convert/json.dart:156:41)
#6      NotificationPoller._checkForChanges (package:minio/src/minio_poller.dart:61:25)
<asynchronous suspension>
#7      NotificationPoller.start (package:minio/src/minio_poller.dart:30:13)
#8      Minio.listenBucketNotification (package:minio/src/minio.dart:432:14)

Activity

  1. self-assigned this
    on Oct 1, 2020
  2. arrrrny commented on Oct 22, 2026

    @arrrrny

    Fixed in the fork. MinIO answers a notification listener with XML, and
    upstream called json.decode on it:

    FormatException: Unexpected character (at character 1)
    <?xml version="1.0" encoding="UTF-8"?>
    

    The poller understands both formats now — the XML that older MinIO servers
    send and the JSON that current ones send — and it also drops the events the
    server replays when the listener reconnects, which made every event arrive
    twice.

  3. arrrrny commented on Oct 22, 2026

    @arrrrny

    This ships in zuraffa_minio — the maintained fork of this package, which upstream has not touched since August 2025.

    The fork keeps the API of the original package unchanged, so moving over is an import swap:

    // before
    import 'package:minio/minio.dart';
    // after
    import 'package:zuraffa_minio/minio.dart';

    Source, the changelog and the sweep of the open issues of this tracker: https://github.com/arrrrny/zuraffa_minio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0