-
-
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
getProfiles error #20
Comments
@hauptanja this is likely due to your camera giving an unexpected response (not following the ONVIF spec). If you enable the debugging functionality within easy_onvif, you can have the response from the camera logged. If you provide the response, and the camera model, I may be able to adjust the code to accommodate the difference. |
|
Hi @hauptanja, The info you have provided has allowed me to identify the issue with the code. I'll be publishing an updated version in a few hours. |
Thanks a lot! |
It took a few tries, but v2.0.13+5 has the fix. |
I still get the same error...
|
Hi @hauptanja , It's actually a different error. It looks like the device you're using isn't properly following the Onvif spec in terms of it's response for video encoder configuration info. Per the spec, I've made an update to make the field optional, but there are still other video encoder configuration fields that are required that may cause issues, in addition to other configuration elements that the code may be looking for further along in processing the device response. v2.0.13+6 has been published |
|
|
thanks, it works now :) |
I have a problem with flutter sdk: '>=2.18.0 <3.0.0` on MacOS 12.5.1 when i try to connect to a camera and i call getProfiles:
[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 _$VideoEncoderConfigurationFromJson (package:easy_onvif/model/video_encoder_configuration.g.dart:15:53) #1 new VideoEncoderConfiguration.fromJson (package:easy_onvif/model/video_encoder_configuration.dart:76:7) #2 _$ProfileFromJson (package:easy_onvif/model/profile.g.dart:23:39) #3 new Profile.fromJson (package:easy_onvif/model/profile.dart:65:7) #4 _$GetProfilesResponseFromJson.<anonymous closure> (package:easy_onvif/model/profiles_response.g.dart:12:31) #5 MappedListIterable.elementAt (dart:_internal/iterable.dart:413:31) #6 ListIterator.moveNext (dart:_internal/iterable.dart:342:26) #7 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:189:27) #8 new _GrowableList.of (dart:core-patch/growable_array.dart:150:28) #9 new List.of (dart:core-patch/array_patch.dart:51:28) #10 ListIterable.toList (dart:_internal/iterable.dart:213:44) #11 _$GetProfilesResponseFromJson (package:easy_onvif/model/profiles_response.g.dart:13:12) #12 new GetProfilesResponse.fromJson (package:easy_onvif/model/profiles_response.dart:22:7) #13 _$BodyFromJson (package:easy_onvif/model/body.g.dart:76:33) #14 new Body.fromJson (package:easy_onvif/model/body.dart:201:55) #15 _$EnvelopeFromJson (package:easy_onvif/model/envelope.g.dart:10:18) #16 new Envelope.fromJson (package:easy_onvif/model/envelope.dart:20:7) #17 new Envelope.fromXml (package:easy_onvif/model/envelope.dart:23:16) #18 Soap.retrieveEnvelope (package:easy_onvif/src/soap.dart:67:21) <asynchronous suspension> #19 Media.getProfiles (package:easy_onvif/src/media.dart:45:22)
The text was updated successfully, but these errors were encountered: