-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type exception (int/bool subtype) when targeting iOS device (10.3.3) #111
Comments
And I see you're on I'm on |
Thanks for the quick response Chris - I've backed down to 1.7.8+ but I still see the type exception [VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: type 'int' is not a subtype of type 'bool' 🔥 To hot reload changes while running, press "r". To hot restart (and rebuild state), press "R". [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • No issues found! Will try going through the state source and comment out as suggested to see if it can get by. |
in Put this in there: here it's a static Future<State> ready(Config config) async {
Map state = await _methodChannel.invokeMethod('ready', config.toMap());
+ print("*************** BEFORE new State: disableElasticity: ${state['disableElasticity']}");
return new State(state);
}
Also, see if you can reproduce this on iOS 12 sim (I doubt you will). |
Hey Chris, Looks like your suspicions are correct - here's the output from the snippet: flutter: *************** BEFORE new State: disableElasticity: 0 And yes, running this on an iPhone XR (12.2) in the simulator (or my Android device...), no problem. Wondering if this is a case of finding a new lower bound on system requirements for the plugin or do you see it as something that is resolvable in the near term? |
It can be supported by doing something like this, checking the |
This seems to resolve the runtime type issue - looks like I can't create a PR directly, but here's a patch file (.txt) in case you find it helpful. BTW - great plugin, really enjoying getting to know my way around. 0001-fix-runtime-type-issue-int-bool-found-on-older-physi.patch.txt |
Of course a pr can be made directly, but I’ve already provided int checks for all bool params. Will be pushed tomorrow. |
I mean no write for branch creation (I looked) - suppose I could fork. Regardless, thanks for the update. |
Yes, that’s how github PR workflow generally works. You fork then submit PR back. |
Try installing from master. See README Installing from Git |
Verified - thanks! |
FYI, just noticed an additional runtime type buried in the logs - line 138: e.g
Oddly, it didn't appear to be fatal when I was running on validation (but then I'm battling an unrelated cloud firestore issue - so it may have gotten buried. |
Re-install from master. I've created some helper methods |
Let me know if current master is all good for you. |
Check - looks great, thanks! |
Just FYI, pulled out my old iPhone 5c for testing a build and this cropped up again, so you may want to reopen. Looks like the state fields for 'disableAutoSyncOnCellular' and 'encrypt' require the _ensureBool wrapper. |
Damn. I’m on vacation until next week. |
results in crash on physical iOS device (iPhone 5c) issue transistorsoft#111
Hey Chris - put up a small PR in case that helps. |
Thanks
On Mon, Mar 2, 2020 at 10:31 PM Todd Lee ***@***.***> wrote:
Hey Chris - put up a small PR in case that helps.
Verified this works as expected on the iPhone 5c
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#111?email_source=notifications&email_token=AAADVF7OSNEIIAZCBDN6DFDRFRTZDA5CNFSM4IPHVAF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENR22YY#issuecomment-593735011>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADVF7KELIRZZ5GGRM4FLDRFRTZDANCNFSM4IPHVAFQ>
.
--
Snet form Gmail Mobile
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and I will leave this open. |
Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you. |
Your Environment
flutter doctor
):Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.9.3-pre.49, on Mac OS X 10.14.5 18F132, locale en-CA)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
[✓] Android Studio (version 3.2)
[✓] Connected device (3 available)
• No issues found!
Expected Behavior
flutter run -d
should build/install run app on device
Actual Behavior
appears to get an error regarding int/bool types related to state config
Steps to Reproduce
2.flutter run -d
Context
build/run app on physical iOS device (iPhone 5c)
Debug logs
Logs
Running pod install... 25.1s
Running Xcode build...
├─Assembling Flutter resources... 13.5s
└─Compiling, linking and signing... 44.3s
Xcode build done. 184.6s
Configuring the default Firebase app...
Configured the default Firebase app __FIRAPP_DEFAULT.
Installing and launching... 63.4s
Syncing files to device Todd’s iPhone...
flutter: [providerchange] - [ProviderChangeEvent enabled:true, status: 3, network: true, gps: true]
[VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: type 'int' is not a subtype of type 'bool' #0 new State (package:flutter_background_geolocation/models/state.dart:49:36) #1 BackgroundGeolocation.ready (package:flutter_background_geolocation/background_geolocation.dart:215:16)
#2 _StateWidgetState.initLocationPlugin (package:yelobus/state_widget.dart:162:30) #3 _AsyncAwaitCompleter.start (dart:async-patch/async_patch.dart:43:6) #4 _StateWidgetState.initLocationPlugin (package:yelobus/state_widget.dart:82:34) #5 _StateWidgetState.initState (package:yelobus/state_widget.dart:49:5) #6 StatefulElement._firstBuild (package:flutter/src/widgets/framework.dart:4061:58) #7 ComponentElement.mount (package:flutter/src/widgets/framework.dart:3912:5) #8 Element.inflateWidget (package:flutter/src/widgets/framework.dart:3094:14) #9 Element.updateChild (package:flutter/src/widgets/framework.dart:2897:12) #10 RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:1011:16) #11 RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:982:5) #12 RenderObjectToWidgetAdapter.attachToRenderTree. (package:flutter/src/widgets/binding.dart:928:17)
#13 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2321:19) #14 RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:927:13) #15 WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:808:7) #16 runApp (package:flutter/src/widgets/binding.dart:858:7) #17 main (package:yelobus/main.dart:10:3) #18 _runMainZoned.. (dart:ui/hooks.dart:229:25) #19 _rootRun (dart:async/zone.dart:1124:13) #20 _CustomZone.run (dart:async/zone.dart:1021:19) #21 _runZoned (dart:async/zone.dart:1516:10) #22 runZoned (dart:async/zone.dart:1500:12) #23 _runMainZoned. (dart:ui/hooks.dart:221:5) #24 _startIsolate. (dart:isolate-patch/isolate_patch.dart:305:19) #25 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12) flutter: [location] - [Location {odometer: 0.0, is_moving: false, battery: {level: -1.0, is_charging: false}, coords: {altitude: 239.9, floor: null, speed: -1.0, latitude: 43.202435788257105, longitude: -79.99613660856787, accuracy: 65.0, altitude_accuracy: 10.0, heading: -1.0}, sample: true, timestamp: 2019-08-25T01:16:16.343Z, extras: {}, activity: {type: unknown, confidence: 100}, uuid: 1464C74A-10AA-4023-81F5-C7C5FF56BDB0}]
flutter: [location] - [Location {odometer: 0.0, is_moving: false, battery: {level: -1.0, is_charging: false}, coords: {altitude: 239.9, floor: null, speed: -1.0, latitude: 43.202435788257105, longitude: -79.99613660856787, accuracy: 65.0, altitude_accuracy: 10.0, heading: -1.0}, sample: true, timestamp: 2019-08-25T01:16:16.390Z, extras: {}, activity: {type: unknown, confidence: 100}, uuid: 02BD3C9C-C0EE-4585-BB24-045E10BC8301}]
flutter: [location] - [Location {odometer: 0.0, is_moving: false, battery: {level: -1.0, is_charging: false}, coords: {altitude: 239.9, floor: null, speed: -1.0, latitude: 43.20243723743637, longitude: -79.99613977505673, accuracy: 65.0, altitude_accuracy: 10.0, heading: -1.0}, extras: {}, timestamp: 2019-08-25T01:16:16.732Z, activity: {type: unknown, confidence: 100}, uuid: 78B6563E-F930-4871-98DB-11CB8A49C1C3}]
Could not update files on device: OS Error: Connection reset by peer, errno = 54
Note that _StateWidgetState.initLocationPlugin (package:yelobus/state_widget.dart:162:30) is the call to bg.BackgroundGeolocation.ready(bg.Config
The text was updated successfully, but these errors were encountered: