Skip to content
This repository has been archived by the owner on Apr 6, 2021. It is now read-only.

FlutterP2p.discoverDevices() not working #6

Open
agnoam opened this issue Feb 4, 2020 · 8 comments
Open

FlutterP2p.discoverDevices() not working #6

agnoam opened this issue Feb 4, 2020 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@agnoam
Copy link

agnoam commented Feb 4, 2020

I use the example app and when I tapped the Discover Devices button, it threw an exception.

exception:

V/ContentValues(30506): Method: isLocationPermissionGranted
V/ContentValues(30506): Method: register
W/ter_p2p_exampl(30506): Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
I/flutter (30506): stateChange: false
I/flutter (30506): connectionChange: false, Connected: false
I/flutter (30506): deviceChange: Android_14f9 / 1a:f0:e4:dd:26:ad / 10-0050F204-5 /  -GO
V/ContentValues(30506): Method: discover
E/flutter (30506): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(2, null, null)
[38;5;244mE/flutter (30506): #0      StandardMethodCodec.decodeEnvelope[39;49m
[38;5;244mE/flutter (30506): #1      MethodChannel._invokeMethod[39;49m
E/flutter (30506): <asynchronous suspension>
[38;5;244mE/flutter (30506): #2      MethodChannel.invokeMethod[39;49m
[38;5;248mE/flutter (30506): #3      FlutterP2p.discoverDevices[39;49m
[38;5;248mE/flutter (30506): #4      _MyAppState.build.<anonymous closure>[39;49m
[38;5;244mE/flutter (30506): #5      _InkResponseState._handleTap[39;49m
[38;5;244mE/flutter (30506): #6      _InkResponseState.build.<anonymous closure>[39;49m
[38;5;244mE/flutter (30506): #7      GestureRecognizer.invokeCallback[39;49m
[38;5;244mE/flutter (30506): #8      TapGestureRecognizer.handleTapUp[39;49m
[38;5;244mE/flutter (30506): #9      BaseTapGestureRecognizer._checkUp[39;49m
[38;5;244mE/flutter (30506): #10     BaseTapGestureRecognizer.handlePrimaryPointer[39;49m
[38;5;244mE/flutter (30506): #11     PrimaryPointerGestureRecognizer.handleEvent[39;49m
[38;5;244mE/flutter (30506): #12     PointerRouter._dispatch[39;49m
[38;5;244mE/flutter (30506): #13     PointerRouter._dispatchEventToRoutes.<anonymous closure>[39;49m
[38;5;244mE/flutter (30506): #14     _LinkedHashMapMixin.forEach  (dart:collection-patch/compact_hash.dart:379:8)[39;49m
[38;5;244mE/flutter (30506): #15     PointerRouter._dispatchEventToRoutes[39;49m
[38;5;244mE/flutter (30506): #16     PointerRouter.route[39;49m
[38;5;244mE/flutter (30506): #17     GestureBinding.handleEvent[39;49m
[38;5;244mE/flutter (30506): #18     GestureBinding.dispatchEvent[39;49m
[38;5;244mE/flutter (30506): #19     GestureBinding._handlePointerEvent[39;49m
[38;5;244mE/flutter (30506): #20     GestureBinding._flushPointerEventQueue[39;49m
[38;5;244mE/flutter (30506): #21     GestureBinding._handlePointerDataPacket[39;49m
[38;5;244mE/flutter (30506): #22     _rootRunUnary  (dart:async/zone.dart:1138:13)[39;49m
[38;5;244mE/flutter (30506): #23     _CustomZone.runUnary  (dart:async/zone.dart:1031:19)[39;49m
[38;5;244mE/flutter (30506): #24     _CustomZone.runUnaryGuarded  (dart:async/zone.dart:933:7)[39;49m
[38;5;244mE/flutter (30506): #25     _invoke1  (dart:ui/hooks.dart:273:10)[39;49m
[38;5;244mE/flutter (30506): #26     _dispatchPointerDataPacket  (dart:ui/hooks.dart:182:5)[39;49m
E/flutter (30506):
V/ContentValues(30506): Method: unregister

Why does it happen ?

@devtronic
Copy link
Member

What's the output of flutter --version?

@agnoam
Copy link
Author

agnoam commented Feb 5, 2020

Result of flutter --version:

Waiting for another flutter command to release the startup lock...
Flutter 1.13.6 • channel beta • https://github.com/flutter/flutter.git
Framework • revision 659dc8129d (5 weeks ago) • 2019-12-30 09:24:47 -0800
Engine • revision bdc9708d23
Tools • Dart 2.8.0 (build 2.8.0-dev.0.0 c547f5d933)

@devtronic
Copy link
Member

Sorry for the delay. I'll take a look on that this week

@devtronic devtronic self-assigned this Mar 2, 2020
@devtronic devtronic added the bug Something isn't working label Mar 2, 2020
@agnoam
Copy link
Author

agnoam commented Mar 2, 2020

Thanks a lot

@Tkko
Copy link

Tkko commented Mar 25, 2020

I'm facing the same issue:

flutter --version
Flutter 1.12.13+hotfix.8 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 0b8abb4724 (6 weeks ago) • 2020-02-11 11:44:36 -0800
Engine • revision e1e6ced81d
Tools • Dart 2.7.0

@thirdmusketeer
Copy link

I'm facing same issue:

Flutter 1.21.0-6.0.pre.91 • channel master • https://github.com/flutter/flutter.git Framework • revision aeedd71e84 (5 hours ago) • 2020-07-29 03:41:03 -0400 Engine • revision a9910e409c Tools • Dart 2.10.0 (build 2.10.0-1.0.dev 24c7666def)

/flutter ( 6973): On Discover V/ContentValues( 6973): Method: discover E/flutter ( 6973): [ERROR:flutter/lib/ui/ui_dart_state.cc(167)] Unhandled Exception: PlatformException(2, null, null) E/flutter ( 6973): #0 StandardMethodCodec.decodeEnvelope package:flutter/…/services/message_codecs.dart:572 E/flutter ( 6973): #1 MethodChannel._invokeMethod package:flutter/…/services/platform_channel.dart:161 E/flutter ( 6973): <asynchronous suspension> E/flutter ( 6973): #2 MethodChannel.invokeMethod package:flutter/…/services/platform_channel.dart:334 E/flutter ( 6973): #3 FlutterP2p.discoverDevices package:flutter_p2p/plugin.dart:48 E/flutter ( 6973): #4 _MyAppState.build.<anonymous closure> package:easyshare/main.dart:163 E/flutter ( 6973): #5 _InkResponseState._handleTap package:flutter/…/material/ink_well.dart:992 E/flutter ( 6973): #6 _InkResponseState.build.<anonymous closure> package:flutter/…/material/ink_well.dart:1101 E/flutter ( 6973): #7 GestureRecognizer.invokeCallback package:flutter/…/gestures/recognizer.dart:183 E/flutter ( 6973): #8 TapGestureRecognizer.handleTapUp package:flutter/…/gestures/tap.dart:523 E/flutter ( 6973): #9 BaseTapGestureRecognizer._checkUp

@coderider007
Copy link

Hi @devtronic,

Any update on this?

Below are my flutter version details: flutter --version

Flutter 1.20.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 216dee60c0 (5 days ago) • 2020-09-01 12:24:47 -0700
Engine • revision d1bc06f032
Tools • Dart 2.9.2

@naiba
Copy link

naiba commented Jan 12, 2021

Maybe there is a fake issue, try to turn on your GPS, and restart the app. 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants