CCExtractor / beacon

Flutter application to share location with a group. (under development)
56 stars 146 forks source link

Cannot join beacon #189

Closed Omegaviv closed 1 year ago

Omegaviv commented 1 year ago

Currently when anyone tries to join a hike the app throughs an exception or breaks.

When the hike creator tries to join the app shuts down with following log

E/AndroidRuntime( 7614): java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected (declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears in /data/app/~~iEClb5LwHsMs11IjqHfeog==/com.example.beacon-jLueS9h_PrJ7Px5Fr0_5NA==/base.apk)
E/AndroidRuntime( 7614):    at com.lyokone.location.FlutterLocation.createLocationCallback(FlutterLocation.java:219)
E/AndroidRuntime( 7614):    at com.lyokone.location.FlutterLocation.changeSettings(FlutterLocation.java:197)
E/AndroidRuntime( 7614):    at com.lyokone.location.MethodCallHandlerImpl.onChangeSettings(MethodCallHandlerImpl.java:106)
E/AndroidRuntime( 7614):    at com.lyokone.location.MethodCallHandlerImpl.onMethodCall(MethodCallHandlerImpl.java:40)
E/AndroidRuntime( 7614):    at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:262)
E/AndroidRuntime( 7614):    at io.flutter.embedding.engine.dart.DartMessenger.invokeHandler(DartMessenger.java:295)
E/AndroidRuntime( 7614):    at io.flutter.embedding.engine.dart.DartMessenger.lambda$dispatchMessageToQueue$0$io-flutter-embedding-engine-dart-DartMessenger(DartMessenger.java:319)
E/AndroidRuntime( 7614):    at io.flutter.embedding.engine.dart.DartMessenger$$ExternalSyntheticLambda0.run(Unknown Source:12)
E/AndroidRuntime( 7614):    at android.os.Handler.handleCallback(Handler.java:942)
E/AndroidRuntime( 7614):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 7614):    at android.os.Looper.loopOnce(Looper.java:240)
E/AndroidRuntime( 7614):    at android.os.Looper.loop(Looper.java:351)
E/AndroidRuntime( 7614):    at android.app.ActivityThread.main(ActivityThread.java:8364)
E/AndroidRuntime( 7614):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 7614):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
E/AndroidRuntime( 7614):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)
I/Process ( 7614): Sending signal. PID: 7614 SIG: 9
Lost connection to device.
Failed to send request: {"jsonrpc":"2.0","id":"892","method":"getMemoryUsage","params":{"isolateId":"isolates/1006626711108963"}}

When a user other than the creator tries to join the hike it through the following exception, and the apps keeps loading

E/flutter ( 7614): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: NoSuchMethodError: The getter 'id' was called on null.
E/flutter ( 7614): Receiver: null
E/flutter ( 7614): Tried calling: id
E/flutter ( 7614): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
E/flutter ( 7614): #1      HikeScreenViewModel.dispose.<anonymous closure> (package:beacon/view_model/hike_screen_model.dart:406:50)
E/flutter ( 7614): <asynchronous suspension>
E/flutter ( 7614): 
Omegaviv commented 1 year ago

I would like to work on this.

ItsAdityaKSingh commented 1 year ago

Have you setup the latest backend and run the app with the required env variables?

Omegaviv commented 1 year ago

Yes I have

Omegaviv commented 1 year ago

Maps are working, because when we click on at trek that is completed it shows the map properly

Omegaviv commented 1 year ago

@ItsAdityaKSingh can you also check this if it is working for you?

Omegaviv commented 1 year ago

HTTP_ENDPOINT=https://o3q4rk1pdi.execute-api.us-east-1.amazonaws.com/prod/ WEBSOCKET_ENDPOINT=wss://o3q4rk1pdi.execute-api.us-east-1.amazonaws.com/subscriptions

are these the end point you are using, if it's working for you? can you share yours?

ItsAdityaKSingh commented 1 year ago

So you have hosted the backend online and using it for checking the app? Is the backend responding without any errors? You could also host it offline to check the app.

Omegaviv commented 1 year ago

I have not hosted it myself, this backend is hosted by @canihavesomecoffee for testing purpose

Omegaviv commented 1 year ago

resolved at #206