mapbox / mapbox/mapbox-maps-flutter

Unable to establish connection on channel: "dev.flutter.pigeon.mapbox_maps_flutter._PointAnnotationMessenger.createMulti

Open
#734 6 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
380
Forks
204
PR merge metrics
No merged PRs in 30d

Description

Hello.
When await pointAnnotationManager?.createMulti(pointAnnotationList) is executed, I get the following error:
**PlatformException(channel-error, Unable to establish connection on channel: "dev.flutter.pigeon.mapbox_maps_flutter._PointAnnotationMessenger.createMulti"., null, null)**
```
Future generateCarPinMapBox() async {
if (mapboxMapController == null || pointAnnotationManager == null) {
// You may want to add some retry logic or error handling here in case it's null
print("Mapbox controller or annotation manager is not ready yet.");
return;
}

var pointAnnotationList = [];
for (var car in cars) {
if (car.isAvailable! && !car.isRiding! && car.inversQNR == "ARISTEST") {
continue;
} else if (car.isAvailable! && !car.isRiding!) {
final ByteData bytes = await rootBundle.load(Get.isDarkMode ? carooPinDark : carooPinLight);
final Uint8List imageData = bytes.buffer.asUint8List();
// pointAnnotationManager?.create(mapbox.PointAnnotationOptions(geometry: mapbox.Point(coordinates: mapbox.Position(car.latitude as num, car.longitude as num)), image: imageData, iconSize: 1.0,));
final annotation = mapbox.PointAnnotationOptions(geometry: mapbox.Point(coordinates: mapbox.Position(car.latitude as num, car.longitude as num)), image: imageData, iconSize: 3.0,);
pointAnnotationList.add(annotation);
}
}
await pointAnnotationManager?.createMulti(pointAnnotationList);
}
```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the PlatformException at pointAnnotationManager?.createMulti(pointAnnotationList) using the provided generateCarPinMapBox example. Inspect the createMulti platform-channel entry point and its setup to determine why the channel cannot be established; done means the call completes without the channel-error exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.