Skip to content

[BUG] vector_map_tiles_pmtiles: Incompatibility with protobuf 6.0.0 (PbList error) #109

Open

Description

@mwoerner

Package

vector_map_tiles_pmtiles

Bug Description

This issue is about the package: vector_map_tiles_pmtiles

When building a FlutterFlow project locally for iOS, the build fails due to an incompatibility between protobuf 6.0.0 and the current vector tile dependency chain.

The error originates from vector_tile (2.0.1), which is not compatible with protobuf 6.x and still uses deprecated PbList constructors.

Since vector_map_tiles_pmtiles depends on this chain, it currently blocks using PMTiles in environments where protobuf 6.x is enforced.

Additional context:

  • FlutterFlow enforces protobuf 6.0.0
  • vector_tile 2.0.1 is not compatible with protobuf 6.x
  • Newer versions of vector_tile and vector_tile_renderer already exist

Would it be possible to update vector_map_tiles_pmtiles to support the newer dependency chain?

Happy to help test a fix if needed.

Steps to Reproduce

  1. Create a FlutterFlow project using:

    • flutter_map
    • vector_map_tiles
    • vector_map_tiles_pmtiles
  2. Build the project locally for iOS using FlutterFlow

  3. Ensure protobuf 6.0.0 is used (FlutterFlow enforces this)

  4. Build fails with protobuf-related errors in vector_tile.pb.dart

Expected Results

The project should build successfully with protobuf 6.0.0.

vector_map_tiles_pmtiles should be compatible with the latest vector_map_tiles / vector_tile_renderer / vector_tile dependency chain.

Actual Results

Build fails with the following error:

Error: Couldn't find constructor 'PbList'

This occurs in vector_tile.pb.dart and is caused by vector_tile 2.0.1 being incompatible with protobuf 6.0.0.

Code Sample

FlutterMap(
  children: [
    VectorTileLayer(
      tileProviders: TileProviders({
        'protomaps': PmTilesVectorTileProvider(
          url: 'https://your-domain/tiles.pmtiles',
        ),
      }),
    ),
  ],
)

Platforms

iOS

Activity

  1. josxha commented on Mar 27, 2026

    @josxha
    Owner

    The transitive vector_tile dependency still uses protobuf v5 and needs to update first, and then vector_tile_renderer before we can use protobuf v6.
    https://github.com/bahung1221/dart-vector-tile/blob/ffefc732f92951e7f6afc1f438ed47a4ce13cbcf/pubspec.yaml#L11

  2. mwoerner commented on Mar 28, 2026

    @mwoerner
    Author

    Thanks a lot for the clarification — that helped to understand the actual dependency chain.

    I’ve opened an issue there: bahung1221/dart-vector-tile#23

    From what I can see, **vector_tile_renderer** currently allows: vector_tile: ">=2.0.0 <4.0.0"

    So it might not be version-blocking at the moment, but would likely still need verification once vector_tile supports protobuf v6.

    Would you agree that vector_tile is the primary blocker right now?

    Thanks again for pointing me in the right direction — really appreciated 🙏

  3. josxha commented on Mar 28, 2026

    @josxha
    Owner

    It depends whether vector_tile_renderer will do a maintenance release for v6 or only v7. Usually, you'd just use an older version until all packages have upgraded to protobuf v6. Is that not possible in FlutterFlow?

  4. mwoerner commented on Mar 28, 2026

    @mwoerner
    Author

    Unfortunately, in FlutterFlow we don’t have control over dependency resolution in that way, so using an older protobuf version is not possible for us.

    FlutterFlow currently enforces protobuf v6 internally, which leads to a conflict with vector_tile (still on protobuf v5). That’s why the build fails as soon as vector tiles are involved.

    From what I understand now, this makes vector_tile the primary blocker in the chain:
    vector_map_tiles → vector_tile_renderer → vector_tile → protobuf (^5.x)

    We’ve opened an ff issue here:
    FlutterFlow/flutterflow-issues#7022

    For now, this effectively forces us to remove map functionality entirely just to get the app building again, which is obviously quite critical for us.

    Do you see any short-term workaround on your side (e.g. compatibility or temporary adjustments), or would you also expect that we need to wait until vector_tile officially supports protobuf v6?

    Thanks again for your help — really appreciated.

  5. josxha commented on Mar 28, 2026

    @josxha
    Owner

    There is already an open pull request for vector_tile: bahung1221/dart-vector-tile#21
    You can fork vector_tile_renderer and depend on vector_tile via a git dependency in your pubspec.yaml file. After that, the same can be done with vector_map_tiles_pmtiles on its vector_tile_renderer dependency and finally in your project for vector_map_tiles_pmtiles.

  6. mwoerner commented on Mar 28, 2026

    @mwoerner
    Author

    Using git dependencies and forking the chain definitely makes sense in a standard Flutter project to already use the updated proto files from the PR.

    Unfortunately, in FlutterFlow we don’t have control over transitive dependencies, so we can’t apply this workaround across vector_tile → vector_tile_renderer → vector_map_tiles_pmtiles.

    So for us, this effectively means we’re blocked until protobuf v6 support lands officially in vector_tile and propagates through the stack.

    Danke nochmal und schönes Restwochenende. Grüße aus Hessen.

  7. SailMile commented on Jul 4, 2026

    @SailMile

    I have the same issue. Any update on the dependency of vector_map_tiles/vector_tile_renderer combined with vector_tile ^4.0.0 and protobuf 6.0.0?

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions