Skip to content

[google_maps_flutter]: error when move the map .. #61322

Closed

Description

@imeDevelopers
[+2071 ms] E/MethodChannel#flutter/platform_views(30075): Failed to handle method call
[ +119 ms] E/MethodChannel#flutter/platform_views(30075): java.lang.IllegalArgumentException:
pointerIndex out of range
[ +184 ms] E/MethodChannel#flutter/platform_views(30075):       at
android.view.MotionEvent.nativeGetPointerCoords(Native Method)
[  +29 ms] E/MethodChannel#flutter/platform_views(30075):       at
android.view.MotionEvent.split(MotionEvent.java:3272)
[ +675 ms] E/MethodChannel#flutter/platform_views(30075):       at
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3063)
[ +132 ms] E/MethodChannel#flutter/platform_views(30075):       at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2737)
[ +137 ms] E/MethodChannel#flutter/platform_views(30075):       at
com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:536)
[   +6 ms] E/MethodChannel#flutter/platform_views(30075):       at
com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1876)
[  +90 ms] E/MethodChannel#flutter/platform_views(30075):       at
android.app.Dialog.dispatchTouchEvent(Dialog.java:913)
[   +7 ms] E/MethodChannel#flutter/platform_views(30075):       at
io.flutter.plugin.platform.VirtualDisplayController.dispatchTouchEvent(VirtualDisplayController.java:215)
[  +86 ms] E/MethodChannel#flutter/platform_views(30075):       at
io.flutter.plugin.platform.PlatformViewsController$1.onTouch(PlatformViewsController.java:259) 
[   +6 ms] E/MethodChannel#flutter/platform_views(30075):       at
io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.touch(PlatformViewsChannel.java:173)
[  +84 ms] E/MethodChannel#flutter/platform_views(30075):       at
io.flutter.embedding.engine.systemchannels.PlatformViewsChannel$1.onMethodCall(PlatformViewsChannel.java:68)
[   +9 ms] E/MethodChannel#flutter/platform_views(30075):       at
io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:230)
[  +70 ms] E/MethodChannel#flutter/platform_views(30075):       at
io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(DartMessenger.java:85)    
[   +6 ms] E/MethodChannel#flutter/platform_views(30075):       at
io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(FlutterJNI.java:682)
[  +61 ms] E/MethodChannel#flutter/platform_views(30075):       at
android.os.MessageQueue.nativePollOnce(Native Method)
[  +10 ms] E/MethodChannel#flutter/platform_views(30075):       at
android.os.MessageQueue.next(MessageQueue.java:326)
[   +7 ms] E/MethodChannel#flutter/platform_views(30075):       at
android.os.Looper.loop(Looper.java:189)
[  +62 ms] E/MethodChannel#flutter/platform_views(30075):       at
android.app.ActivityThread.main(ActivityThread.java:7214)
[  +74 ms] E/MethodChannel#flutter/platform_views(30075):       at
java.lang.reflect.Method.invoke(Native Method)
[  +85 ms] E/MethodChannel#flutter/platform_views(30075):       at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:500)
[  +86 ms] E/MethodChannel#flutter/platform_views(30075):       at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:888)
[  +66 ms] E/flutter (30075): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception:PlatformException(error, pointerIndex out of range, null)
[  +64 ms] E/flutter (30075): #0      StandardMethodCodec.decodeEnvelope
(package:flutter/src/services/message_codecs.dart:572:7)
[  +73 ms] E/flutter (30075): #1      MethodChannel._invokeMethod
(package:flutter/src/services/platform_channel.dart:161:18)
[   +7 ms] E/flutter (30075): <asynchronous suspension>
[   +4 ms] E/flutter (30075): #2      MethodChannel.invokeMethod
(package:flutter/src/services/platform_channel.dart:334:12)
[  +63 ms] E/flutter (30075): #3      AndroidViewController.sendMotionEvent
(package:flutter/src/services/platform_views.dart:785:41)
[   +8 ms] E/flutter (30075): <asynchronous suspension>
[  +58 ms] E/flutter (30075): #4      AndroidViewController.dispatchPointerEvent
(package:flutter/src/services/platform_views.dart:872:13)
[  +79 ms] E/flutter (30075): <asynchronous suspension>
[   +3 ms] E/flutter (30075): #5      _PlatformViewGestureRecognizer.handleEvent
(package:flutter/src/rendering/platform_view.dart:513:26)
[   +9 ms] E/flutter (30075): #6      PointerRouter._dispatch
(package:flutter/src/gestures/pointer_router.dart:78:12)
[   +5 ms] E/flutter (30075): #7      PointerRouter._dispatchEventToRoutes.<anonymous closure>
(package:flutter/src/gestures/pointer_router.dart:124:9)
[   +8 ms] E/flutter (30075): #8      _LinkedHashMapMixin.forEach
(dart:collection-patch/compact_hash.dart:377:8)
[  +66 ms] E/flutter (30075): #9      PointerRouter._dispatchEventToRoutes
(package:flutter/src/gestures/pointer_router.dart:122:18)
[   +6 ms] E/flutter (30075): #10     PointerRouter.route
(package:flutter/src/gestures/pointer_router.dart:108:7)
[   +7 ms] E/flutter (30075): #11     GestureBinding.handleEvent
(package:flutter/src/gestures/binding.dart:220:19)
[  +59 ms] E/flutter (30075): #12     GestureBinding.dispatchEvent
(package:flutter/src/gestures/binding.dart:200:22)
[ +104 ms] E/flutter (30075): #13     GestureBinding._handlePointerEvent
(package:flutter/src/gestures/binding.dart:158:7)
[  +14 ms] E/flutter (30075): #14     GestureBinding._flushPointerEventQueue
(package:flutter/src/gestures/binding.dart:104:7)
[  +11 ms] E/flutter (30075): #15     GestureBinding._handlePointerDataPacket
(package:flutter/src/gestures/binding.dart:88:7)
[  +61 ms] E/flutter (30075): #16     _rootRunUnary (dart:async/zone.dart:1206:13)
[  +59 ms] E/flutter (30075): #17     _CustomZone.runUnary (dart:async/zone.dart:1100:19)
[   +5 ms] E/flutter (30075): #18     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1005:7)[  +65 ms] E/flutter (30075): #19     _invoke1 (dart:ui/hooks.dart:267:10)
[  +70 ms] E/flutter (30075): #20     _dispatchPointerDataPacket (dart:ui/hooks.dart:176:5)
[   +5 ms] E/flutter (30075): 

Activity

  1. darshankawar commented on Jul 13, 2020

    @darshankawar
    Member

    Hi @imeDevelopers,
    Can you please provide your flutter doctor -v, your flutter run --verbose and a minimal complete reproducible code sample that throws this exception ? Also can you confirm if this ticket's issue is related to this issue ? If so, can you close either of one and keep only relevant one open for better tracking ?
    Thank you

  2. added
    in triagePresently being triaged by the triage team
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 13, 2020
  3. cory-brown commented on Jul 15, 2020

    @cory-brown

    Hi @darshankawar,
    I am having the same problem. The map loads up fine and you can move it around with gestures. The error happens when I use the zoom gestures (it may take a couple of attempts) and when I get the error the map goes blank.

    I have attached log files containing flutter doctor -v, flutter run --verbose and a main.dart file containing the code used (it is the sample from pub.dev).

    flutter doctor -v.txt
    flutter run --verbose.txt
    main.dart.txt

  4. matheusneumanndev commented on Jul 16, 2020

    @matheusneumanndev

    hi @darshankawar ,

    I'm facing this same problem here.
    :(

    Any fix or workaround?

  5. imeDevelopers commented on Jul 17, 2020

    @imeDevelopers
    Author
  6. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 17, 2020
  7. darshankawar commented on Jul 20, 2020

    @darshankawar
    Member

    Hi @imeDevelopers, per your comment in 54557, the issue you mentioned here seem to be fixed using 3rd party maps plugin. Would you like to close this ticket since your problem is fixed ?
    If you would like to report this issue against flutter_google_maps plugin, I'd suggest you follow the issue template and provide the details of the issue.

    issue template
    If you are looking for support, please check out our documentation
    or consider asking a question on Stack Overflow:
    - https://flutter.dev/
    - https://api.flutter.dev/
    - https://stackoverflow.com/questions/tagged/flutter?sort=frequent
    
    If you have found a bug or if our documentation doesn't have an answer
    to what you're looking for, then fill our the template below. Please read
    our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
    
    Steps to Reproduce
    
    Please tell us exactly how to reproduce the problem you are running into.
    
    Please attach a small application (ideally just one main.dart file) that
    reproduces the problem. You could use https://gist.github.com/ for this.
    
    If the problem is with your application's rendering, then please attach
    a screenshot and explain what the problem is.
    
    1. ...
    2. ...
    3. ...
    
    
    Please tell us which target platform(s) the problem occurs (Android / iOS / Web / macOS / Linux / Windows)
    Which target OS version, for Web, browser, is the test system running?
    Does the problem occur on emulator/simulator as well as on physical devices?
    
    Target Platform:
    Target OS version/browser:
    Devices:
    
    Run your application with `flutter run --verbose` and attach all the
    log output below between the lines with the backticks. If there is an
    exception, please see if the error message includes enough information
    to explain how to solve the issue.
    
    Run `flutter analyze` and attach any output of that command below.
    If there are any analysis errors, try resolving them before filing this issue.
    
    Finally, paste the output of running `flutter doctor -v` here.
    
  8. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 20, 2020
  9. cory-brown commented on Jul 22, 2020

    @cory-brown

    Hi @darshankawar,

    I would like to report this issue. I have also, provided the details of the issue.

    Hi @darshankawar,
    I am having the same problem. The map loads up fine and you can move it around with gestures. The error happens when I use the zoom gestures (it may take a couple of attempts) and when I get the error the map goes blank.

    I have attached log files containing flutter doctor -v, flutter run --verbose and a main.dart file containing the code used (it is the sample from pub.dev).

    flutter doctor -v.txt
    flutter run --verbose.txt
    main.dart.txt

  10. cory-brown commented on Jul 23, 2020

    @cory-brown

    Also @imeDevelopers, have you try downgrading to an older version? e.g. 0.5.25 or 0.5.17

  11. imeDevelopers commented on Jul 23, 2020

    @imeDevelopers
    Author

    @SmilinSamurai
    I use ths plugin from one year .. yes sure .. , i was use from v 4

  12. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 23, 2020
  13. darshankawar commented on Jul 24, 2020

    @darshankawar
    Member

    Hi @SmilinSamurai, based on the code you shared earlier, I tried to replicate the issue you and @imeDevelopers are facing, but I didn't see such behavior. I tested on latest Flutter dev channel and with latest version of google_maps_flutter plugin on Android 8.1.0 and was able to move the map properly without any issues or lag.

    61322.mp4.zip

    Could you and @imeDevelopers share video of behavior you are seeing along with devices on which you are facing the issue.
    Thanks.

  14. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Jul 24, 2020
  15. inagornyi commented on Jul 24, 2020

    @inagornyi

    I have had the same problem. After running several commands, the problem is no longer observed.

    flutter doctor -v
    flutter run --verbose
    flutter upgrade
    flutter clean
    

    I am using the latest version of google_maps_flutter 0.5.28 + 1.

  16. cory-brown commented on Aug 6, 2020

    @cory-brown

    I ran the commands that @inagornyi mentioned and it fixed it!

    Thanks for the help.

  17. inagornyi commented on Aug 6, 2020

    @inagornyi

    I ran the commands that @inagornyi mentioned and it fixed it!

    Thanks for the help.

    You are welcome!

  18. darshankawar commented on Sep 2, 2020

    @darshankawar
    Member

    Without additional information, we are unfortunately not sure how to resolve this issue.
    We are therefore reluctantly going to close this bug for now.
    Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
    Thanks for your contribution.

    Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
    All system setups can be slightly different, so it's always better to open new issues and reference related issues.

  19. removed
    in triagePresently being triaged by the triage team
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 2, 2020
  20. github-actions commented on Aug 13, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  21. locked as resolved and limited conversation to collaborators on Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions