mapbox / mapbox/mapbox-maps-flutter
Unable to establish connection on channel: "dev.flutter.pigeon.mapbox_maps_flutter._PointAnnotationMessenger.createMulti
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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