Closed rho558 closed 1 year ago
Hi @rho558, I just published easy_onvif: ^2.0.13+15 which I believe will resolve the issue. Let me know?
If not, I'll need you to enable debug
level logging and give the log results to have enough info for me to properly diagnose the issue.
@faithoflifedev thank you for replying, unfortunately easy_onvif: ^2.0.13+15 didn't work and the same issue is still there, and after googling and trying to log i don't know how to enable debug level logging, i only get the same exact log as the initial log i posted, do you mind helping me on this one?
@rho558, the simplest way to get the debug info in this case would be by trying to connect to the onvif device through the supplied onvif
cli. In the terminal:
dart pub global activate easy_onvif
onvif authorize
#follow the prompts
onvif device-management get-device-information --log-level debug
Hey, thanks for the help, I'm sorry it took me so long to get back to you. I've tried the cli thing and this is what i got.
� 14:10:56.694824 INFO UI Loggy - Onvif - initializing ...
� 14:10:56.710443 DEBUG UI Loggy - DeviceManagement - getSystemDateAndTime
� 14:10:56.789062 DEBUG UI Loggy - Onvif - URI: http://192.168.1.2:8000/onvif/device_service
� 14:10:56.789062 DEBUG UI Loggy - Onvif - REQUEST:
<?xml version="1.0" encoding="UTF-8"?>
Unhandled exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
Hi @rho558 , this is exactly what I needed.
It looks like your onvif device is really lax on following the documented standard. It's not responding with the required fields for the given request. I've updated the code to accommodate this. A new version easy_onvif: 2.0.13+16
has just been published.
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'Map<String, dynamic>' in type cast
0 _$SystemDateAndTimeFromJson (package:easy_onvif/src/model/system_date_and_time.g.dart:12:32)
1 new SystemDateAndTime.fromJson (package:easy_onvif/src/model/system_date_and_time.dart:46:7)
2 _$GetSystemDateAndTimeResponseFromJson (package:easy_onvif/src/model/system_date_time_response.g.dart:12:25)
3 new GetSystemDateAndTimeResponse.fromJson (package:easy_onvif/src/model/system_date_time_response.dart:18:7)
4 _$BodyFromJson (package:easy_onvif/src/model/body.g.dart:43:42)
5 new Body.fromJson (package:easy_onvif/src/model/body.dart:214:55)
6 _$EnvelopeFromJson (package:easy_onvif/src/model/envelope.g.dart:10:18)
7 new Envelope.fromJson (package:easy_onvif/src/model/envelope.dart:20:7)
8 new Envelope.fromXml (package:easy_onvif/src/model/envelope.dart:23:16)
9 Soap.retrieveEnvelope (package:easy_onvif/src/soap.dart:67:21)