If my phoenix server is stopped, the client keeps on reconnecting every millisecond.

@matehat I still get this issue. If my phoenix server is stopped, the client keeps on reconnecting every millisecond if I don't pass any value to reconnectDelays. If I pass a list of Durations, only the first duration is taken and it keeps on reconnecting with the same interval instead of increasing as per the list.
On flutter 2.2 and latest version of the package.
I thought this was an issue with riverpod providers, but I can reproduce it with initializing the socket connection directly in the main method itself or as a global variable imported to join a channel.
Originally posted by @akashvibhute in https://github.com/braverhealth/phoenix-socket-dart/issues/6#issuecomment-845200357
Configuration -
final socketProvider = Provider<PhoenixSocket>(
  (ref) => PhoenixSocket(
    "wss://devserver/socket/websocket",
    socketOptions: PhoenixSocketOptions(
        timeout: Duration(seconds: 10),
        reconnectDelays: const [
          Duration(milliseconds: 1000),
          Duration(milliseconds: 2000),
          Duration(milliseconds: 4000),
        ],
        dynamicParams: () async {
          final authState = ref.read(authStateProvider.notifier);
          return {"token": authState.getAccessToken()};
        }), // this isn't relevent for this issue.
  )..connect(),
);

I'm just calling useProvider(socketProvider); in the main method. Same issue without riverpod as well.
I set the minium retry time to 1 sec, as by default it was attempting every millisecond and producing too many logs.
Reproduction logs
Restarted application in 825ms.
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:18:56.939882: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:18:56.956051: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:18:56.958758: Message encoded to [null, 0, phoenix, heartbeat, {}]
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:18:57.538519: Message decoded from [null, 0, phoenix, phx_reply, {response: {}, status: ok}]
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:18:57.539151: [phoenix_socket] Heartbeat completed
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:18:57.539814: Socket open
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:22.451241: Socket closed with reason  and code 1005
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:22.452441: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:23.452022: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:23.453258: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:23.453695: Message encoded to [null, 1, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:23.484705: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:23.485027: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:23.485542: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:23.485790: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:23.488674: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:23.488998: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:24.486638: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:24.487543: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:24.488076: Message encoded to [null, 2, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:24.508541: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:24.509775: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:24.511036: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:24.511312: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:24.511960: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:24.512206: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:25.512518: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:25.513490: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:25.513851: Message encoded to [null, 3, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:25.534022: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:25.535298: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:25.537307: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:25.537723: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:25.538317: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:25.538643: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:26.538532: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:26.539567: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:26.539914: Message encoded to [null, 4, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:26.558737: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:26.559032: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:26.559376: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:26.559549: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:26.559921: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:26.560095: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:27.560536: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:27.561375: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:27.561664: Message encoded to [null, 5, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:27.580908: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:27.581271: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:27.581745: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:27.582385: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:27.582994: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:27.583266: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:28.583647: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:28.584679: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:28.585136: Message encoded to [null, 6, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:28.603407: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:28.603667: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:28.603978: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:28.604134: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:28.604520: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:28.604731: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:29.605537: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:29.606410: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:29.606772: Message encoded to [null, 7, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:29.624923: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:29.625161: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:29.625418: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:29.625569: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:29.625979: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:29.626197: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:30.626691: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:30.627550: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:30.627962: Message encoded to [null, 8, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:30.647598: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:30.647932: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:30.648270: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:30.648437: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:30.648833: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:30.649026: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:31.649583: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:31.650399: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:31.650670: Message encoded to [null, 9, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:31.669689: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:31.669871: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:31.670079: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:31.670186: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:31.670440: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:31.670744: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:32.671484: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:32.672420: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:32.672822: Message encoded to [null, 10, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:32.691527: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:32.691707: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:32.691981: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:32.692115: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:32.692441: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:32.692630: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:33.693650: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:33.694682: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:33.694998: Message encoded to [null, 11, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:33.712079: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:33.712313: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:33.712564: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:33.712737: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:33.713051: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:33.713193: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:34.713489: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:34.714253: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:34.714522: Message encoded to [null, 12, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:34.732819: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:34.733069: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:34.733431: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:34.733686: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:34.734180: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:34.734409: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:35.734616: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:35.735640: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:35.736036: Message encoded to [null, 13, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:35.754110: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:35.754467: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:35.754887: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:35.755112: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:35.755684: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:35.755991: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:36.756617: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:36.757588: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:36.757954: Message encoded to [null, 14, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:36.776345: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:36.776591: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:36.776947: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:36.777197: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:36.777772: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:36.778015: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:37.778601: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:37.779607: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:37.779993: Message encoded to [null, 15, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:37.799642: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:37.800877: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:37.803034: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:37.804397: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:37.805396: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:37.805660: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:38.803484: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:38.804587: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:38.804944: Message encoded to [null, 16, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:38.825095: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:38.825411: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:38.825712: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:38.825854: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:38.826211: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:38.826431: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:39.827524: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:39.828399: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:39.828723: Message encoded to [null, 17, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:39.848001: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:39.848355: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:39.848851: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:39.849115: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:39.849670: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:39.851111: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:40.850623: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:40.851635: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:40.852103: Message encoded to [null, 18, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:40.870060: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:40.870342: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:40.870728: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:40.870948: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:40.871449: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:40.871673: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:41.871539: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:41.872508: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:41.872873: Message encoded to [null, 19, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:41.891164: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:41.891485: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:41.891863: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:41.892013: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:41.892366: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:41.892595: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:42.893542: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:42.894498: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:42.894871: Message encoded to [null, 20, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:42.913078: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:42.913463: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:42.913887: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:42.914111: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:42.914650: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:42.914891: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:43.915655: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:43.916601: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:43.916914: Message encoded to [null, 21, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:43.934943: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:43.935203: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:43.935578: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:43.935871: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:43.936380: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:43.936622: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:44.936456: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:44.937418: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:44.937785: Message encoded to [null, 22, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:44.955016: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:44.955362: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:44.955889: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:44.956146: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:44.956627: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:44.956873: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:45.957772: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:45.958865: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:45.959289: Message encoded to [null, 23, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:45.978039: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:45.978323: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:45.978583: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:45.978727: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:45.979044: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:45.979187: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:46.979477: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:46.980243: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:46.980509: Message encoded to [null, 24, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:47.000084: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:47.000358: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:47.000631: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:47.000864: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:47.001156: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:47.001290: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:48.001606: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:48.002852: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:48.003258: Message encoded to [null, 25, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:48.021347: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:48.021591: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:48.021942: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:48.022151: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:48.022720: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:48.022969: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:49.023539: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:49.024509: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:49.024895: Message encoded to [null, 26, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:49.044635: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:49.044975: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:49.045277: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:49.045422: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:49.045734: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:49.045875: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:50.046567: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:50.047503: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:50.047910: Message encoded to [null, 27, phoenix, heartbeat, {}]
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:50.077475: Error on socket
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:50.077739: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:50.078135: Socket closed with reason WebSocket could not establish a connection and code null
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:50.078377: Trigger channel exceptions on 0 channels
flutter: [phoenix_socket.socket] SEVERE 2021-05-21 09:19:50.078870: [phoenix_socket] Heartbeat message failed with error
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:50.079095: Trigger channel exceptions on 0 channels
flutter: PhoenixException: socket closed
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:51.079577: Attempting to connect to wss://devserver/socket/websocket?token&vsn=2.0.0
flutter: [phoenix_socket.socket] FINEST 2021-05-21 09:19:51.080562: Waiting for initial heartbeat roundtrip
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:51.080967: Message encoded to [null, 28, phoenix, heartbeat, {}]
flutter: [phoenix_socket.message] FINEST 2021-05-21 09:19:51.250710: Message decoded from [null, 28, phoenix, phx_reply, {response: {}, status: ok}]
flutter: [phoenix_socket.socket] FINE 2021-05-21 09:19:51.250811: [phoenix_socket] Heartbeat completed
flutter: [phoenix_socket.socket] INFO 2021-05-21 09:19:51.250861: Socket open

Initially phoenix server was running and connection was fine on app startup. Observed issue when server was stopped and reconnect attempts did not respect the specified durations. Connection established at the end again when phoenix server was restarted.
Please let me know if you need anything else.

Also the phoenix server is behind nginx reverse proxy if that helps, so nginx returns 502 response if phoenix is down,

I experienced the same problem 2 days ago. Not sure if something changed or just coincidence as I never worked on reconnection before then...
The root cause is here in socket.dart:
When the websocket is closed either by the server going offline or no internet connection (airplane mode will trigger it easily), _onSocketClosed() is called from the _onSocketError callback.
  void _onSocketError(dynamic error, dynamic stacktrace) {
     ...
    _onSocketClosed();
  }

Currently, _onSocketClosed does not specify any reconnection delay:
  void _onSocketClosed() {
    if (_shouldReconnect) {
      _delayedReconnect();
    }
   ...
  }

And  _delayedReconnect only takes the _options.reconnectDelays.first when a delay is not explicitly specified. The default value for _options.reconnectDelays.first is 0 so with default options, we have an infinite loop, when a reconnectDelays list is specified in PhoenixSocketOptions, only the first value is taken into account.
  Future<PhoenixSocket?> _delayedReconnect([Duration? delay]) async {
    if (_reconnecting) return null;

    _reconnecting = true;
    await Future.delayed(delay ?? _options.reconnectDelays.first);

    if (!_disposed) {
      _reconnecting = false;
      return connect();
    }

    return null;
  }

I have found a temporary work around which is to listen to closeStream events on the socket, in my case, I just close the socket and start a reconnection logic somewhere else in my app which will create and connect with a brand new socket.
_socket = PhoenixSocket(_websocketURL, socketOptions: _socketOptions);

_socket!.closeStream.listen((event) {
       // Catches all events, probably not ideal.
      _customReconnectionLogicHere();

      // Or can be more specific for the various code which may be received.
      if (event.code == 1002) {
        _customReconnectionLogicHere();
      }
});

Digging a bit further but I'm not familiar enough with the code to understand the intent, there may be a asynchronous error somewhere in the reconnection logic.
As we see above, a socket error triggers a chain of events leading ultimately to a call to connect() in _delayedReconnect().
connect() does implement its own correct delayed reconnection logic IF no error was caught during the websocket creation and connection.
When no internet is available, onError callback is triggered which calls _onSocketError in the catch clause and restarts the loop  by calling _onSocketClosed() which has no reconnection delay.
Future<PhoenixSocket?> connect() async {
    ...

    try {
      _ws = WebSocketChannel.connect(_mountPoint);
      _ws!.stream
          .where(_shouldPipeMessage)
          .listen(_onSocketData, cancelOnError: true)
            ..onError(_onSocketError)
            ..onDone(_onSocketClosed);
    } catch (error, stacktrace) {
      _onSocketError(error, stacktrace);
    }

Since _delayedReconnect() (a future) is not awaited by _onSocketClosed(), _onSocketClosed() and _onSocketClosed() do complete and some of the below code is executed (as seen in the logs) and quickly fails since the websocket _ws is already set back to null in _onSocketClosed().
    _socketState = SocketState.connecting;

    try {
      _socketState = SocketState.connected;
      _logger.finest('Waiting for initial heartbeat roundtrip');
      if (await _sendHeartbeat(ignorePreviousHeartbeat: true)) {
        _stateStreamController.add(PhoenixSocketOpenEvent());
        _logger.info('Socket open');
        completer.complete(this);
      } else {
        throw PhoenixException();
      }

The below reconnection logic is never reached
    } on PhoenixException catch (err) {
      print(err);
      final durationIdx = _reconnectAttempts++;
      _ws = null;
      _socketState = SocketState.closed;

      Duration duration;
      if (durationIdx >= _reconnects.length) {
        duration = _reconnects.last;
      } else {
        duration = _reconnects[durationIdx];
      }

      // Some random number to prevent many clients from retrying to
      // connect at exactly the same time.
      duration += Duration(milliseconds: _random.nextInt(1000));

      completer.complete(_delayedReconnect(duration));
    }

    return completer.future;
  }

I'm not sure if the intent was for the reconnection logic inside connect() to handle all cases but the call to _onSocketError() short-circuits that intent or if the delayed reconnection logic should simply be duplicated somewhere inside _onSocketClosed(). I guess the latter I think @matehat will know better.

hello @matehat, i don't know if it's related to this open issue, but i can't leave the connection

Fixed by #50

hello @matehat, i don't know if it's related to this open issue, but i can't leave the connection

I don't think it is. Can you retry with the latest version? It also includes a fix for the heartbeat.

hello @matehat, i don't know if it's related to this open issue, but i can't leave the connection

@redDwarf03 I don't think it is. Can you retry with the latest version? It also includes a fix for the heartbeat.

Hello. Cool, i'm happy you're working on your lib !! Sadly, i just test with then new version and i have always the heartbeat

Thank you for the information. Any impacts for the dart lib?

@redDwarf03 can you retry with the latest release?


change made in v2.02 seem fatal in vuejs component of a Laravel 5.3 project

Now, no error on compile with gulp... but not working anymore...
The change made in v2.02 seem fatal for me...
I notice you change install
I have tried to use in my component like this
<script type="text/babel">
    import draggable from 'vuedraggable'
    export default {
        components: [draggable],
....

=> no error, but drag n drop not working
i haved tried without component section => no error but not working
I have tried to use with old method:
import VueDraggable from 'vuedraggable'
Vue.use(VueDraggable)

=> Error message when component start on webpage and not working.
So, i'm back to v2.01 version and i have apply the workaround of cgarnier.
=> works fine.

Please use 2.0.3
Try:
  export default {
        components: {
          draggable
         }

instead of  components: [draggable]

arff ... i'am shame. the only thing who i have no tried... it's working with 2.03...
Many thanx and sorry for this mistake


fix: update harness to include fix to new boojum OOM

Upgrading boojum causes OOM. @aikixd made a fix to zkevm_test_harness that changes the mode of boojum to one that uses less memory. This PR updates harness to that version.

nice catch.. was about to do this


Box.s methods and test routines

_.box.sphereExpand method and test routine
_.box.planeDistance method and test routine
_.box.planeClosestPoint method and test routine
_.box.planeExpand method and test routine
_.box.frustumContains method and test routine
_.box.frustumDistance method and test routine
_.box.frustumClosestPoint method and test routine
_.box.frustumExpand method and test routine
_.sphere.pointContains and _.sphere.pointClosestPoint test routines
_.sphere.boxContains method and test routine
_.sphere.boxClosestPoint method and test routine
_.sphere.sphereContains method and test routine
_.sphere.sphereDistance method and test routine
_.sphere.sphereClosestPoint method and test routine
_.sphere.planeClosestPoint method and test routine
_.sphere.planeExpand method and test routine
_.sphere.frustumContains method and test routine
_.sphere.frustumDistance method and test routine
_.sphere.frustumClosestPoint method and test routine
_.sphere.frustumExpand method and test routine
_.frustum.pointDistance method and test routine
_.frustum.boxContains method and test routine
_.frustum.sphereContains method and test routine
_.frustum.planeIntersects method and test routine

very good!


[FEATURE REQUEST] - Parse Spreadsheet from html table

Description
Using style functions to format the worksheet can be a lot time consuming. So maybe introduce a feature that would parse existing html table to create worksheet.
New Functions

Parse(htmlPage string, data map[string]interface{}) Worksheet - This function would create the html table on the htmlPage using the data and parse the html to be used further

This issue about the DuplicateRow function similar with #772. I close this and merge it into issue #772 is still discussing this.


Bump teleport-kube-agent-app to v0.9.0

Towards https://github.com/giantswarm/giantswarm/issues/30580
What this PR does / why we need it

Bumps teleport-kube-agent-app to v0.9.0 which has toleration and nodeAffinity to prefer scheduling pods in control plane.

Checklist

[x] Update changelog in CHANGELOG.md.

E2E Tests

/run cluster-test-suites

Closing in favor of renovate PR.


Add error matchers for known warning or error strings

This add error matchers for known warning or error strings and report these inline.

Also works for with credo in flycheck format:
mix credo --format flycheck

Sample: https://github.com/mijailr/actions_sample/commit/a23f73ba43313897e97376800f01e67a14c1c7af#annotation_8344189283441892

@jclem please review

@mijailr Thanks for the PR! It’s a US holiday week and I’m out of the office until next week. I should be able to review then.

@mijailr Jose seemed to be implying that the best way to handle this is by using this behaviour:
https://hexdocs.pm/mix/Mix.Task.Compiler.html
It seems to be designed to allow "code editors to display issues inline without having to analyze the command-line output."
That said I don't really understand what you are doing and don't really know if it would be possible to add that into your pipeline.

@jclem Ok, happy weekend!
@whossname Yes, i see that on the mailing list, but is specific to a implementation of code, and require every project to implement that to make use of the Github Actions annotations.
Parsing the text with the API provided by actions/core is the easiest way to make a implementation usable for all projects.

Looks good to me! I wish that error output were a bit better (the error message is just (test)), but that would require a separate formatter.


RFC 11: Specification implementation design proposal

Specification design proposal
Specifications are logically composed of a set of traits. Each trait has a unique name and a set of properties, where each property is optional (i.e. "unset" is a valid state).
We reviewed several options for potential specification data structures, including

Classic C++ class composed of traits objects as members.
Classic C++ class with multiple inheritance of traits classes.
Wrapped dictionary with string property access and (mostly) run-time and (some) compile-time checks/optimisations.
Wrapped dictionary with "views" on subsets of properties as trait member functions.

The final option was selected for further development, since it meets the following design goals naturally.
Design goals
Extensible
Definable out of core (by host integrations/managers)
A dictionary type means that wrappers can be created at any point in almost any language. For example, JSON schemas could be used to automatically generate wrapper classes for any language. In addition, there is no runtime requirement for these wrappers to be present in order to pass the underlying data, without loss, through the system.
Hierarchical/Composable
To support "upcasting" to known specifications or traits
Applying a view on a dictionary is synonymous with upcasting.
Simple in structure
To simple data types for interop/serialisation
Dictionaries of primitive types are trivially serializable and are
common in many languages.
Robust
Compile-time checks for programming errors - property access or invalid method arguments
Once a view is applied to a dictionary, then property access should be through concrete accessor/mutator methods on the view class, removing a class of programmer error. Such methods can additionally implement validation beyond compiler/static analysis checks.
Discoverable
Runtime introspection/help
A simple dictionary type is naturally amenable to runtime introspection. A (JSON) schema could provide another reference point for developer help.
Trait/specification wrapper classes can additionally provide methods that return details of their supported properties.
Prototype
A notional prototype implementation was created, usage of which is summarised below.
Implementation notes:

The dictionary is a C++ std::unordered_map with std::string keys and std::variant values that store a std::optional wrapper around a primitive type (hence in the snippet below property::Bool is a std::optional<bool>). One tweak could be to remove std::optional  and instead remove elements from the dictionary to signify "unset".
BaseSpecification wraps the dictionary and has a number of virtual methods defining the specification interface, but provides no validation on its own.
ConcreteSpecification is a template class that uses multiple inheritance to mix in traits (and has some compile-time niceties).

// .hpp

struct NukeTrait : BaseTrait<NukeTrait> {
  static constexpr std::string_view kName = "nuke";

  property::Bool getUsesNukeX() const;
  void setUsesNukeX(property::Bool value);
};

struct FileTrait : BaseTrait<FileTrait> {
  static constexpr std::string_view kName = "file";

  property::Bool getIsBig() const;
  void setIsBig(property::Bool value);
};

struct NukeScriptSpecification
    : ConcreteSpecification<NukeTrait, FileTrait> {

  using ConcreteSpecification<NukeTrait, FileTrait>::
      ConcreteSpecification;
};

// .cpp

property::Bool NukeTrait::getUsesNukeX() const {
  return getProperty<property::Bool>("usesNukeX");
}
void NukeTrait::setUsesNukeX(property::Bool value) {
  setProperty("usesNukeX", value);
}

property::Bool FileTrait::getIsBig() const {
  return getProperty<property::Bool>("isBig");
}
void FileTrait::setIsBig(property::Bool value) {
  setProperty("isBig", value);
}

// Usage

void doWork(BaseSpecification& spec) {
  // Naively: check if `spec` has "file" trait and do some work if so.
  //  Note: may throw an exception if the dict doesn't have the value.

  if (static_cast<bool>(spec.dict->count("file"))) {
    std::cout << "isBig = "
              << std::get<property::Bool>(
                  spec.dict->at("file").at("isBig")).value_or(false)
              << std::endl;
  }

  // Better: upcast to the trait class.

  auto const* fileTrait = dynamic_cast<FileTrait const*>(&spec);
  if (fileTrait) {
    std::cout << "isBig = "
              << fileTrait->getIsBig().value_or(false)
              << std::endl;
  }

  // Alternatively: apply a "view" of the trait to the specification's
  // dictionary.

  if (spec.hasTrait("file")) {
    FileTrait const fileTraitView{spec.dict};

    std::cout << "isBig = "
              << fileTraitView.getIsBig().value_or(false)
              << std::endl;
  }
}

C interface
A C API operating on an opaque handle to a specification dictionary should be straightforward, for example
extern "C"
{
typedef int ErrorCode;
typedef char[500] ErrorMessage;

/**
 * Get an integer property from a specification dictionary.
 */
ErrorCode openassetio_Specification_getProperty_i(
    ErrorMessage err, bool* outIsSet, int* outValue,,
    SpecificationHandle handle,
    char const* traitName, char const* propertyName) {

  auto spec = reinterpret_cast<BaseSpecification*>(handle);

  property::Value prop;

  try {
    prop = spec.dict->at(traitName).at(propertyName);

  } catch (std::out_of_range const& ex) {
    *outIsSet = false;
    return 0;

  } catch (std::exception const& ex) {
    strncpy(err, ex.what(), sizeof(ErrorMessage)-1);
    err[sizeof(ErrorMessage)-1] = '\0';
    return 1;
  }

  try {
    auto const propAsInt = std::get<property::Int>(prop);

    if (!propAsInt.has_value()) {
      *outIsSet = false;
      return 0;
    }

    *outIsSet = true;
    *outValue = *propAsInt;

  } catch (std::exception const& ex) {
    strncpy(err, ex.what(), sizeof(ErrorMessage)-1);
    err[sizeof(ErrorMessage)-1] = '\0';
    return 1;
  }
}
}

Similar methods would have to be constructed for each possible primitive value type (bool, int, double, string), and a slightly more complex variant would be required for the (string -> primitive) dictionary value type.
Language bindings
We don't expect the C API to require much validation code in itself (e.g ensuring a trait supports the given property key before querying) since we expect the C API to be an interface for higher-level languages that will provide their own wrappers implementing validation at run-time or via a strongly typed interface.

@feltech also found https://app.quicktype.io/, which could be a great candidate for the autogeneration of language specific implementations from a simple, common definition.

Regarding the use of strncpy, does that compile cleanly under /W4 on Win32 or is _CRT_SECURE_NO_WARNINGS required?
Also, the use of a single, fixed-size buffer to store the exception message worries me a little: is this C-API explicitly single-threaded; what happens if the exception message is greater than 500 characters?

Forgive my ignorance here if I have things muddled, a question re:

// Better: upcast to the trait class.

Is the difference between this, and the alternate view application approach, that the upcast requires a runtime registry of factory functions to trait collections? So that during deserialization, the deserialization code can instantiate the correct ConcreteSpecification so that the dynamic_cast works?

Yes indeed, if the specification/trait collection has come from a deserialisation then some kind of registry is required.

Is a benefit of the view-based approach that in theory, the registry isn't needed as it is just the domain specific consuming code that has to know what view it wants, rather than the generic core API layer that might be handling the deserialisation?

Yeah that's a big advantage. Perhaps the specification/trait collection class only really needs hasTrait.
In the prototype the default implementation of hasTrait simply checks the top-level keys of the underlying dict. ConcreteSpecifications can be a little faster by scanning through the (BaseTrait) base class's identifiers, and even more optimised if you can upcast to the original class and use hasStaticTrait, which is entirely compile-time.
Having said that, for the most general case, perhaps trying to be clever with the specification/trait collection is just not worthwhile and it should just be (a lightweight wrapper around) a dict, with all access/mutation done by trait views (or rarely, directly to the dict).
I don't think we have a use case where the same set of traits could have different behaviour if wrapped in a different specification?  Or even that specifications provide any real functionality beyond holding traits?

Regarding the use of strncpy, does that compile cleanly under /W4 on Win32 or is _CRT_SECURE_NO_WARNINGS required?

I've not checked Windows.  I guess ideally we'd #ifdef to use strncpy_s (or whatever) if available.  I couldn't find a cross-platform safe strcpy in the standard library.

Also, the use of a single, fixed-size buffer to store the exception message worries me a little: is this C-API explicitly single-threaded; what happens if the exception message is greater than 500 characters?

An alternative would be to accept an arbitrary char* along with a max size.  It's just convenient to have a fixed-size array, to reduce boilerplate all round.  Indeed any error message that's too long will get cut off.

Thanks for filling in the gaps @feltech.

Yeah that's a big advantage. Perhaps the specification/trait collection class only really needs hasTrait.

Keeping it simpler and avoiding a runtime registry would certainly be a good thing. If we really found a use for it, it is something that we could add later without any consequences right?

In the prototype the default implementation of hasTrait simply checks the top-level keys of the underlying dict. ConcreteSpecifications can be a little faster by scanning through the (BaseTrait) base class's identifiers, and even more optimised if you can upcast to the original class and use hasStaticTrait, which is entirely compile-time.

I'm not sure we'll ever be able to be entirely compile time as any given host/manager code will never be able to see the code that creates the spec/trait in the first place? We'd only be compile time post dynamic_cast as the entry point to any method that considers a spec only ever sees one of the bases?

Having said that, for the most general case, perhaps trying to be clever with the specification/trait collection is just not worthwhile and it should just be (a lightweight wrapper around) a dict, with all access/mutation done by trait views (or rarely, directly to the dict).

Is the main Q then perhaps more one around #247 - in how would the specifics of this implementation affect removing resolveEntityReference, and relying on essentially return resolve(ref, BlobTrait.kName, context)[BlobTrait.kName][BlobTrait.kUrl], in terms of the overhead of resolving a million references?
All of this may be more costly, but if in practice that cost is always dwarfed by any real-world implementation, we could be ok. I'd take a punt that trying to make hosts batch resolves would be better way to ensure resolving doesn't slow down scene expansion in real world scenarios where resolve is backed by a service-backed system.
That being said though, we definitely have to make sure that the API is as thin as possible, for any given scenario where a manager already has an in-process, in-memory cached answer to any resolution.

I don't think we have a use case where the same set of traits could have different behaviour if wrapped in a different specification? Or even that specifications provide any real functionality beyond holding traits?

No, I think by design, they should never vary, as they're meant to be the formal definition of a well known, concrete set of fields.

Thanks for filling in the gaps @feltech.

Yeah that's a big advantage. Perhaps the specification/trait collection class only really needs hasTrait.

Keeping it simpler and avoiding a runtime registry would certainly be a good thing. If we really found a use for it, it is something that we could add later without any consequences right?

I agree that avoiding a registry would be ideal and could be added later if necessary.

In the prototype the default implementation of hasTrait simply checks the top-level keys of the underlying dict. ConcreteSpecifications can be a little faster by scanning through the (BaseTrait) base class's identifiers, and even more optimised if you can upcast to the original class and use hasStaticTrait, which is entirely compile-time.

I'm not sure we'll ever be able to be entirely compile time as any given host/manager code will never be able to see the code that creates the spec/trait in the first place? We'd only be compile time post dynamic_cast as the entry point to any method that considers a spec only ever sees one of the bases?

I agree it looks like compile-time niceties would be rare, if ever, in normal usage. For the hasStaticTrait example to work, the specification would have to be downcasted to the most-derived type, which would need some kind of registry, either implicit (a big if-else statement) or explicit as an openassetio feature.

Having said that, for the most general case, perhaps trying to be clever with the specification/trait collection is just not worthwhile and it should just be (a lightweight wrapper around) a dict, with all access/mutation done by trait views (or rarely, directly to the dict).

Is the main Q then perhaps more one around #247 - in how would the specifics of this implementation affect removing resolveEntityReference, and relying on essentially return resolve(ref, BlobTrait.kName, context)[BlobTrait.kName][BlobTrait.kUrl], in terms of the overhead of resolving a million references?

Another possibly is to bake into the trait class so return BlobTrait::fromEntityReference(ref).getUrl().

All of this may be more costly, but if in practice that cost is always dwarfed by any real-world implementation, we could be ok. I'd take a punt that trying to make hosts batch resolves would be better way to ensure resolving doesn't slow down scene expansion in real world scenarios where resolve is backed by a service-backed system.

There are other low-level tweaks we can add to squeeze out better performance, either by using a more optimal dictionary library or by tweaking the parameters to the std library (e.g. reserveing the space required for properties, tweaking the bucket count, etc)

Keeping it simpler and avoiding a runtime registry would certainly be a good thing. If we really found a use for it, it is something that we could add later without any consequences right?

I agree that avoiding a registry would be ideal and could be added later if necessary.

Is it worth removing the middle cast based option from the illustration, and we can call #226 done?

Is it worth removing the middle cast based option from the illustration, and we can call #226 done?

Edited the proposal (also added missing return in the C implementation)

Closing issue as high-level approach ratified, and work under way in #255.


Modify interaction does not pass expected coordinate to condition function.

Describe the bug
When user clicks on a LineString feature (with default pixelTolerance of 10), arg1.coordinate in condition function is the real coordinate clicked, not the one considering pixelTolerance. for example if I click on the first coordinate of a LineString feature, the passed coordinate is not equal to feature.getGeometry().getFirstCoordinate();
I don't see this issue in draw interaction.

Expected behavior
when I click on the first coordinate of a LineString feature in modify interaction, arg1.coordinate should be equal to feature.getGeometry().getFirstCoordinate(); since snapping is available.

The pixelTolerance in the Modify interaction is something the Draw interaction does not have, and it is not meant to modify the event coordinate. If you want that, you'll also need to add a Snap interaction to your map, and make sure it is added after the Modify interaction. Interactions are executed in the reverse order they are added.

Oh great! thanks.


boolean values are omitted when generate a RequestResponsePact from a Contract

I am using the ToFileContractsTransformer in version 3.0.4 to generate a PACT file from a Contract for HTTP as described in the reference documentation : https://docs.spring.io/spring-cloud-contract/docs/3.0.0/reference/htmlsingle/#how-to-generate-pact-from-scc.
My Contract looks like this :
package com.test

import org.springframework.cloud.contract.spec.Contract

Contract.make {
    description("""
Some description...
""")
    request {
       ...
    }
    response {
        body(
                [[
                         number  : 1,
                         string      : "Some string",
                         bool        : true
                 ]]
        )
    }
}

The generate PACT file looks like this :
{
    "provider": {
        "name": "..."
    },
    "consumer": {
        "name": "..."
    },
    "interactions": [
        {
            "description": "Some description",
            "request": {
                ...
            },
            "response": {
                "body" : "[{\"number\":1,\"string\":\"Some string\"}]",
            }
        }
    ],
    "metadata": {
        "pactSpecification": {
            "version": "3.0.0"
        },
        "pact-jvm": {
            "version": "4.0.10"
        }
    }
}

I have also tried by setting the response body as string and I get the same result.
Is there another way to declare boolean values in request or response body ?
Thanks in advance.

That should work, it looks like a bug


runtime(doc): deduplicate getpos(), line(), col(), virtcol()

Move the main description to getpos() and link to that from other
functions.

thanks!


pager ack! 400 error

I am getting this error when I am doing a Hubot pager ack!
Everything works fine when I do a Hubot pager ack <incident number>
https://gist.github.com/d4v3y0rk/2edb0cab3e324e9ef05b
User: awesomeuser asked me to "botzo pager ack!" in Channel: web-ops
400
{"error":{"message":"Invalid Input Provided","code":2001,"errors":["Status must be a list of triggered, acknowledged, or resolved."]}}
[Fri Oct 30 2015 13:58:00 GMT+0000 (UTC)] ERROR TypeError: Cannot read property 'incidents' of null
  at /opt/botzo/node_modules/hubot-pager-me/src/scripts/pagerduty.coffee:670:7, <js>:810:23
  at /opt/botzo/node_modules/hubot-pager-me/src/scripts/pagerduty.coffee:511:9, <js>:601:16
  at IncomingMessage.<anonymous> (/opt/botzo/node_modules/hubot/node_modules/scoped-http-client/src/index.js:95:22)
  at IncomingMessage.emit (events.js:129:20)
  at _stream_readable.js:908:16
  at process._tickCallback (node.js:355:11)

May be related to #56 (/cc @codywilbourn) -- planning to ship a patch today if there aren't any objections.

Yes this is the same issue I ran in to. ack <num> works, ack and ack! do not.

Fixed in v2.1.7


UDS Client

Implement all UDS SIDs from ISO Standard

[ ]   Diagnostic and Communication Management

[x]     DiagnosticSessionControl = 0x10
[x]     EcuReset = 0x11
[x]     SecurityAccess = 0x27
[ ]     CommunicationControl = 0x28
[x]     TesterPresent = 0x3e
[ ]     AccessTimingParameter = 0x83
[ ]     SecuredDataTransmission = 0x84
[ ]     ControlDTCSetting = 0x85
[ ]     ResponseOnEvent = 0x86
[ ]     LinkControl = 0x87

[ ]     Data Transmission

[x]     ReadDataByIdentifier = 0x22
[x]     ReadMemoryByAddress = 0x23
[ ]     ReadScalingDataByIdentifier = 0x24
[ ]     ReadDataByPeriodicIdentifier = 0x2a
[ ]     DynamicallyDefineDataIdentifier = 0x2c
[x]     WriteDataByIdentifier = 0x2e
[x]     WriteMemoryByAddress = 0x3d

[ ]     Stored Data Transmission

[ ]     ClearDiagnosticInformation = 0x14
[ ]     ReadDTCInformation = 0x19

[x]    ReportNumberOfDTCByStatusMask = 0x01
[ ]    ReportDTCByStatusMask = 0x02
[ ]    ReportDTCSnapshotIdentification = 0x03
[ ]    ReportDTCSnapshotRecordByDTCNumber = 0x04
[ ]    ReportDTCStoredDataByRecordNumber = 0x05
[ ]    ReportDTCExtDataRecordByDTCNumber = 0x06
[ ]    ReportNumberOfDTCBySeverityMaskRecord = 0x07
[ ]    ReportDTCBySeverityMaskRecord = 0x08
[ ]    ReportSeverityInformationOfDTC = 0x09
[ ]    ReportSupportedDTC = 0x0A
[ ]    ReportFirstTestFailedDTC = 0x0B
[ ]    ReportFirstConfirmedDTC = 0x0C
[ ]    ReportMostRecentTestFailedDTC = 0x0D
[ ]    ReportMostRecentConfirmedDTC = 0x0F
[ ]    ReportMirrorMemoryDTCByStatusMask = 0x10
[ ]    ReportMirrorMemoryDTCExtDataRecordByDTCNumber = 0x11
[ ]    ReportNumberOfMirrorMemoryDTCByStatusMask = 0x12
[ ]    ReportNumberOfEmissionsOBDDTCByStatusMask = 0x13
[ ]    ReportEmissionsOBDDTCByStatusMask = 0x14
[ ]    ReportDTCFaultDetectionCounter = 0x15
[ ]    ReportDTCWithPermanentStatus = 0x16
[ ]    ReportDTCExtDataRecordByRecordNumber = 0x17
[ ]    ReportUserDefMemoryDTCByStatusMask = 0x18
[ ]    ReportUserDefMemoryDTCSnapshotRecordByDTCNumber = 0x19
[ ]    ReportUserDefMemoryDTCExtDataRecordByDTCNumber = 0x42
[ ]    ReportWWHOBDDTCWithPermanentStatus = 0x55

[ ]     Input/Output Control

[ ]     InputOutputControlByIdentifier = 0x2f

[x]     Routine

[x]     RoutineControl = 0x31

[ ]     Upload/Download

[x]     RequestDownload = 0x34
[x]     RequestUpload = 0x35
[x]     TransferData = 0x36
[x]     RequestTransferExit = 0x37
[ ]     RequestFileTransfer = 0x38

Hi, would it make sense to reuse the UDS constants defined in my automotive_diag crate?


Add warning for untagged painted elements in multi haplotype assemblies.

For multi haplotype assemblies it would be useful to add a warning / error message when there is a painted scaffold that does not have a HAP_(n) tag. This will avoid chromosomes being missing from the curated assembly when they have accidentally not been tagged.

In general we need a clearer error message when there are departures from the expected pattern of tagging and ordering of chromosomes. I'm thinking of a tabular layout of the message.


Improve ability to migrate for unit tests

I am doing unit tests with PHPUnit in Laravel. To achieve this I stubbing out my own migration runner which execs composer migrate and composer phinx rollback -- -t 0 respectively before and after the tests run where needed. However, because these are direct exec calls, they get dumped to the terminal output. This makes the test process view far messier and not as nice to keep an eye on.

Example output
> phpunit
PHPUnit 5.7.14 by Sebastian Bergmann and contributors.

> phinx 'migrate'
> phinx 'rollback' '-t' '0'
.> phinx 'migrate'
> phinx 'rollback' '-t' '0'
.> phinx 'migrate'
> phinx 'rollback' '-t' '0'
.> phinx 'migrate'
> phinx 'rollback' '-t' '0'
.> phinx 'migrate'
> phinx 'rollback' '-t' '0'
.> phinx 'migrate'
> phinx 'rollback' '-t' '0'
.> phinx 'migrate'
> phinx 'rollback' '-t' '0'
.> phinx 'migrate'
> phinx 'rollback' '-t' '0'
.> phinx 'migrate'
> phinx 'rollback' '-t' '0'
..                                                        10 / 10 (100%)

Time: 19.6 seconds, Memory: 14.00MB

OK (10 tests, 24 assertions)

Generating code coverage report in Clover XML format ... done

We should have a way of simply calling the phinx application object and telling it to migrate/rollback. All the current docs on doing this show also setting up symfony console input objects to be handed around, which is a lot of extra work when I should be able to just make an object giving it the configuration to use.
Does anyone know of a current method to migrate for tests without having the command dumped into the terminal? Is there something that could be added to phinx to help solve this problem that doesn't involve re-engineering the core to be more isolated components?
Thank you,

Garbee

After digging through the TextWrapper code some more I figured out how to do this with the current setup.

Example Code
    public function runDatabaseMigrations()
    {
        $phinx = require __DIR__ .'/../vendor/robmorgan/phinx/app/phinx.php';
        $wrap = new TextWrapper($phinx, [
            'configuration' => __DIR__ . '/../phinx.php',
            'parser' => 'php',
        ]);
        $wrap->getMigrate('only', null);

        $this->beforeApplicationDestroyed(function () use ($wrap) {
            $wrap->getRollback('only', 0);
        });
    }

Changing 'only' parameters in there with the environment you want to use. Since my leeches off my application's connection I just re-use that so I don't need multiple environments in Phinx itself.


More data needs to be added to the data output by surveys

While the surveys are currently much more beautiful, they don't save nearly as much data as the previous ones did. Right now they record the scored choice that the person made, and that's it. (For @zenkavi) Reverse scoring is taken care of by defining "option_values" in a survey's .tsv see here
Minimum data we need:
-The actual choice the person made. So if they chose the first option, we need to know that.
-Response range (scored out of what?). This can just be the whole option field to allow for non-likert like scales (option text may be [3,4,17] or something else wonky)
-The question text
Other things that @zenkavi recorded that was nice:
-Reaction time per page of the survey
-stim_response text
-times viewed (I presume that's the number of times someone visits a page if they use the back button)
@zenkavi, I don't have the bandwidth to deal with this, at least not alone. Could you own this (and we need the surveys fixed ASAP). I'm happy to meet up so we can work on it together. @vsoch, could you point us in the right direction? Where is the dictionary returned here defined.

You are looking at old data, I just added a function that exports absolutely everything.

The actual question isn't added to the data, and we'll want total time taken on the survey.

Question has been added. For total time, I'll open another issue.


number limit of command register

I registered over than 34 commands. Then some commands stop working like this.

It successfully registered but not working.
code :

it seems it's not reproducible. Please provide the reproducible example at least.

Ill test that and give the things needed

well it work 60 but it doesn't have complex code it only log the origin entity

ive try to use complex stuff and it still work??


Add project localization

Add a baseline for language in the app

All text fields in the app should be changable during runtime
Each language should get its own language file

The branch feature/localization has been created for this issue


add  sort result to contact search

Coverage decreased (-0.07%) to 40.111% when pulling d11d48012e41af8901e67a07f26bcbb183779809 on unadlib:michael-dev into 5ff6c2cd1678d1789493d0399141fe9573a00109 on ringcentral:master.

Coverage decreased (-0.07%) to 40.111% when pulling d11d48012e41af8901e67a07f26bcbb183779809 on unadlib:michael-dev into 5ff6c2cd1678d1789493d0399141fe9573a00109 on ringcentral:master.

Coverage decreased (-0.07%) to 40.111% when pulling d03d5fee7a5f68844959dab00bced6eb4bf5235e on unadlib:michael-dev into 5ff6c2cd1678d1789493d0399141fe9573a00109 on ringcentral:master.

Coverage decreased (-0.07%) to 40.111% when pulling d03d5fee7a5f68844959dab00bced6eb4bf5235e on unadlib:michael-dev into 5ff6c2cd1678d1789493d0399141fe9573a00109 on ringcentral:master.

Coverage decreased (-0.07%) to 40.111% when pulling d03d5fee7a5f68844959dab00bced6eb4bf5235e on unadlib:michael-dev into 5ff6c2cd1678d1789493d0399141fe9573a00109 on ringcentral:master.


Please merge 8ef142ef726598a29ba25a7910619ef63ce563e1 to dev

This updates the co19 test status for Firefox on linux to version 41.  Our buildbots have all been updated to that version.
Please merge 8ef142ef726598a29ba25a7910619ef63ce563e1 to dev.

Merged in 1.13.0-dev.7.9


Add Linode support

Resolves #31
@janeczku I'm trying to implement support for Linode, but for some reason I can't get the app to compile (my first experiment in go!). Would you mind reviewing?
rancher-letsencrypt solocommand$ make build
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X main.Version=v0.5.0 -X main.Git=f71cd2d" -o build/rancher-letsencrypt-linux-amd64
# _/Users/solocommand/Source/rancher-letsencrypt
./context.go:129: unknown field 'LinodeApiKey' in struct literal of type letsencrypt.ProviderOpts
make: *** [build] Error 2

In context.go you import this:
import "github.com/janeczku/rancher-letsencrypt/letsencrypt"

But you did your changes in:
import "github.com/solocommand/rancher-letsencrypt/letsencrypt"

@janeczku Thanks to @lukasmalkmus I was able to resolve the build issue on my machine -- I had the repository checked out to the wrong location for my $GOPATH. That said I'm not sure what the process is or what changes would be required to fix the circle build. I do have the compiled version available in a docker container for testing following the make image process.

@solocommand I've tested your docker image and it works, nice one!

Is there a way of disabling test mode?
I'm getting a lot of
14/07/2017 12:10:04time="2017-07-14T11:10:04Z" level=debug msg="Test mode: Forced certificate renewal in 120 seconds"

And its causing rate limiting

@djskinner yep! I ran into the same issue and created a "production" tag that runs the container without debug mode. Pull that instead of latest and you should be good.

The 'production' tag works like a charm. Thanks for your work on this.

What can I do to help get this merged?

Make the CircleCI test pass. Looks like it fails because a dependency is missing. I have no glue how dependencies are manage here, but look like you need to add yours to the vendor.conf file.


selecting first tab not working

Just noticed the current master branch doesn't support clicking on the first tab anymore.

 I did this myself. There's still no visual indication, that's all. See #23


Would like an example using swift code in a Flutter app

A couple folks in gitter have asked for this.
@chinmaygarde built https://github.com/chinmaygarde/flutter_swift_embedder, but it doesn't actually seem to have swift in it (maybe has it locally and hasn't pushed).
Would be nice to have an official example in flutter/examples
https://github.com/flutter/flutter/issues/7312 would also be an alternative solution to this.

@szakarias you have this working, right?

Not exactly. My setup is a Flutter/Objective-C project making use of a pod written in Swift. (And I have actually abandoned the pod again since I was not happy with what it provided.)

https://github.com/chinmaygarde/flutter_swift_embedder/ is now a working example of using a fully-swift embedding to drive a FlutterView-using iOS app.

Sorry about the incomplete repo. I forgot to actually push the commit where I replaced the Objective-C implementation with Swift. It is updated now. We can close this ticket now. We may want to move the example into the Flutter GH org.

I'd like to keep this open (or another bug) until we have some working swift code in the official flutter/examples or flutter create template.  Thanks for getting us a working example chinmay!

See also: https://github.com/flutter/flutter/issues/7312

Discussed in triage: We will create a Swift version of https://github.com/flutter/flutter/tree/master/examples/platform_services

Done in #9098.

@mit-mit  404

@realcarlos can you elaborate?


Sending timestamps including milliseconds

I didn't read through this thread in detail, but I came here searching for an issue where my millisecond and nanosecond breadcrumb timestamps (formated as a Unix timestamp integer with millis or nanos added) are being rejected by the Sentry API (regular Unix timestamps in seconds work as expected).
After verifying that my timestamps are correct, my mind drifted towards clock skew, which was how I found this issue.
Here's what the API injected into the raw JSON:
  "_meta": {
    "breadcrumbs": {
      "values": {
        "0": {
          "timestamp": {
            "": {
              "val":<PHONE_NUMBER>747,
              "err": [
                [
                  "invalid_data",
                  {
                    "reason": "timestamp out of range"
                  }
                ]
              ]
            }
          }
        }
      }
    }
  }

If this isn't related, I'll file a separate issue (assuming I'm not doing anything incorrectly).
This is using the Go SDK.
Originally posted by @JeanMertz in https://github.com/getsentry/relay/issues/534#issuecomment-608990645

The server only understands seconds when the timestamp is a numeric value. The value can be a float to include milliseconds, but note that float64 cannot represent nanoseconds since several decades ago.
The Go SDK at the moment represents timestamps as int64 values, making it impossible to have anything other than seconds. That's a bug.

Thank you for tracking this here and creating a fix @rhcarvalho. Much appreciated.


Updating local mbtiles file causes crash

I am using the mbtiles:// local file feature and I am running into an issue. In my app, I allow downloading of world-wide maps in mbtiles format. Updated maps are generated on my server, so users can choose to download an updated map.
The crash occurs when user has a specific map loaded, and then they download an updated map of that loaded location and the file on the file system gets replaced. This causes a crash because the database for the mbtiles file is not closed before updating the file.
Crash:
com.mapbox.mbgl.MaptilerFileSource (12): EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
terminating with uncaught exception of type mapbox::sqlite::Exception

Replicating Crash:

Use the iosapp target after using make iproj.
Add an mbtiles file to your project such as from openmaptiles.org.
Add a style.json file to your project such as https://github.com/openmaptiles/maptiler-basic-gl-style
Load the styles and write the mbtiles path into the style. Update the MBXViewController.m file of the Demo app with the following:

MBXViewController.m add:
- (NSURL *)writeMbtilesToCreatePath:(NSData *)jsonData {

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0]; // Get documents directory

    NSString *styleURL = [documentsDirectory<EMAIL_ADDRESS>    BOOL succeed = [jsonData writeToFile:styleURL atomically:YES];
    if (succeed){

        styleURL = [@"file:///" stringByAppendingString:styleURL];
        return [NSURL URLWithString:styleURL];

    }

    return nil;

}

- (NSData *)mbtilesStyleJSONWithFilenames:(NSString *)filename {

    // Style Path
    NSString *masterStyles = [[NSBundle mainBundle] pathForResource:@"style" ofType:@"json"];
    if (DEBUG) {
        NSLog(@"Mapbox Style: %@", masterStyles);
    }

    // Create dictionary of style JSON
    NSError *error = nil;
    NSDictionary *json = [NSJSONSerialization JSONObjectWithData:[NSData dataWithContentsOfFile:masterStyles] options:NSJSONReadingAllowFragments error:&error];
    if (error) {
        NSLog(@"Load Style JSON Error: %@", error);
    }

    // JSON Source
    NSMutableDictionary *mutableJson = [json mutableCopy];
    NSMutableDictionary *sources = [[NSMutableDictionary alloc] init];

    /// .mbtiles File paths
    NSString *databasePath = [[NSBundle mainBundle] pathForResource:filename ofType:@"mbtiles"];;

    // Create the mbtiles json
    NSMutableDictionary *openMapTilesSource = [[NSMutableDictionary alloc] init];
    openMapTilesSource[@"url"] = [NSString stringWithFormat:@"mbtiles://%@", databasePath];
    openMapTilesSource[@"type"] = @"vector";
    openMapTilesSource[@"maxzoom"] = @(14);

    // Update Sources
    sources[@"openmaptiles"] = openMapTilesSource;

    // Update Mutable Layers
    mutableJson[@"layers"] = json[@"layers"];

    // Update sources
    mutableJson[@"sources"] = sources;

    if (!mutableJson) {
        return nil;
    }
    NSError *error2;
    NSData *jsonData = [NSJSONSerialization dataWithJSONObject:mutableJson options:NSJSONWritingPrettyPrinted error:&error2];

    return jsonData;

}

MBXViewController.m in viewDidLoad around line 279 add:
NSData *jsonStyles = [self mbtilesStyleJSONWithFilenames:@"map"];
NSURL *styleURL = [self writeMbtilesToCreatePath:jsonStyles];
if (styleURL) {
        self.mapView.styleURL = styleURL;
 }

Run the test app
Browse the file system for the MapLibre GL.app and view the contents of the app to find your mbtiles file. Make a duplicate somewhere and then overwrite the original file within the MapLibre GL.app folder.
Moving the map in the test app will now cause a crash.

I am able to reproduce the crash on iOS and I have a branch at roblabs/maplibre-gl-native:100-updating-local-mbtiles-file-causes-crash that has this sample code for reproducibility and a brute force, but working, fix.
Exception is unhandled due to the local MBTiles file being updated before it was closed properly.  Use case will affect any app that uses MBTiles AND updates the same map that is being displayed.
Next Steps:

[x] Create a first pass fix (although, it's not the right fix as it closes the DB every time a tile is accessed)
[ ] Have MapTiler team review for suggested fixes on how to close the SQLite3 DB so that an MBTiles can be updated without restarting the app.  This is not specific to MapTiler made MBTiles; it will affect any MBTiles (just looking for review or guidance).
[ ] Possibly trap for SQLite3 error codes that indicate that the SQLite3 DB should be closed, that way we can continue gracefully.

Error Code Details
The crash is due to a thrown exception because an SQL error code came through that is not SQLITE_OK
https://github.com/maplibre/maplibre-gl-native/blob/ee94520bffeae2f6246284e1931d0cc1d615f708/platform/default/src/mbgl/storage/sqlite3.cpp#L335-L337
This throws because the error code that came through is:  (6922) SQLITE_IOERR_VNODE

2021-06-28 15:07:55.391756-0700 MapLibre GL[4015:2042647] [DEBUG] {com.mapbox.mbgl.MaptilerFileSou}[Database](6922): statement aborts at 23: [SELECT tile_data FROM tiles where zoom_level = 2 AND tile_column = 1 AND tile_row = 2] disk I/O error

Error code 6922 details:

(6922) SQLITE_IOERR_VNODE
The SQLITE_IOERR_VNODE error code is a code reserved for use by extensions. It is not used by the SQLite core.

Source:  SQLite Result and Error Codes

Style is MapTiler Basic
MBTiles is from

wget https://github.com/maptiler/tileserver-gl/releases/download/v1.3.0/zurich_switzerland.mbtiles

I also get exceptions. Errors are like this:
[logging] BUG IN CLIENT OF libsqlite3.dylib: database integrity compromised by API violation: vnode unlinked while in use: <unresolvable path>
[logging] invalidated open fd: 9 (0x11)
libc++abi: terminating with uncaught exception of type mapbox::sqlite::Exception
terminating with uncaught exception of type mapbox::sqlite::Exception


Adding service address and auth info

I think there are some things that will need to be added (service address, auth info)

@timburks you mentioned here that we should add additional information to the generated output.
Service address:
An example input file might look like this:
input.yaml: (OpenAPI spec)
server:
  - url: https://development.gigantic-server.com/v1
    description: Development server
  - url: https://staging.gigantic-server.com/v1
    description: Staging server
  - url: https://api.gigantic-server.com/v1
    description: Production server

An example output file generated by gnostic-grpc might look like this:
output.proto: (Proto Buf file)
service SomeService {
    // Use the first one if multiple addresses are given
    option (google.api.default_host) = "development.gigantic-server.com/v1";
    // Other code...
}

We can use the default_host service option for that.
Auth info:
Essentially, we want the information of a security scheme object reflected inside the generated proto file.
How should this object be represented inside the generated output file?
As far as I understand, for Google Cloud, one could define a service configuration where additional information (i.e.: authentication) can be provided. This config maps to the service.proto where also the mentioned auth.proto is defined.
We see that for HTTP rules it does not matter whether we define them inside the service config or inside the proto file, however this does not seem to be possible for other configurations.
@timburks and @noahdietz additional input would be helpful.

We can use the default_host service option for that.

Yeah, I think that's a good idea - strip the scheme, any path segments included, and include just the host name. Since there can be multiple server objects and we have no way of automatically picking "the right one", we'd probably want to set up a "sane default" like "the first server object is used" (which produces the generated proto you shared). We could have a plugin parameter to override this with a raw value. Also, since there can be variables anywhere in the value, we will need to resolve those with the defaults...
As far as auth...I'm not sure how to handle this. The Service config is not for client consumption, but rather the surrounding API management systems. The proto google.api.http options are only for grpc-HTTP transcoding. I'm not sure that generating a Service config is the right decision...or if supporting this auth information is all that important. If we think about the core feature here its translating OpenAPI to Protobuf, so that we can consume the description via protobuf/gRPC tooling. Auth doesn't factor into the API surface (nor does the default_host really).

This is an interesting long-term goal. As @noahdietz noted, gRPC HTTP/JSON transcoding doesn't include auth information, but it's true that service.proto supports at least some of the schemes that can be specified. This seems pretty strongly associated with API management systems and the OpenAPI spec is probably the only thing they have in common. So maybe it's best to leave this information in the OpenAPI spec. (Ideally, if it's possible for gnostic-grpc to generate the right protos, gRPC HTTP/JSON transcoding would produce an API that matches the original OpenAPI spec, so that spec would still be valid)


Optimize fetch performance for sequential value retrieval

Summary of the changes / Why this improves CrateDB
This addresses a performance regression from the Lucene 8.7.0 upgrade. The fetch performance can be optimized for the case
where the retrival is in sequential order by leveraging the merge instances of stored fields readers that are optimized for sequential access. The idea comes from  https://github.com/elastic/elasticsearch/pull/62509
Q: SELECT * FROM uservisits LIMIT 1000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |       43.509 ±    9.050 |     34.549 |     42.470 |     46.479 |    255.659 |
|   V2    |        9.481 ±    6.594 |      7.322 |      8.460 |      9.279 |    197.222 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               - 128.43%                           - 133.56%
There is a 100.00% probability that the observed difference is not random, and the best estimate of that difference is 128.43%
The test has statistical significance

Q: select * from articles inner join colors on articles.id = colors.id order by articles.id limit 1000
C: 1
| Version |         Mean ±    Stdev |        Min |     Median |         Q3 |        Max |
|   V1    |       57.408 ±   34.947 |     47.715 |     51.859 |     54.174 |    525.007 |
|   V2    |       47.619 ±   28.969 |     39.616 |     42.811 |     45.897 |    440.282 |
├---------┴-------------------------┴------------┴------------┴------------┴------------┘
|               -  18.64%                           -  19.12%
There is a 99.76% probability that the observed difference is not random, and the best estimate of that difference is 18.64%
The test has statistical significance

Checklist

[x] Added an entry in CHANGES.txt for user facing changes
[x] Updated documentation & sql_features table for user facing changes
[x] Touched code is covered by tests
[x] CLA is signed
[x] This does not contain breaking changes, or if it does:

It is released within a major release
It is recorded in CHANGES.txt
It was marked as deprecated in an earlier release if possible
You've thought about the consequences and other components are adapted
(E.g. AdminUI)

Retest this please
Test failure not related
KillIntegrationTest > testKillNonExisitingJob FAILED
java.lang.AssertionError at [87B82E2923997A21:2145DB2CEB4E83BC]:0
FAILURE: Test testKillSelectSysTable(io.crate.integrationtests.KillIntegrationTest)
java.lang.AssertionError: Query breaker not reset to 0 on node: node_s0
Expected: <0L>
but: was <644245L>
at __randomizedtesting.SeedInfo.seed([87B82E2923997A21:8AFB2F8724719FDE]:0)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
at org.junit.Assert.assertThat(Assert.java:956)
at org.elasticsearch.test.InternalTestCluster.lambda$ensureEstimatedStats$35(InternalTestCluster.java:2227)
REPRODUCE WITH: ./gradlew :server:test -Dtests.seed=87B82E2923997A21 -Dtests.class=io.crate.integrationtests.KillIntegrationTest -Dtests.method="testKillNonExisitingJob" -Dtests.locale=ar-IQ -Dtests.timezone=Australia/Queensland

retest this please
KillIntegrationTest > testKillNonExisitingJob FAILED
java.lang.AssertionError at [87B82E2923997A21:2145DB2CEB4E83BC]:0
FAILURE: Test testKillSelectSysTable(io.crate.integrationtests.KillIntegrationTest)
java.lang.AssertionError: Query breaker not reset to 0 on node: node_s0
Expected: <0L>
but: was <644245L>
at __randomizedtesting.SeedInfo.seed([87B82E2923997A21:8AFB2F8724719FDE]:0)
at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
at org.junit.Assert.assertThat(Assert.java:956)
at org.elasticsearch.test.InternalTestCluster.lambda$ensureEstimatedStats$35(InternalTestCluster.java:2227)
REPRODUCE WITH: ./gradlew :server:test -Dtests.seed=87B82E2923997A21 -Dtests.class=io.crate.integrationtests.KillIntegrationTest -Dtests.method="testKillNonExisitingJob" -Dtests.locale=ar-IQ -Dtests.timezone=Australia/Queensland

There are several places where the ReaderContext instances are created within a loop.  Couldn't they be created outside and reused per leaf?


Jatos changing my "/" path to "" by default

Hi to everyone,
I'm running my experiment on my local jatos (using a Windows pc) and when it displays it on my browser (i've tried using many browsers, so i don't think this could be the problem), images can't be loaded like they are corrupted. Investigating on what could be the problem, I've found that in properties option the path of my html file is settled as "". I've therefore tried to change it with the correct path ("/"), but nothing changed and when I after have opened properties  option, it gave me the same wrong path like it had not saved my changes.
How can I solve this problem??? Pls I'm doing research, so it's literally a matter of time for me.

Hi, there are two separate things.
As it is correctly pointed out in the error message, you should always use the forwards (common) slash. I'm surprised the changes were not saved. Stupid question, but can you try again, maybe deleting the whole path and re-writing it? And report back.
Having said this, if you say that the images aren't loaded I assume that the rest of the code otherwise works. That suggests that JATOS can successfully find and read your HTML file, but not the images. Can you open the console (Developer tools on the browser you're using) and try to see what error messages you get when you try to load the images? Usually this is related to image filenames being written in a different case (caps or lowercase) or the extension being wrong.

I've tried to delete and reupload the entire folder but nothing change. I've tried also to run jatos with my Linux subsystem to bypass the path-problem and it seems have worked, because now the path is correct.
Inspecting the webpage on my browser this is the report output I get:

No they exist verbatim in the path's folder


linux/bin/code.sh: use command -v instead of which

command is a bash-builtin (see the Bash manual) that is guaranteed to always be present, in contrast to which, which is not required to be available for bash to work.
This dependency on which has recently caused an issue for a small percentage of arch linux users where VSCode wouldn't start anymore, see visual-studio-code-bin on the AUR. By removing the dependency, VSCode becomes a tiny bit more self-contained (unless it's still used somewhere else of course).

More generally, see https://unix.stackexchange.com/questions/85249/why-not-use-which-what-to-use-then
command -v is guaranteed to exist in any Bourne-like shell that is compliant with POSIX 2008 (in POSIX 2004 it was an optional component only required on systems with the User Portability option, but then it became required everywhere as of the decade-old 2008 standard). The which program isn't guaranteed to exist anywhere, although Debian's policy document requires it.
Thanks for doing your part to help get us one step closer to a world in which the "which" program is not used. :)


feat(linter): detect jest file by default glob pattern

closes: #2397

Current dependencies on/for this PR:

main

PR #2408   👈

This stack of pull requests is managed by Graphite.


[bug] when trying to download the link sent via email, get "site can't be reached"

When I try to visit https://cdn.crabnebula.app/download/mediar/screenpipe/latest/platform/dmg-aarch64 I get "site can't be reached" - have tried it on multiple computers and can't get to it

When I try to visit https://cdn.crabnebula.app/download/mediar/screenpipe/latest/platform/dmg-aarch64 I get "site can't be reached" - have tried it on multiple computers and can't get to it

do you have firewall or vpn or live in china?


Class inheritence: put call to parent constructor after "fat arrow" method declarations.

Please consider the following code:
interface MenuItem{
	caption:string;
	handler: string;
	handlerFunction?: Function;
}
class BaseStuff{
	public menu:Array<MenuItem>=[];
	constructor (menu:Array<MenuItem>){
		this.menu=menu;
		this.prepareMenu(menu);
	}
	public prepareMenu(menu:Array<MenuItem>){
		for (var item in menu){
			item.handlerFunction=this[item.handler];
		}
	}
}

class BadStuff extends BaseStuff{
	public someAction=()=>{
		alert("SomeAction from BadStuff called");
	}
}

var bad=new BadStuff([{caption: "test", handler: "someAction"}]);

I need a class, that will send, say, menu structure to the parent where actual handler function will be found. The problem is that when methods is declared via fat arrow, the call to parent constructor goes before the actual method will be defined:
        _super.apply(this, arguments);
        this.someAction = function () {
            alert("SomeAction from BadStuff called");
        };

It looks logical to put first line of code including call to parent contstuctor AFTER all method declarations in the class.

 These are just instance members with initializers that happen to be function expressions.
Consider code like this:
class BaseStuff{
	public thing = function() { return 'hello world'; }
    constructor (){
    }
	public getHandler() {
		return this.thing;
	}
}

class BadStuff extends BaseStuff{
	public someOtherThing = this.getHandler();
}

var x = new BadStuff();
// Would fail in proposed initialization order
console.log(x.someOtherThing());

See also #1617.


Cleanup configure script

This removes the gpu question from the configure script.

I am currently messing with the configure script as well. Can we wait with merging until #175 and #181 are merged?

I think you already applied the same changes in #181 (removing the GPU questions etc) so then this PR can probably be closed.


Add auth to mongo db container

Add Authentication to MongoDBContainer
Offical MongoDB doc reference

Addresses a request to use auth with MongoDBContainer discussed here

@silaev thanks for the PR! and sorry for the delay. Can you update the branch and resolve the conflicts, please? There have been some changes since it was submitted 😬

@silaev thanks for the PR! and sorry for the delay. Can you update the branch and resolve the conflicts, please? There have been some changes since it was submitted 😬

Hi @eddumelendez, done

@eddumelendez, thanks for the review. I address all the discussions. Please, let me know if anything else is needed from me


AnnData eval issue: cannot unpack non-iterable NoneType object

Was trying a simple test locally on M2 MacBook, call:
python eval_single_anndata.py --adata_path chicken_heart.h5ad --dir res --species chicken
Using sample 4 layer model

chicken_heart.h5ad ERROR

Traceback (most recent call last):
File "/scratch/UCE/eval_single_anndata.py", line 155, in
main(args, accelerator)
File "/scratch/UCE/eval_single_anndata.py", line 83, in main
processor.preprocess_anndata()
File "/scratch/UCE/evaluate.py", line 93, in preprocess_anndata
self.adata, num_cells, num_genes =
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object
This is after successful download of model:
Downloading ./model_files/species_chrom.csv from https://figshare.com/ndownloader/files/42706558 ...
100%|█████████████████████████████████████| 4.10M/4.10M [00:00<00:00, 4.27MiB/s]
Downloading ./model_files/species_offsets.pkl from https://figshare.com/ndownloader/files/42706555 ...
100%|█████████████████████████████████████████| 139/139 [00:00<00:00, 22.3kiB/s]
Downloading resmodel_files/protein_embeddings.tar.gz from https://figshare.com/ndownloader/files/42715213 ...
100%|█████████████████████████████████████| 2.74G/2.74G [02:19<00:00, 19.7MiB/s]
Done!
Downloading ./model_files/all_tokens.torch from https://figshare.com/ndownloader/files/42706585 ...
100%|█████████████████████████████████████| 2.98G/2.98G [02:31<00:00, 19.7MiB/s]
Using sample 4 layer model
Downloading ./model_files/4layer_model.torch from https://figshare.com/ndownloader/files/42706576 ...
100%|█████████████████████████████████████| 3.40G/3.40G [02:57<00:00, 19.2MiB/s]
Same issue with some previously prepared AnnData objects from human samples with species set to human.

What is the terminal output when you try to embed a human dataset?

Can you please post the full terminal output? There should be terminal output before the error. What are the gene names in .var_names? Are they gene names or ensembl IDs?

Did you also just try python eval_single_anndata.py with no additional arguments? That downloads and runs the default h5ad and would establish if it's an environment issue or something else

Thanks for pointing this out. We made some updates to the code for running cross species data
If you follow the instruction in this notebook it should get everything set up correctly to run the script.
We're working on simplifying the interface a bit more for the cross species setting

Thanks, can you share the exact command you are using for running evaluation on the human dataset

Could you please try pulling the latest version of the repo and running the default command again? Thanks!

I'm not sure exactly what this issue might be. It could be that that file did not unzip or download properly? Maybe try downloading it again?