hippyau / rnc

Flutter App for remote configuring OrangePi firmwares by AvV
Other
5 stars 1 forks source link

MacOS: 0.4: flutter: type '_Smi' is not a subtype of type 'String' #4

Open vanvught opened 3 years ago

vanvught commented 3 years ago

Hi Hip, getting this error when DISPLAY_UDF is defined in the firmware.

flutter: GET /json/display.txt: {display.txt: {intensity: 127, sleep_timeout: 5, flip_vertically: 0, title: 0, board_name: 0, ip_address: 0, version: 0, universe: 0, active_ports: 0, hostname: 0, universe_port_a: 0, universe_port_b: 0, universe_port_c: 0, universe_port_d: 0, net_mask: 0, dmx_start_address: 0, default_gateway: 0, dmx_direction: 0}}
flutter: type '_Smi' is not a subtype of type 'String'
flutter: #0      _ConfigScreenState.configList.<anonymous closure> (package:rcmnode/confignodescreen.dart:203)
flutter: #1      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:400)
flutter: #2      _ConfigScreenState.configList (package:rcmnode/confignodescreen.dart:121)
flutter: #3      _ConfigScreenState._buildDirectoryList.<anonymous closure> (package:rcmnode/confignodescreen.dart:759)
flutter: #4      _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:400)
flutter: #5      _ConfigScreenState._buildDirectoryList (package:rcmnode/confignodescreen.dart:751)
flutter: #6      _ConfigScreenState.build (package:rcmnode/confignodescreen.dart:809)
flutter: #7      StatefulElement.build (package:flutter/src/widgets/framework.dart:4782)
flutter: #8      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4665)
flutter: #9      StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4840)
flutter: #10     Element.rebuild (package:flutter/src/widgets/framework.dart:4355)
flutter: #11     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2620)
flutter: #12     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:882)
flutter: #13     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:319)
flutter: #14     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1143)
flutter: #15     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1080)
flutter: #16     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:996)
flutter: #20     _invoke (dart:ui/hooks.dart:166)
flutter: #21     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:270)
flutter: #22     _drawFrame (dart:ui/hooks.dart:129)
flutter: (elided 3 frames from dart:async)
hippyau commented 3 years ago

Hey Arjan, I've definitely seen this one with linux_e131 firmware, it happened because retrieved file was empty, and not seen elsewhere yet... What is supposed to be in "Display Udf" ?

hippyau commented 3 years ago

Hey Arjan, I don't know about the "Display Udf" very well, is returning .... dmx_direction: 0}} In the .txt config files, this is string 'input' or 'output' , so this error is happening because I was not expecting 0 or 1....

Did it handle gracefully in the ui and show 0 / 1? I expect it showed "output"

I am simply matching any 'direction' in the attribute name as a switch... https://github.com/hippyau/rnc/blob/11ecd20fe2814a11334f357a109a67534e3093ab/lib/confignodescreen.dart#L202 ... but is expecting a string value, should I handle this and the attribute will always be integer for 'dmx_direction' in this file?

vanvught commented 3 years ago

Hi Hip,

The user can define their own display format -> https://www.orangepi-dmx.org/orange-pi/displays/user-defined-format

Schermafbeelding 2021-09-29 om 21 31 50

hippyau commented 3 years ago

Ahh, thanks that totally makes sense now :-)

Okay, I can support this.

On Thu, 30 Sep 2021, 05:34 Arjan, @.***> wrote:

Hi Hip,

The user can define their own display format -> https://www.orangepi-dmx.org/orange-pi/displays/user-defined-format

[image: Schermafbeelding 2021-09-29 om 21 31 50] https://user-images.githubusercontent.com/4319913/135336275-5ab8045c-409c-48ab-9da6-9ef4808373c0.png

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/hippyau/rnc/issues/4#issuecomment-930481758, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIWBBRKXD6JWCEMFSK2ACGLUENS25ANCNFSM5E53UNZA .