-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
HttpException: Connection closed while receiving data #14
Comments
Hello @chaichin, I just published v1.0.8 which adds logging capabilities to the package. I recommend that you run the "flutter_model" example project and then supply the log file produced. If the log file identifies a problem with the code I'll be happy to do what I can to fix it. Otherwise, if it's a specific issue related to supporting your specific device (Huawei camera), I may not be able to help. Unfortunately I only have a few camera models to test with, so I can't guarantee functionality beyond those few models. |
Hi @chaichin , v1.0.9 has been published and fixes a number of bugs identified when testing against different manufacturers Onvif devices. Let me know if this resolves your issue. |
hi @faithoflifedev I was able to connect and get the model details. However, it works randomly as sometimes i trigger the connection it returns me the model result and sometimes it throws me the same exception. |
[ERROR:flutter/lib/ui/ui_dart_state.cc(198)] Unhandled Exception: FormatException: Invalid double I received this error upon calling this function : var profiles = await onvif.media.getProfiles(); |
Hello @chaichin , you would need to supply the log output for me to help with this? Most likely there is a value in the XML response from the Onvif device that is causing an issue in the code. |
#32 speaks to this issue |
final onvif = await Onvif.connect();
I use easy_onvif v1.0.6 to connect to a huawei camera IP.
Just by running these few lines of code to connect to the camera. It prompts me the below exception, any solution for this issue?
Exception has occurred.
_Exception (Exception: DioError [DioErrorType.other]: HttpException: Connection closed while receiving data, uri = http://192.168.0.99/onvif/device_service
Source stack:
#0 DioMixin.fetch (package:dio/src/dio_mixin.dart:488:35)
#1 DioMixin.request (package:dio/src/dio_mixin.dart:483:12)
#2 DioMixin.post (package:dio/src/dio_mixin.dart:97:12)
#3 Soap.send (package:easy_onvif/src/soap.dart:24:28)
#4 Soap.retrieveEnvlope (package:easy_onvif/src/soap.dart:50:37)
#5 DeviceManagement.getSystemDateAndTime (package:easy_onvif/src/device_management.dart:160:33)
#6 Onvif.initialize (package:easy_onvif/src/onvif_base.dart:60:46)
#7 Onvif.connect (package:easy_onvif/src/onvif_base.dart:40:17)
#8 _MyHomePageState.connectCamera (package:camera_huawei_test/main.dart:69:31)
#9 _MyHomePageState._incrementCounter (package:camera_huawei_test/main.dart:64:11)
#10 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:1005:21)
#11 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:198:24)
#12 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:613:11)
#13 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:298:5)
#14 BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:269:7)
#15 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:157:27)
#16 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:449:20)
#17 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:425:22)
#18 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:329:11)
#19 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:380:7)
#20 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:344:5)
#21 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:302:7)
#22 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:285:7)
#23 _rootRunUnary (dart:async/zone.dart:1442:13)
#24 _CustomZone.runUnary (dart:async/zone.dart:1335:19)
#25 _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
#26 _invoke1 (dart:ui/hooks.dart:170:10)
#27 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:331:7)
#28 _dispatchPointerDataPacket (dart:ui/hooks.dart:94:31)
)
The text was updated successfully, but these errors were encountered: