transport.produce() no matching codec found

after running my code from below, once I call the produce, I get this error, below is the log
flutter version 3.19.5, with dart SDK 3.3.3
mediasfu_mediasoup_client:0.0.4
flutter: Video tracks: [Track(id: EBD7CA34-B35A-4BCF-BF62-A19A72A546C8, kind: video, label: EBD7CA34-B35A-4BCF-BF62-A19A72A546C8, enabled: true, muted: false)]
[log] Local stream initialized Instance of 'MediaStreamNative'
[log] Requesting RTP Capabilities...
flutter: Audio tracks: [Track(id: 3183DE1E-B65F-4F42-9D65-E28636DF4948, kind: audio, label: 3183DE1E-B65F-4F42-9D65-E28636DF4948, enabled: true, muted: false)]
flutter: video/VP9
flutter:  first here [{type: nack, parameter: }, {type: nack, parameter: pli}, {type: ccm, parameter: fir}, {type: goog-remb, parameter: }, {type: transport-cc, parameter: }]
flutter: [Instance of 'RtcpFeedback', Instance of 'RtcpFeedback', Instance of 'RtcpFeedback', Instance of 'RtcpFeedback', Instance of 'RtcpFeedback']
flutter: Extracted Video Codec: Instance of 'RtpCodecCapability'
[log] Received RTP Capabilities: {rtpCapabilities: {codecs: [{kind: audio, mimeType: audio/opus, clockRate: 48000, channels: 2, rtcpFeedback: [{type: nack, parameter: }, {type: transport-cc, parameter: }], parameters: {}, preferredPayloadType: 100}, {kind: video, mimeType: video/VP9, clockRate: 90000, rtcpFeedback: [{type: nack, parameter: }, {type: nack, parameter: pli}, {type: ccm, parameter: fir}, {type: goog-remb, parameter: }, {type: transport-cc, parameter: }], parameters: {x-google-start-bitrate: 1000}, preferredPayloadType: 101}, {kind: video, mimeType: video/rtx, preferredPayloadType: 102, clockRate: 90000, parameters: {apt: 101}, rtcpFeedback: []}], headerExtensions: [{kind: audio, uri: urn:ietf:params:rtp-hdrext:sdes:mid, preferredId: 1, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: urn:ietf:params:rtp-hdrext:sdes:mid, preferredId: 1, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id, preferredId: 2, preferredEncrypt: false, direction: recvonly}, {kind: video, uri: urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id, preferredId: 3, preferredEncrypt: false, direction: recvonly}, {kind: audio, uri: http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time, preferredId: 4, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time, preferredId: 4, preferredEncrypt: false, direction: sendrecv}, {kind: audio, uri: http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01, preferredId: 5, preferredEncrypt: false, direction: recvonly}, {kind: video, uri: http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01, preferredId: 5, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07, preferredId: 6, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: urn:ietf:params:rtp-hdrext:framemarking, preferredId: 7, preferredEncrypt: false, direction: sendrecv}, {kind: audio, uri: urn:ietf:params:rtp-hdrext:ssrc-audio-level, preferredId: 10, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: urn:3gpp:video-orientation, preferredId: 11, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: urn:ietf:params:rtp-hdrext:toffset, preferredId: 12, preferredEncrypt: false, direction: sendrecv}, {kind: audio, uri: http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time, preferredId: 13, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time, preferredId: 13, preferredEncrypt: false, direction: sendrecv}, {kind: audio, uri: http://www.webrtc.org/experiments/rtp-hdrext/playout-delay, preferredId: 14, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: http://www.webrtc.org/experiments/rtp-hdrext/playout-delay, preferredId: 14, preferredEncrypt: false, direction: sendrecv}]}}
flutter: Device RTP Capabilities: Instance of 'RtpCapabilities'
flutter:  params here {params: {id: 23df196f-3b55-4064-9af3-b4c9e982d800, iceParameters: {usernameFragment: ozy0lvx727058g0rxwn16gyczot2lpdg, password: mlk2b9f9kluvq2atzyl3k60uhifw3f7q, iceLite: true}, iceCandidates: [{foundation: udpcandidate, priority:<PHONE_NUMBER>, ip: <IP_ADDRESS>, address: <IP_ADDRESS>, protocol: udp, port: 40085, type: host}, {foundation: tcpcandidate, priority:<PHONE_NUMBER>, ip: <IP_ADDRESS>, address: <IP_ADDRESS>, protocol: tcp, port: 40058, type: host, tcpType: passive}], dtlsParameters: {fingerprints: [{algorithm: sha-224, value: C6:D3:E8:26:53:79:45:12:E2:D8:19:A5:BC:CB:B5:18:1E:DB:1E:2B:1A:22:A4:F1:3F:73:24:D8}, {algorithm: sha-256, value: DC:38:FE:2A:3A:DF:7B:14:A1:B8:B5:79:A3:01:44:E9:7C:31:DB:F7:BA:DC:69:61:37:2A:F9:6B:39:F6:A6:6B}, {algorithm: sha-1, value: FE:FF:54:3D:88:39:5C:B5:0E:33:67:19:52:78:2B:03:F1:52:67:6B}, {algorithm: sha-384, value: F6:B2:54:D2:70:AA:58:2C:A8:97:F6:76:49:98:F3:BF:79:85:C4:EE:1A:B3:9E:D3:FD:A9:E3:0B:A6:0E:EC:EC:AB:E0:04:2A:83:1C:2A:3B:93:9B:9A:5D:BB:A7:87:FC}, {algorithm: sha-512, value: 24:39:7D:80:E6:7F:FE:47:59:1C:D8:C9:25:7F:36:6F:53:5F:83:92:8B:F6:E6:E4:47:51:AF:E6:E9:09:B3:83:8F:1C:87:57:6B:48:12:34:CE:55:95:23:7A:EA:F0:5C:E0:C7:33:E5:2D:9E:32:98:8F:91:16:59:6B:66:EB:D6}], role: auto}}}
flutter: Invalid protocol value: udp
[log] Instance of 'IceParameters'
[log] [Instance of 'IceCandidate', Instance of 'IceCandidate']
[log] Instance of 'DtlsParameters'
flutter: pTrans new
flutter:  producerTransport id here 23df196f-3b55-4064-9af3-b4c9e982d800
flutter: Send transport needs to connect! Instance of 'Transport'
flutter: inside connect trans 5EF3650E-7927-4936-9DA3-9C648A862699
flutter: No video track available video
flutter: Started producing video track with ID: EBD7CA34-B35A-4BCF-BF62-A19A72A546C8
flutter: no matching codec found
flutter: #0      Ortc.reduceCodecs (package:mediasfu_mediasoup_client/src/ortc.dart:760:9)
#1      UnifiedPlan.send (package:mediasfu_mediasoup_client/src/handlers/unified_plan.dart:536:14)
#2      Transport._produce (package:mediasfu_mediasoup_client/src/transport.dart:871:53)
#3      FlexQueue._runTask (package:mediasfu_mediasoup_client/src/FlexQueue/flex_queue.dart:74:46)
#4      FlexQueue.addTask (package:mediasfu_mediasoup_client/src/FlexQueue/flex_queue.dart:60:7)
#5      Transport.produce (package:mediasfu_mediasoup_client/src/transport.dart:957:16)
#6      CustomSocketService.connectSendTransport (package:roducate/Utils/custom_socket_provider.dart:562:23)
#7      CustomSocketService.createSendTransport. (package:roducate/Utils/custom_socket_provider.dart:508:15)
#8      Function._apply (dart:core-patch/function_patch.dart:11:71)
#9      Function.apply (dart:core-patch/function_patch.dart:35:12)
#10     Socket.onack (package:socket_io_client/src/socket.dart:374:18)
#11     Socket.onpacket (package:socket_io_client/src/socket.dart:288:9)
#12     EventEmitter.emit. (package:socket_io_common/src/util/event_emitter.dart:61:14)
#13     List.forEach (dart:core-patch/growable_array.dart:416:8)
#14     EventEmitter.emit (package:socket_io_common/src/util/event_emitter.dart:60:11)
#15     Manager.ondecoded (package:socket_io_client/src/manager.dart:255:5)
#16     EventEmitter.emit. (package:socket_io_common/src/util/event_emitter.dart:61:14)
#17     List.forEach (dart:core-patch/growable_array.dart:416:8)
#18     EventEmitter.emit (package:socket_io_common/src/util/event_emitter.dart:60:11)
#19     Decoder.add (package:socket_io_common/src/parser/parser.dart:160:14)
#20     Manager.ondata (package:socket_io_client/src/manager.dart:246:13)
#21     EventEmitter.emit. (package:socket_io_common/src/util/event_emitter.dart:61:14)
#22     List.forEach (dart:core-patch/growable_array.dart:416:8)
#23     EventEmitter.emit (package:socket_io_common/src/util/event_emitter.dart:60:11)
#24     Socket.onPacket (package:socket_io_client/src/engine/socket.dart:462:11)
#25     Socket.setTransport. (package:socket_io_client/src/engine/socket.dart:286:34)
#26     EventEmitter.emit. (package:socket_io_common/src/util/event_emitter.dart:61:14)
#27     List.forEach (dart:core-patch/growable_array.dart:416:8)
#28     EventEmitter.emit (package:socket_io_common/src/util/event_emitter.dart:60:11)
////step1
Future getLocalStream() async {
localStream = await navigator.mediaDevices.getUserMedia({
  'audio': {
    'mandatory': {
      'googEchoCancellation': 'true',
      'googAutoGainControl': 'true',
      'googNoiseSuppression': 'true',
      'googHighpassFilter': 'true',
    },
    'optional': [],
  },
  'video': {
    'mandatory': {
      'minWidth': '640',
      'minHeight': '480',
      'minFrameRate': '30',
    },
    'optional': [
      {'facingMode': isFrontCameraSelected ? 'user' : 'environment'}
    ],
  }

});

print("Video tracks: ${localStream?.getVideoTracks()}");
print("Audio tracks: ${localStream?.getAudioTracks()}");

localRenderer.srcObject = localStream;
log("Local stream initialized ${localRenderer.srcObject}");

getRtpCapabilities();

}
Future extractVideoCodecs(rtpCapabilitiesJson) async {
log(' second time $rtpCapabilitiesJson');
if (rtpCapabilitiesJson.containsKey('codecs')) {
  final List<dynamic> codecs = rtpCapabilitiesJson['codecs'];

  for (var codec in codecs) {
    if (codec['kind'] == 'video' && codec['mimeType'] != 'video/rtx') {
      print(codec['mimeType']);
      print(' first here ${codec['rtcpFeedback']}');

      final List<dynamic> feedbackList = codec['rtcpFeedback'] ?? [];
      final List<RtcpFeedback> gottenFeedBack = feedbackList.map((e) {
        return RtcpFeedback(
          type: e['type'] ?? '',
          parameter: e['parameter'] ?? '',
        );
      }).toList();
      print(gottenFeedBack);
      vidCodec = RtpCodecCapability(
        kind: codec['kind'] == "video"
            ? RTCRtpMediaType.RTCRtpMediaTypeVideo
            : RTCRtpMediaType.RTCRtpMediaTypeAudio,
        mimeType:
            // 'video/H264',
            codec['mimeType'],
        preferredPayloadType: codec['preferredPayloadType'],
        clockRate: codec['clockRate'],
        channels: codec['channels'] ?? 1,
        parameters: codec['parameters'] ?? {},
        rtcpFeedback: gottenFeedBack ?? [],
      );

      print('Extracted Video Codec: $vidCodec');
    }
  }
} else {
  print('No codecs found in rtpCapabilities.');
}

}
// /step2
void getRtpCapabilities() {
mySocket?.emitWithAck(
'getRtpCapabilities',
[],
ack: (response) async {
if (response == null || response['rtpCapabilities'] == null) {
print("Error: Invalid RTP Capabilities received");
return;
}
log("Received RTP Capabilities: $response");
await extractVideoCodecs(response['rtpCapabilities']);
    routerRtpCapabilities =
        RtpCapabilities.fromMap(response['rtpCapabilities']);

    await createDevice(routerRtpCapabilities!);
  },
);

mySocket?.on('getRtpCapabilities', (data) {
  print(data);
});
log("Requesting RTP Capabilities...");

}
///step3
Future createDevice(RtpCapabilities routerRtpCapabilities) async {
try {
device = Device();
await device.load(routerRtpCapabilities: routerRtpCapabilities!);
print("Device RTP Capabilities: ${device.rtpCapabilities}");
createSendTransport(device);
} catch (error) {
print("Error creating device: $error");
}
}
// step4
void createSendTransport(Device newdevice) {
final user = ref.read(userDataProvider);
var providerUserId = user.id!;
var roomId = ref.read(currentConversationIdProvider);
mySocket?.emitWithAck(
'createProducerWebRtcTransport',
{'sender': true, 'providerUserId': '${providerUserId}'},
ack: (dynamic params) async {
if (params['error'] != null) {
print("Error creating send transport: ${params['error']}");
return;
}
print(' params here ${params}');
    var transportParams = params['params'];
    log('transportsParams $transportParams');
    // producerTransport = device.createSendTransportFromMap(transportParams);

    final iceParameters = IceParameters(
      usernameFragment: transportParams['iceParameters']
          ['usernameFragment'],
      password: transportParams['iceParameters']['password'],
      iceLite: transportParams['iceParameters']['iceLite'],
    );

    final iceCandidates =
        (transportParams['iceCandidates'] as List).map((candidate) {
      return IceCandidate(
        foundation: candidate['foundation'], // dynamic
        priority: candidate['priority'] as int,
        ip: candidate['ip'] as String,

        protocol: Protocol.values.firstWhere(
          (e) => e.toString().split('.').last == candidate['protocol'],
          orElse: () {
            print('Invalid protocol value: ${candidate['protocol']}');
            return Protocol.tcp;
          },
        ),
        port: candidate['port'] as int,
        type: IceCandidateType.values.firstWhere(
          (e) => e.toString().split('.').last == candidate['type'],
          orElse: () => throw Exception('Invalid type value'),
        ),
        tcpType: candidate['tcpType'] != null
            ? TcpType.values.firstWhere(
                (e) => e.toString().split('.').last == candidate['tcpType'],
                orElse: () => throw Exception('Invalid tcpType value'),
              )
            : null, // Optional
        transport: candidate['transport'] as String? ?? "",
        raddr:
            candidate['raddr'] as String? ?? '', // Default to empty string
        rport: candidate['rport'] as int? ?? 0, // Default to 0 if null
      );
    }).toList();

    final dtlsParameters = DtlsParameters(
      fingerprints:
          (transportParams['dtlsParameters']['fingerprints'] as List)
              .map((fingerprint) => DtlsFingerprint(
                    algorithm: fingerprint['algorithm'],
                    value: fingerprint['value'],
                  ))
              .toList(),
      role: DtlsRole.auto, // Ensure role exists
    );

    log(iceParameters.toString());
    log(iceCandidates.toString());
    log(dtlsParameters.toString());

    var createSendTransport = newdevice.createSendTransport(
      id: transportParams['id'],
      iceParameters: iceParameters,
      // transportParams['iceParameters'],
      iceCandidates: iceCandidates,
      // transportParams['iceCandidates'],
      dtlsParameters: dtlsParameters,
      // transportParams['dtlsParameters'],
    );
    print('pTrans ${createSendTransport.connectionState}');
    producerTransport = createSendTransport;

    print(
        ' producerTransport id here ${createSendTransport.id.toString()}');

    producerTransport.on('connect', (data) async {
      final dtlsParameters = data['dtlsParameters'];
      try {
        mySocket?.emitWithAck('transport-connect', {
          'dtlsParameters': '${dtlsParameters}',
          'providerUserId': '${providerUserId}',
        }, ack: (res) {
          data['callback']();
        });
      } catch (e) {
        data['errback'](e);
      }
    });

    producerTransport.on('produce', (parameters, callback) {
      log("parameters ${parameters}");
      try {
        mySocket?.emitWithAck(
          'transport-produce',
          {
            'kind': parameters['kind'],
            'rtpParameters': parameters['rtpParameters'],
            'appData': parameters['appData'],
            'roomId': '${roomId}',
            'providerUserId': '${providerUserId}',
          },
          ack: (dynamic response) {
            log('help needed response $response');
            parameters['callback'](response['id']);
            // callback({'id': producerId});
          },
        );
      } catch (e) {
        parameters['errback'](e);
        print('trnsporterror $e');
      }

    });
    Future.delayed(Duration(milliseconds: 200));
    await connectSendTransport(producerTransport);
    // await startProducing();
  },
);

}
Future connectSendTransport(Transport producerTransport) async {
print("Send transport needs to connect! $producerTransport");
var roomId = ref.read(currentConversationIdProvider);
// final videoTrack = localStream?.getVideoTracks()[0];
final videoTrack = localStream?.getVideoTracks().first;
print('inside connect trans ${localStream!.id}');
// if (videoTrack == null) {
print("No video track available ${videoTrack?.kind}");
// return;
// }
List<RtpEncodingParameters> encodings = [
  RtpEncodingParameters(
    rid: 'r0',
    maxBitrate: 100000,
    scalabilityMode: 'S1T3',
    active: true,
  ),
  RtpEncodingParameters(
    rid: 'r1',
    maxBitrate: 300000,
    scalabilityMode: 'S1T3',
    active: true,
  ),
  RtpEncodingParameters(
    rid: 'r2',
    maxBitrate: 900000,
    scalabilityMode: 'S1T3',
    active: true,
  ),
];

if (vidCodec == null) {
  log("Error: vidCodec is null. Cannot proceed with produce().");
  return;
}
log('${vidCodec!.toMap().toString()} connect send');

producerTransport.produce(
  codec: vidCodec,
  track: localStream!.getVideoTracks()[0]!,
  stream: localStream!,
  source: 'camera',
  encodings: encodings,

  codecOptions: ProducerCodecOptions(videoGoogleStartBitrate: 1000),
  stopTracks: false,
);

producerTransport.on('connect', (data) {
  log("Producer transport connected ${data}");
  mySocket?.emit(
      'stream-started', {'producerClient': data, 'roomId': '${roomId}'});
});

producerTransport.on('trackended', (data) {
  print('track ended $data');
});

producerTransport.on('connectionstatechange', (state) {
  print("Producer transport connection state: $state");
  if (state == 'closed') {
    print("Producer transport closed");
    mySocket?.emit('stream-stopped', {'reason': 'Transport closed'});
  }
});

print("Started producing video track with ID: ${videoTrack!.id}");

}

It seems you're encountering a "no matching codec found" error with transport.produce(). Let's go through a few steps to troubleshoot this:

Check Server-Supported Codecs: Ensure that the codecs you're attempting to use are supported by your server. You can verify this by inspecting the rtpCapabilities provided by the server.

Validate vidCodec Initialization: Confirm that vidCodec is correctly initialized with a codec that matches one of the server's supported codecs. This involves parsing the server's rtpCapabilities and setting vidCodec accordingly.

Review Encoding Parameters: Make sure that the RtpEncodingParameters you're using align with the capabilities of the selected codec. Mismatched parameters can lead to compatibility issues.

Additionally, could you let us know if you're using the MediaSFU Community Edition as your server? If so, it's recommended to refer to the following files, which have been confirmed to work:

create_send_transport.dart
connect_send_transport_video.dart

These references might provide insights into the correct implementation.
Lastly, consider migrating to version 0.0.5 of the SDK, as it may contain fixes or improvements related to this issue.
Please review these points and let us know if the problem persists.

The problem still persists, even migrating to 0.0.5 didn't help, and no, I'm not using the community edition as my server

The problem still persists, even migrating to 0.0.5 didn't help, and no,
I'm not using the community edition as my server, are there any other ways
to fix this issue?
On Sat, Dec 7, 2024 at 9:56 AM MediaSFU @.***> wrote:

It seems you're encountering a "no matching codec found" error with
transport.produce(). Let's go through a few steps to troubleshoot this:

Check Server-Supported Codecs: Ensure that the codecs you're
attempting to use are supported by your server. You can verify this by
inspecting the rtpCapabilities provided by the server.
2.
Validate vidCodec Initialization: Confirm that vidCodec is correctly
initialized with a codec that matches one of the server's supported codecs.
This involves parsing the server's rtpCapabilities and setting vidCodec
accordingly.
3.
Review Encoding Parameters: Make sure that the RtpEncodingParameters
you're using align with the capabilities of the selected codec. Mismatched
parameters can lead to compatibility issues.
Additionally, could you let us know if you're using the MediaSFU
Community Edition https://github.com/MediaSFU/MediaSFUOpen as your
server? If so, it's recommended to refer to the following files, which have
been confirmed to work:

create_send_transport.dart
https://github.com/MediaSFU/MediaSFU_SDK_Flutter/blob/main/lib/consumers/create_send_transport.dart
connect_send_transport_video.dart
https://github.com/MediaSFU/MediaSFU_SDK_Flutter/blob/main/lib/consumers/connect_send_transport_video.dart

These references might provide insights into the correct implementation.
Lastly, consider migrating to version 0.0.5 of the SDK, as it may contain
fixes or improvements related to this issue.
Please review these points and let us know if the problem persists.
—
Reply to this email directly, view it on GitHub
https://github.com/MediaSFU/mediasfu_mediasoup_client/issues/1#issuecomment-2525039344,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AR4Y65QXJBR2MPULYNPWCZL2EKZ3BAVCNFSM6AAAAABTFPX2S6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMRVGAZTSMZUGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

A likely solution is to adjust the order of your codecs in the configuration file used for creating routers. For example:
const mediaCodecs = [
  {
    kind: "audio",
    mimeType: "audio/opus",
    clockRate: 48000,
    channels: 2,
    preferredPayloadType: 111,
    scalabilityMode: "L1T3",
    parameters: {
      minptime: 10,
      useinbandfec: 1,
    },
  },
  {
    kind: "video",
    mimeType: "video/h264",
    clockRate: 90000,
    scalabilityModes: "L1T3",
    preferredPayloadType: 125,
    parameters: {
      "packetization-mode": 1,
      "profile-level-id": "42e01f",
      "level-asymmetry-allowed": 1,
      "x-google-start-bitrate": 1000,
    },
    rtcpFeedback: [
      { type: "nack", parameter: "" },
      { type: "nack", parameter: "pli" },
      { type: "ccm", parameter: "fir" },
    ],
  },
  {
    kind: "video",
    mimeType: "video/VP8",
    clockRate: 90000,
    scalabilityMode: "L1T3",
    preferredPayloadType: 96,
    parameters: {
      "x-google-start-bitrate": 1000,
    },
  },
  {
    kind: "video",
    mimeType: "video/VP9",
    clockRate: 90000,
    preferredPayloadType: 98,
    parameters: {
      "packetization-mode": 1,
      "profile-id": 0,
      "level-asymmetry-allowed": 1,
      "x-google-start-bitrate": 1000,
    },
  },
];

Rearranging codecs like this can sometimes resolve compatibility issues.
Once updated, please review the links shared earlier for implementation references. If the problem persists, consider checking out the [Mediasoup Discourse Forum](https://mediasoup.discourse.group/) for additional guidance.

So I was able to bypass the code error, but for some reason the on produce event isn't triggering, the on connect works tho

Great to hear you bypassed the codec error! If the onProduce event isn't triggering while onConnect works, here are a few things to check:

Ensure onProduce is Registered Properly
Verify that the onProduce callback is correctly set when creating the sendTransport. It should look like this:
producerTransport.on('produce', (parameters, callback) {
  log("onProduce parameters: $parameters");
  // Emit the produce event to the server
  mySocket?.emitWithAck(
    'transport-produce',
    {
      'kind': parameters['kind'],
      'rtpParameters': parameters['rtpParameters'],
      'appData': parameters['appData'],
    },
    ack: (response) {
      if (response != null && response['id'] != null) {
        log("Producer created with ID: ${response['id']}");
        callback(response['id']);
      } else {
        log("Error during transport-produce: ${response}");
      }
    },
  );
});

Check Server-Side Logic
The transport-produce event needs to be handled properly on the server side. Since we can't comment on your server-side implementation, we highly recommend referring to the [sample server code](https://github.com/MediaSFU/MediaSFUOpen/blob/main/index.js) provided by MediaSFU.
You don’t need to run it, but make sure to review its signaling logic and steps to replicate them. This is the most up-to-date implementation and ensures everything aligns correctly.

Verify Track and Stream Status
Ensure the track you’re passing to produce() is active and valid:
final videoTrack = localStream?.getVideoTracks().first;
if (videoTrack == null) {
  log("No video track available for produce.");
  return;
}

Server Logging
Add detailed logs on your server to confirm that the transport-produce event is being received and processed as expected. If it isn’t, check the client-server communication for issues.

Double-Check AppData and RTP Parameters
Ensure that appData and rtpParameters are well-structured and meet the server’s requirements.

By following these steps and aligning with the sample server implementation, you should be able to resolve the issue. Let us know if you need further assistance!

Good morning, i'm still not getting the on(produce) event
below are my logs and my current code;
please help me check if there's anything you can do, thank you
flutter: Video tracks: [Track(id: 20F78AB2-ADCA-4EC8-AE39-F85D7FF42629, kind: video, label: 20F78AB2-ADCA-4EC8-AE39-F85D7FF42629, enabled: true, muted: false)]
flutter: Audio tracks: [Track(id: D4FB96AB-6AE3-444F-A567-6BA42F351E03, kind: audio, label: D4FB96AB-6AE3-444F-A567-6BA42F351E03, enabled: true, muted: false)]
[log] Local stream initialized: Instance of 'MediaStreamNative'
[log] Requesting RTP Capabilities...
[log] Received RTP Capabilities: {rtpCapabilities: {codecs: [{kind: audio, mimeType: audio/opus, clockRate: 48000, channels: 2, rtcpFeedback: [{type: nack, parameter: }, {type: transport-cc, parameter: }], parameters: {}, preferredPayloadType: 100}, {kind: video, mimeType: video/VP8, clockRate: 90000, rtcpFeedback: [{type: nack, parameter: }, {type: nack, parameter: pli}, {type: ccm, parameter: fir}, {type: goog-remb, parameter: }, {type: transport-cc, parameter: }], parameters: {x-google-start-bitrate: 1000}, preferredPayloadType: 101}, {kind: video, mimeType: video/rtx, preferredPayloadType: 102, clockRate: 90000, parameters: {apt: 101}, rtcpFeedback: []}], headerExtensions: [{kind: audio, uri: urn:ietf:params:rtp-hdrext:sdes:mid, preferredId: 1, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: urn:ietf:params:rtp-hdrext:sdes:mid, preferredId: 1, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id, preferredId: 2, preferredEncrypt: false, direction: recvonly}, {kind: video, uri: urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id, preferredId: 3, preferredEncrypt: false, direction: recvonly}, {kind: audio, uri: http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time, preferredId: 4, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time, preferredId: 4, preferredEncrypt: false, direction: sendrecv}, {kind: audio, uri: http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01, preferredId: 5, preferredEncrypt: false, direction: recvonly}, {kind: video, uri: http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01, preferredId: 5, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07, preferredId: 6, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: urn:ietf:params:rtp-hdrext:framemarking, preferredId: 7, preferredEncrypt: false, direction: sendrecv}, {kind: audio, uri: urn:ietf:params:rtp-hdrext:ssrc-audio-level, preferredId: 10, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: urn:3gpp:video-orientation, preferredId: 11, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: urn:ietf:params:rtp-hdrext:toffset, preferredId: 12, preferredEncrypt: false, direction: sendrecv}, {kind: audio, uri: http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time, preferredId: 13, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: http://www.webrtc.org/experiments/rtp-hdrext/abs-capture-time, preferredId: 13, preferredEncrypt: false, direction: sendrecv}, {kind: audio, uri: http://www.webrtc.org/experiments/rtp-hdrext/playout-delay, preferredId: 14, preferredEncrypt: false, direction: sendrecv}, {kind: video, uri: http://www.webrtc.org/experiments/rtp-hdrext/playout-delay, preferredId: 14, preferredEncrypt: false, direction: sendrecv}]}}
[log] Device RTP Capabilities: Instance of 'RtpCapabilities'
[log] Received transport params: {params: {id: c81ef555-0f5d-4f6a-baa7-018270273cb1, iceParameters: {usernameFragment: yfwxsosnhkn1i0ucnct6pd9wql8e75r1, password: sdibeumhrqx7cq0ilmzgjvze83i8tjxf, iceLite: true}, iceCandidates: [{foundation: udpcandidate, priority:<PHONE_NUMBER>, ip: <IP_ADDRESS>, address: <IP_ADDRESS>, protocol: udp, port: 40065, type: host}, {foundation: tcpcandidate, priority:<PHONE_NUMBER>, ip: <IP_ADDRESS>, address: <IP_ADDRESS>, protocol: tcp, port: 40063, type: host, tcpType: passive}], dtlsParameters: {fingerprints: [{algorithm: sha-256, value: C7:CC:FB:14:69:C2:8D:39:EF:5A:F1:B5:D5:0D:09:FA:FA:E4:D1:0C:9D:6E:A1:FD:32:DB:36:30:05:83:1A:64}, {algorithm: sha-512, value: 79:7D:58:10:41:77:0D:E5:30:67:92:AB:CE:D2:C3:3C:4B:C2:1F:D7:06:29:0C:D4:D7:E6:BC:49:CE:F9:77:4A:B4:8A:20:72:A2:5E:D4:2E:D4:7E:33:0B:AB:24:66:25:F4:D6:F1:70:97:77:96:AE:85:23:F0:67:20:B7:E7:04}, {algorithm: sha-1, value: 70:6C:9E:B9:33:E3:A3:B0:02:4F:6D:EF:19:F5:4A:B2:E0:6A:17:7F}, {algorithm: sha-224, value: 1D:A7:57:59:A0:0B:59:AB:30:32:3E:0C:16:15:11:6F:57:BA:0A:82:E6:FE:80:EF:CF:39:EF:3C}, {algorithm: sha-384, value: E6:D0:4B:F7:3B:D8:59:7A:20:47:74:36:EB:B6:01:F7:CF:FF:82:A2:4B:25:B0:C3:0C:3A:90:B1:30:A5:B7:88:7E:99:C9:2E:1F:4B:E7:7E:C1:64:64:CA:4A:D2:D0:23}], role: auto}}}
flutter: Local audio transport created successfully.
flutter: Local video transport created successfully.
[log] successful production
flutter: Send transport needs to connect! Instance of 'Transport'
flutter: inside connect trans B9BBF00F-24B5-4076-A0D7-3A0EA1AD5785
flutter: Started producing video track with ID: 20F78AB2-ADCA-4EC8-AE39-F85D7FF42629
[log] Producer transport connecting with data in setupTraansports: {dtlsParameters: Instance of 'DtlsParameters', callback: Closure: ([Object?]) => void from Function 'complete':., errback: Closure: (Object, [StackTrace?]) => void from Function 'completeError':.}
Future createLocalAudioTransport() async {
try {
if (localStream == null) {
print("Error: Local stream is not initialized for audio.");
return;
}
// Extract the audio track
final audioTrack = localStream?.getAudioTracks().first;
if (audioTrack == null) {
print("No audio track available in the local stream.");
return;
}
// Configure RTP encoding parameters for the audio track
List audioEncodings = [
RtpEncodingParameters(maxBitrate: 64000, active: true),
];
// Produce the audio track
producerTransport?.produce(
track: audioTrack,
stream: localStream!,
source: 'mic',
encodings: audioEncodings,
codecOptions: ProducerCodecOptions(
opusStereo: 1, // Enable stereo (1 = true, 0 = false)
opusFec: 1, // Enable Forward Error Correction
opusMaxAverageBitrate: 96000, // Set average bitrate (in bps)
),
stopTracks: false,
disableTrackOnPause: false
);
print("Local audio transport created successfully.");
} catch (error) {
print("Error creating local audio transport: $error");
}
}
Future createLocalVideoTransport() async {
try {
if (localStream == null) {
print("Error: Local stream is not initialized for video.");
return;
}
// Extract the video track
final videoTrack = localStream?.getVideoTracks().first;
if (videoTrack == null) {
print("No video track available in the local stream.");
return;
}
// Configure RTP encoding parameters for the video track
List videoEncodings = [
RtpEncodingParameters(
rid: 'r0',
maxBitrate: 250000,
scalabilityMode: 'S1T3',
active: true,
),
RtpEncodingParameters(
rid: 'r1',
maxBitrate: 500000,
scalabilityMode: 'S1T3',
active: true,
),
RtpEncodingParameters(
rid: 'r2',
maxBitrate: 1000000,
scalabilityMode: 'S1T3',
active: true,
),
];
// Produce the video track
producerTransport?.produce(
track: videoTrack,
stream: localStream!,
source: 'Camera',
encodings: videoEncodings,
codecOptions: ProducerCodecOptions(
videoGoogleStartBitrate: 1000, // Initial bitrate in kbps
videoGoogleMaxBitrate: 2000, // Max bitrate in kbps
videoGoogleMinBitrate: 500, // Min bitrate in kbps
),
stopTracks: false,
disableTrackOnPause: false
);
print("Local video transport created successfully.");
} catch (error) {
print("Error creating local video transport: $error");
}
}
///step1
Future getLocalStream() async {
try {
localStream = await navigator.mediaDevices.getUserMedia({
'audio': {
'mandatory': {
'googEchoCancellation': 'true',
'googAutoGainControl': 'true',
'googNoiseSuppression': 'true',
'googHighpassFilter': 'true',
},
'optional': [],
},
'video': {
'mandatory': {
'minWidth': '640',
'minHeight': '480',
'minFrameRate': '30',
},
'optional': [
{'facingMode': isFrontCameraSelected ? 'user' : 'environment'}
],
}
});
  print("Video tracks: ${localStream?.getVideoTracks()}");
  print("Audio tracks: ${localStream?.getAudioTracks()}");
  localRenderer.srcObject = localStream;
  log("Local stream initialized: ${localRenderer.srcObject}");

  getRtpCapabilities();
} catch (error) {
  print("Error initializing local stream: $error");
}

}
void updateScreenProducer(Producer producer) {
try {
if (producer.kind != 'video') {
print("Error: Provided producer is not a video producer.");
return;
}
screenProducer = producer;
print("Screen producer updated: ID = ${screenProducer!.id}");
} catch (error) {
print("Error updating screen producer: $error");
}
}
void updateVideoProducer(Producer producer) {
try {
if (producer.kind != 'video') {
print("Error: Provided producer is not a video producer.");
return;
}
videoProducer = producer;
print("Video producer updated: ID = ${videoProducer!.id}");
} catch (error) {
print("Error updating video producer: $error");
}
}
void updateAudioProducer(Producer producer) {
try {
if (producer.kind != 'audio') {
print("Error: Provided producer is not an audio producer.");
return;
}
audioProducer = producer;
print("Audio producer updated: ID = ${audioProducer!.id}");
} catch (error) {
print("Error updating audio producer: $error");
}
}
///step3
// Step 3: Create Device and Remote Transport
Future createDevice(RtpCapabilities routerRtpCapabilities) async {
try {
device = Device();
  await device.load(routerRtpCapabilities: routerRtpCapabilities);
  log("Device RTP Capabilities: ${device.rtpCapabilities}");

  await createSendTransport(device);
} catch (error) {
  print("Error creating device: $error");
}

}
/// Step 2: Fetch RTP capabilities
void getRtpCapabilities() {
try {
mySocket?.emitWithAck(
'getRtpCapabilities',
[],
ack: (response) async {
if (response == null || response['rtpCapabilities'] == null) {
print("Error: Invalid RTP Capabilities received");
return;
}
log("Received RTP Capabilities: $response");
routerRtpCapabilities =
RtpCapabilities.fromMap(response['rtpCapabilities']);
// await extractVideoCodecs(response['rtpCapabilities']);
await createDevice(routerRtpCapabilities!);
},
);
log("Requesting RTP Capabilities...");
} catch (error) {
print("Error fetching RTP capabilities: $error");
}
}
// Helper: Setup Transport Events
Future setupTransportEvents(
Transport transport,
String roomId,
String providerUserId,
) async {
transport.on('connect', (data) async {
try {
log("Producer transport connecting with data in setupTraansports: $data");
final dtlsParameters =
(data['dtlsParameters'] as DtlsParameters).toMap();
mySocket?.emitWithAck(
'transport-connect',
{
'dtlsParameters': dtlsParameters,
// 'roomId': roomId,
'providerUserId': providerUserId,
},
ack: (_) => data'callback',
);
} catch (error) {
print("Error during transport connection: $error");
data'errback';
}
});
transport.on('produce', (data) async {
log("Producer setuPtRANSPORTS ON PRODUCE: $data");
try {
log("Producer transport connecting with data in setuPtRANSPORTS ON PRODUCE: $data");
mySocket?.emitWithAck(
'transport-produce',
{
'kind': data['kind'],
'rtpParameters': data['rtpParameters'],
'appData': data['appData'],
'roomId': roomId,
'providerUserId': providerUserId,
},
ack: (response) => data'callback',
);
} catch (error) {
print("Error during transport production: $error");
data'errback';
}
});
transport.on('connectionstatechange', (state) {
  print("Connection state: $state");
  if (state == 'failed') {
    print("Transport connection failed, closing...");
    transport.close();
  }
});

}
// Helper: Handle Producer Callback
void handleProducerCallback(Producer producer) {
if (producer.kind == 'video') {
if (producer.source == 'screen') {
updateScreenProducer(producer);
} else {
updateVideoProducer(producer);
}
} else if (producer.kind == 'audio') {
updateAudioProducer(producer);
}
}
//step5
Future connectSendTransport() async {
print("Send transport needs to connect! $producerTransport");
final user = ref.read(userDataProvider);
var providerUserId = user.id!;
var roomId = ref.read(currentConversationIdProvider);
if (localStream == null) {
  print("Error: Local stream is not initialized for video.");
  return;
}
final videoTrack = localStream?.getVideoTracks().first;
print('inside connect trans ${localStream!.id}');
if (videoTrack == null) {
  print("No video track available ${videoTrack?.kind}");

  return;
}
List<RtpEncodingParameters> encodings = [
  RtpEncodingParameters(
    rid: 'r0',
    maxBitrate: 250000,
    scalabilityMode: 'S1T3',
    active: true,
  ),
  RtpEncodingParameters(
    rid: 'r1',
    maxBitrate: 500000,
    scalabilityMode: 'S1T3',
    active: true,
  ),
  RtpEncodingParameters(
    rid: 'r2',
    maxBitrate: 1000000,
    scalabilityMode: 'S1T3',
    active: true,
  ),
];

try {
  producerTransport.produce(
    track: videoTrack,
    stream: localStream!,
    source: 'Camera',
    encodings: encodings,
    codecOptions: ProducerCodecOptions(
      videoGoogleStartBitrate: 1000, // Initial bitrate in kbps
      videoGoogleMaxBitrate: 2000, // Max bitrate in kbps
      videoGoogleMinBitrate: 500, // Min bitrate in kbps
    ),
    stopTracks: false,
    disableTrackOnPause: false
  );
  log("successful production");
} catch (error) {
  log('Error during production: $error');
}

producerTransport.on('trackended', (data) {
  print('track ended $data');
});

producerTransport.on('connectionstatechange', (state) {
  print("Producer transport connection state: $state");
  if (state == 'closed') {
    print("Producer transport closed");
    mySocket?.emit('stream-stopped', {'reason': 'Transport closed'});
  }
});

print("Started producing video track with ID: ${videoTrack!.id}");

mySocket?.emit('stream-started',
    {'producerClient': producerTransport, 'roomId': roomId});

}
//step4
Future createSendTransport(Device newDevice) async {
try {
final user = ref.read(userDataProvider);
var providerUserId = user.id!;
var roomId = ref.read(currentConversationIdProvider);
mySocket?.emitWithAck(
'createProducerWebRtcTransport',
{'sender': true, 'providerUserId': providerUserId},
ack: (params) async {
if (params['error'] != null) {
print("Error creating send transport: ${params['error']}");
return;
}
log("Received transport params: $params");
var transportParams = params['params'];
producerTransport = newDevice.createSendTransportFromMap(
transportParams,
producerCallback: handleProducerCallback,
);
      Future.delayed(Duration(milliseconds: 100));
      // Handle transport events
      await setupTransportEvents(
          producerTransport, roomId!, providerUserId);
      Future.delayed(Duration(milliseconds: 600)).then((value) async {
        // producerTransport.on('connectionstatechange', (state) async {
        // if (state == 'connected') {
        await createLocalAudioTransport();
        await createLocalVideoTransport();
        await connectSendTransport();
        // } else {
        //   print("Transport not ready for production.");
        // }
        // });
      });
      // Connect the transport
    },
  );
} catch (error) {
  print("Error during send transport creation: $error");
}

}
void consume() {
mySocket?.emitWithAck(
'consume', {'rtpCapabilities': device.rtpCapabilities.toMap()},
ack: (response) {
if (response['error'] != null) {
print("Error consuming: ${response['error']}");
return;
}
  consumerTransport.consume(
    id: response['id'],
    producerId: response['producerId'],
    kind: response['kind'],
    peerId: response['peerId'],
    rtpParameters: RtpParameters.fromMap(response['rtpParameters']),
  );
  consumerTransport.on('track', (track) {
    if (track.kind == 'video' || track.kind == 'audio') {
      print("Received ${track.kind} track");
      // if (remoteStream == null) {
      remoteStream?.addTrack(track);
      remoteRenderer.srcObject = remoteStream;
      // }
    }
  });

  // remoteStream = MediaStream([consumer.track]);
  // remoteStream?.addTrack(consumerTransport.track);
  remoteRenderer.srcObject = remoteStream;
  mySocket?.emit('consumer-resume', {'consumerId': response['id']});
});

}
void createRecvTransport(consumerId) {
mySocket?.emitWithAck('createCustomerWebRtcTransport', {
'sender': false,
'consumerId': '${consumerId}'
}, ack: (dynamic params) async {
if (params['error'] != null) {
print("Error creating recv transport: ${params['error']}");
return;
}
log(" consumer params $params");
// consumerTransport = device.createRecvTransport(params);
  consume();
});

}
void getConsumerRtpCapabilities() {
mySocket?.emit('getRtpCapabilities', (data) {
routerRtpCapabilities = data['rtpCapabilities'];
  createRecvTransport(data['consumerId']);
});
log("getting ConsumerRtpCapabilities");

}

Good morning, could you please help me look through one last time?
On Tue, Dec 10, 2024 at 2:09 PM MediaSFU @.***> wrote:

Great to hear you bypassed the codec error! If the onProduce event isn't
triggering while onConnect works, here are a few things to check:

Ensure onProduce is Registered Properly
Verify that the onProduce callback is correctly set when creating the
sendTransport. It should look like this:
producerTransport.on('produce', (parameters, callback) {
log("onProduce parameters: $parameters");
// Emit the produce event to the server
mySocket?.emitWithAck(
'transport-produce',
{
'kind': parameters['kind'],
'rtpParameters': parameters['rtpParameters'],
'appData': parameters['appData'],
},
ack: (response) {
if (response != null && response['id'] != null) {
log("Producer created with ID: ${response['id']}");
callback(response['id']);
} else {
log("Error during transport-produce: ${response}");
}
},
);
});

Check Server-Side Logic
The transport-produce event needs to be handled properly on the server
side. Since we can't comment on your server-side implementation, we highly
recommend referring to the sample server code
https://github.com/MediaSFU/MediaSFUOpen/blob/main/index.js provided
by MediaSFU.
You don’t need to run it, but make sure to review its signaling logic
and steps to replicate them. This is the most up-to-date implementation and
ensures everything aligns correctly.
3.
Verify Track and Stream Status
Ensure the track you’re passing to produce() is active and valid:
final videoTrack = localStream?.getVideoTracks().first;if (videoTrack == null) {
log("No video track available for produce.");
return;
}

Server Logging
Add detailed logs on your server to confirm that the transport-produce
event is being received and processed as expected. If it isn’t, check the
client-server communication for issues.
5.
Double-Check AppData and RTP Parameters
Ensure that appData and rtpParameters are well-structured and meet the
server’s requirements.
By following these steps and aligning with the sample server
implementation, you should be able to resolve the issue. Let us know if you
need further assistance!
—
Reply to this email directly, view it on GitHub
https://github.com/MediaSFU/mediasfu_mediasoup_client/issues/1#issuecomment-2531593102,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AR4Y65UNXDGI2OE5MQ24WJ32E3RY5AVCNFSM6AAAAABTFPX2S6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZRGU4TGMJQGI
.
You are receiving this because you authored the thread.Message ID:
@.***>

It looks like you're making good progress, and both audio and video transports are being created successfully. Since the production process seems to be working (Started producing video track with ID: ...), the onProduce logic appears to be triggered and handled properly.
Here are a few recommendations to ensure everything continues to work as expected:

Review Server-Side Logic for transport-produce
Double-check your server's handling of the transport-produce event. Ensure that it acknowledges the produce request and creates the producer correctly. Adding detailed server-side logging can help verify this.

Verify RTP Encoding Parameters and Codec Options
Your RTP encoding parameters and codec options look well-structured, but make sure they align with the server's capabilities. Mismatches can lead to unexpected behavior during the produce process.

Try Producing with Fewer Constraints
Temporarily simplify the encoding parameters and codec options during the produce call. For example, try a single encoding with basic constraints to rule out any issues with specific settings.


LUA Debug Documentation

Hi, Sparker,
I am very interested in extending the Lua Debug topic a bit more. The manual is already a little help but Not recommended for larger scripts.
2 ways exist, in a console or in a graphical way. And as always, of course, valid for all platforms.
It would be great if we could do this on the GitHub wiki for the project. That way, anyone who wants to support can also provide content.
What do you say?
Greetings Lars

Hi Lars,
Yes I think that is a great idea but do not know how to do that or have the time at this point. If there is anyway you could help that would be great but if not will geat to that sometime in the future.

Hi William,
here a first Draft ;-)
https://github.com/urbanswelt/FlyWithLua/wiki/Debugging
At this time CLI debugging.

I read down through tha whole thing and that is looking quite nice so thanks for starting this.
I have a few to many irons in the fire right now but very much like what I see.

Hello, William,
Take your time, this topic is not critical at all ;-)
GUI Content is ready... i am not happy with Markdown documents ^^
Greetings Lars

I have made my last change for a while with version 2.7.25 supporting Imgui 1.76 and will release on the org with in the next week.

I can't believe it has been almost a year but was wondering if you wanted to do a pull request so we can get this on the main repo. Improving the error handling is still my long term goal just that some of it seems over my head.


[BUG]UnicodeDecodeError for flows containing multibyte characters

Describe the bug
A problem has been identified concerning flows that include multibyte characters in either the input or jinja.
How To Reproduce the bug
Steps to reproduce the bug:

Construct a flow that accepts inputs in jinja and outputs them as is, without any processing.
The flow will function correctly if the input comprises single-byte characters, but it will fail when dealing with multibyte characters.

Screenshots
single-byte characters

multibyte characters

Running Information

Promptflow Package Version: 0.1.0b7.post1
Operating System: Windows 10
Python Version: python==3.9.18

I used the same version of promptflow and changed the execution environment to WSL2+Ubuntu and it worked. it seems to be a Windows specific problem.

Somehow i was unable to repro issue even with System Locale set to Japanese or Chinese.
@wangchao1230  do you think we should force the files we generate (like flow.dag.yaml) to be UTF-8?

@ttthree
I understand this issue pertains to character encoding. Yet, the same problem occurs even when using a file from basic-with-builtin-llm.
Intriguingly, it doesn't seem to fail with all multibyte characters.
Inputs that work:

Python 日本語でこんにちは!
Python 日本語でHello World!

Inputs that fail:

Python print 日本語

It's possible that the issue arises specifically when the input ends with the word 日本語.
Traceback (most recent call last):
  File "C:\Users\username\Anaconda3\envs\pf\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\username\Anaconda3\envs\pf\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_cli\_pf\entry.py", line 97, in <module>
    main()
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_cli\_pf\entry.py", line 93, in main
    entry(command_args)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_cli\_pf\entry.py", line 75, in entry
    raise ex
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_cli\_pf\entry.py", line 59, in entry
    dispatch_flow_commands(args)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_cli\_pf\_flow.py", line 60, in dispatch_flow_commands
    test_flow(args)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_cli\_utils.py", line 363, in wrapper
    raise e
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_cli\_utils.py", line 351, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_cli\_pf\_flow.py", line 344, in test_flow
    result = pf_client.flows._test(
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_sdk\operations\_flow_operations.py", line 99, in _test
    with TestSubmitter(flow=flow, variant=variant).init() as submitter:
  File "C:\Users\username\Anaconda3\envs\pf\lib\contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_sdk\operations\_test_submitter.py", line 48, in init
    with variant_overwrite_context(self._origin_flow.code, tuning_node, node_variant) as temp_flow:
  File "C:\Users\username\Anaconda3\envs\pf\lib\contextlib.py", line 119, in __enter__
    return next(self.gen)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_sdk\operations\_run_submitter.py", line 172, in variant_overwrite_context
    flow_dag_path, _ = _load_flow_dag(flow_path)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\promptflow\_sdk\operations\_run_submitter.py", line 62, in _load_flow_dag
    flow_dag = yaml.safe_load(f)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\yaml\__init__.py", line 125, in safe_load
    return load(stream, SafeLoader)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\yaml\__init__.py", line 79, in load
    loader = Loader(stream)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\yaml\loader.py", line 34, in __init__
    Reader.__init__(self, stream)
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\yaml\reader.py", line 85, in __init__
    self.determine_encoding()
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\yaml\reader.py", line 124, in determine_encoding
    self.update_raw()
  File "C:\Users\username\Anaconda3\envs\pf\lib\site-packages\yaml\reader.py", line 178, in update_raw
    data = self.stream.read(size)
UnicodeDecodeError: 'cp932' codec can't decode byte 0x9e in position 205: illegal multibyte sequence

I hope the following information will be helpful.

In the initial example provided, flow.dag.yaml and jinja2 were saved in utf-8.
In the initial example provided, a UnicodeDecodeError did not occur when the input was multibyte characters other than 日本語.

For example, if the input is 日本, no error will occur. However, as shown in the screenshot below, the result will be strange.

Although the input is 日本, the input in Jinja is the garbled 譌･譛ｬ.

@ttthree  Yes, I think we should force the encoding of the flow.dag.yaml to be UTF-8.
So we need to change the places we read/write this file. For sdk we can start by changing places using: yaml.safe_load.
I tried to use some file encoding other thatn utf-8, it will raise strange error for me.
But I coudn't repro issue when using utf-8 yaml encoding and with 日本語 as input
Adding @0mza987 to follow up for he has more knowledge on 日本語 :)

I could not repro the codec error but I  re-proed this:
Although the input is 日本, the input in Jinja is the garbled 譌･譛ｬ.
It is because for pf flow test command there are some places that we should have added the encoding parameters when reading/writing yaml files. I have opened a PR to fix it and I think this should also solve the UnicodeDecodeError
https://github.com/microsoft/promptflow/pull/683/files

Please note this issue should be resolved in latest version 1.0.0.
Please let us know if you still met such issue.


add option to disable syncing

gives flatfs a way to be less safe, but wayyyyy faster.

As with the interface, I thought the default New constructor syncs by default? ref: https://github.com/jbenet/go-datastore/pull/30#discussion_r40523430

i'd vote for syncing by default-- but i guess this at least breaks the code and forces users to look at the new interface.
if we want to not break code, i'd suggest:
func New(path string, prefixLen int) (*Datastore, error)
func NewSync(path string, prefixLen int, sync bool) (*Datastore, error)

As with compatibility breaking, the project that vendors and uses go-datastore directly so far is go-ipfs (that I can find from the internet). And so this can be quickly mended.
note: all the specific implementations of the Datastore interface has one version of New/NewDatastore/NewDs. Some of them use option struct (just as struct fields have default value, and hence the defaults can be set), which is more future-proof. But this is unnecessary unless there will be more options to flatfs.New in the future.


add changeset and remove duplicate diffProps process

Code review suggestions for the pull request https://github.com/rrweb-io/rrweb/pull/1352
DiffProps process can be done either before or after updating children without considering this edge case. So we can remove the existing one.

makes sense to me, thank you @YunFeng0817! i re-tested the issue locally and everything looks good 👍


some questions  about setup

hi,sorry to bother  you .i can not understand the command in the setup,which means"install  crowd_nav into pip",as i know,the crowd_nav is a folder name,  how should i do to install this requirments. i  would like to seek for your help , thank you very much .

Hi, you simply need to run the command below that sentence "pip install -e .". What it does is to install this code repository as module into pip in development mode.  Let me know if you run into any problems after running that command.

Thank you for your reply.when I try the command "pip install -e .". There is an error"FileNotFoundError: [Errno 2] 没有那个文件或目录: '/home/hurong/.virtualenvs/CrowdNav/lib/python3.5/site-packages/crowdnav-0.0.1-py3.5.egg'"
I don't know where the problem is.Could you please tell me?

I don’t know if I installed the Python-RVO2 library correctly. First of all, I downloaded the code of the Python-RVO2 library and installed it in this folder. I did not put the code folder of the Python-RVO2 library under the CrowdNav folder. Is this correct?
then，I enter the Python-RVO2-master folder and run these command："pip install -r requirements.txt" “python setup.py build”
"python setup.py install"
At last it appeared this prompt：“Installed /home/hurong/.virtualenvs/CrowdNav/lib/python3.5/site-packages/pyrvo2-0.0.0-py3.5-linux-x86_64.egg
Processing dependencies for pyrvo2==0.0.0
Finished processing dependencies for pyrvo2==0.0.0
”，This should mean that I installed the Python-RVO2 library successfully, right?

Thank you for your reply.when I try the command "pip install -e .". There is an error"FileNotFoundError: [Errno 2] 没有那个文件或目录: '/home/hurong/.virtualenvs/CrowdNav/lib/python3.5/site-packages/crowdnav-0.0.1-py3.5.egg'"
I don't know where the problem is.Could you please tell me?

Where did you run this command? Did you run it in the root directory? The error basically says this repo is not correctly installed in the pip.

I don’t know if I installed the Python-RVO2 library correctly. First of all, I downloaded the code of the Python-RVO2 library and installed it in this folder. I did not put the code folder of the Python-RVO2 library under the CrowdNav folder. Is this correct?
then，I enter the Python-RVO2-master folder and run these command："pip install -r requirements.txt" “python setup.py build”
"python setup.py install"
At last it appeared this prompt：“Installed /home/hurong/.virtualenvs/CrowdNav/lib/python3.5/site-packages/pyrvo2-0.0.0-py3.5-linux-x86_64.egg
Processing dependencies for pyrvo2==0.0.0
Finished processing dependencies for pyrvo2==0.0.0
”，This should mean that I installed the Python-RVO2 library successfully, right?

I think so. Can you run the training script successfully?

Thank you for your reply.when I try the command "pip install -e .". There is an error"FileNotFoundError: [Errno 2] 没有那个文件或目录: '/home/hurong/.virtualenvs/CrowdNav/lib/python3.5/site-packages/crowdnav-0.0.1-py3.5.egg'"
I don't know where the problem is.Could you please tell me?

Where did you run this command? Did you run it in the root directory? The error basically says this repo is not correctly installed in the pip.

I  download your code in the root directory.  The folder name is CrowdNav-master. And  I enter this folder,run this command "pip install -e .".Today I try this command again.  It shows"Installing collected packages: crowdnav
Attempting uninstall: crowdnav
Found existing installation: crowdnav 0.0.1
Uninstalling crowdnav-0.0.1:
Successfully uninstalled crowdnav-0.0.1
Running setup.py develop for crowdnav
Successfully installed crowdnav
"
Is that right? But it does not mention the crowd_sim.

I don’t know if I installed the Python-RVO2 library correctly. First of all, I downloaded the code of the Python-RVO2 library and installed it in this folder. I did not put the code folder of the Python-RVO2 library under the CrowdNav folder. Is this correct?
then，I enter the Python-RVO2-master folder and run these command："pip install -r requirements.txt" “python setup.py build”
"python setup.py install"
At last it appeared this prompt：“Installed /home/hurong/.virtualenvs/CrowdNav/lib/python3.5/site-packages/pyrvo2-0.0.0-py3.5-linux-x86_64.egg
Processing dependencies for pyrvo2==0.0.0
Finished processing dependencies for pyrvo2==0.0.0
”，This should mean that I installed the Python-RVO2 library successfully, right?

I think so. Can you run the training script successfully?

no,I can not. when I run the command "python train.py --policy sarl",it shows:
Traceback (most recent call last):
File "train.py", line 177, in
main()
File "train.py", line 57, in main
repo = git.Repo(search_parent_directories=True)
File "/home/hurong/.virtualenvs/CrowdNav/lib/python3.5/site-packages/git/repo/base.py", line 181, in init
raise InvalidGitRepositoryError(epath)
git.exc.InvalidGitRepositoryError: /home/hurong/CrowdNav-master/crowd_nav
And I think the problem maybe is I did not install crowd_nav and crowd_sim.I really do not know how to fix it.

This is not necessarily because of incorrect installation of the code. This block of code is searching for .git folder in the directory. Make sure you have this folder in the parent directory.
If there is .git folder and this erro still occurs, you may comment out these few lines and see if training can run properly.

I do not have this .git folder in the CrowdNav directory.Is my installation of the code wrong or I lose the floder?

You probably downlowded the zip file. Just remove your current folder and run the code below again
git clone git@github.com:vita-epfl/CrowdNav.git

Dear Mr.Chen,
Thanks for your advise, after remove my zip file and run 'git clone https://github.com/vita-epfl/CrowdNav.git', ours team solve this problem,thank you for your patience.
Regards.


General README with FAQ for DLScript

Organized a general README to answer some frequently asked questions about DLScript.

Thank you very much!


Limit Repairs

[ ] load the preview url and click "limit". there is a console error and nothing happens. if you wait few seconds, it works fine.
Uncaught TypeError: Cannot read properties of undefined (reading 'address')
[ ] wallet is not connected and there is a call to GET https://ropsten.etherscan.io/images/main/empty-token.png (return error 503)
[ ] once you sign the limit order, you get 2 error notifications while the order is actually set (there is an open bug for this)

503 error for empty-token image will be fixed with PR #543

[ ]  load the preview url and click "limit". there is a console error and nothing happens. if you wait few seconds, it works fine.
Uncaught TypeError: Cannot read properties of undefined (reading 'address')

^ this also happens in production - I will fix in a separate PR

[ ]  wallet is not connected and there is a call to GET ropsten.etherscan.io/images/main/empty-token.png (return error 503)

^ @pingustar fixed in a separate PR

[ ]  once you sign the limit order, you get 2 error notifications while the order is actually set (there is an open bug for this)

^ if there's a separate bug I will fix it in a separate PR
==> merging away


Make flutter tool enforce >= kotlin 1.7.0, Gradle 7.0.2, and AGP 7.0.0, and Fix test failures blocking androidx upgrade

PR to pave the way for https://github.com/flutter/engine/pull/53001 to re-land
Summary:

Enforces use of Kotlin >= 1.7.0
Fixes ci failures that prevented the above PR from landing.

Details:
Because it landed initially, we are able to fake the roll in this PR to fix all the tests (see my comment).
Fixes all the tests that failed:

module_test failing on multiple platforms (3/9 of the failures).
Failure is

> Android resource linking failed
   ERROR:/b/s/w/ir/x/t/flutter_module_test.KECMXW/hello/.android/plugins_build_output/device_info/intermediates/merged_res/release/values/values.xml:194: AAPT: error: resource android:attr/lStar not found.

This is a rather unhelpful error message but some folks online suggest that upgrading your compileSdk version fixes this.
These resolve when I remove the dependency on the long discontinued package_info and device_info packages, perhaps because they are transitively pulling in low compileSdk versions? This is unclear to me.

module_custom_host_app_name_test was failing for the same reason (another 3/9, or cumulative 6/9).
tool_integration_tests_3_4 was a flake 🙂 (7/9)
framework_tests_slow needed a newer version of the Kotlin Gradle plugin (the flutter tool tells us this, so I just upgraded as suggested) and it resolved (8/9)
5.android_preview_tool_integration_tests needed newer AGP and KGP versions. I also refactored the tests, and bumped our error versions, fixing https://github.com/flutter/flutter/issues/142653.

Note that the bump to KGP is not in line with our policy - we didn't warn for 1.5.0-1.6.x for a release (or at all) before dropping support. But I think it might still be justified:

The bump to our androidx libraries unblocks ongoing Scribe work, and also includes a fix for a memory leak, among many other bug fixes.
Gradle doesn't test on half of that range, and so we implicitly can't claim to support it either. More generally, our Java and Kotlin support ranges should probably strictly fall within what Gradle tests.

Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[x] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[x] I added new tests to check the change I am making, or this PR is test-exempt.
[x] I followed the breaking change policy and added Data Driven Fixes where supported.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

module_test failing on multiple platforms (3/9 of the failures).
Failure is

> Android resource linking failed
   ERROR:/b/s/w/ir/x/t/flutter_module_test.KECMXW/hello/.android/plugins_build_output/device_info/intermediates/merged_res/release/values/values.xml:194: AAPT: error: resource android:attr/lStar not found.

This is a rather unhelpful error message but some folks online suggest that upgrading your compileSdk version fixes this.
These resolve when I remove the dependency on the long discontinued package_info and device_info packages, perhaps because they are transitively pulling in low compileSdk versions? This is unclear to me.

Three tests fail in android_preview_tool_integration_tests - two of the failures are fixed by upgrading AGP versions, which we can technically do according to the policy at https://github.com/flutter/flutter/issues/140913. But the last one requires a newer version of Kotlin (at least 1.7.10), which would break the policy currently unfortunately

Bonus, the refactor to the dependency version checker tests should make it very easy for us to set up a suite of tests that range our Gradle/AGP/KGP versions

@stuartmorgan adding you as the voice of why we should not immediately error on versions of kotlin older than 1.7.

@stuartmorgan adding you as the voice of why we should not immediately error on versions of kotlin older than 1.7.

This is purely an application-level change, right? I.e., if a developer hits this error, they just need to change a setting in their local code, rather than needing to get the authors of all plugins they use to update?
If that's correct, I don't have any objection; while it's a little bumpier for developers without a warning as compared to with one, I'm significantly less concerned about breakage that individual developers can resolve entirely locally than things that need to flow upstream from broken developers to plugin authors and then though the ecosystem and back to developers, as the latter is (from what I've seen) orders of magnitude more disruptive.

Thank you stuart for being the voice of the customer.

@stuartmorgan adding you as the voice of why we should not immediately error on versions of kotlin older than 1.7.

This is purely an application-level change, right? I.e., if a developer hits this error, they just need to change a setting in their local code, rather than needing to get the authors of all plugins they use to update?
If that's correct, I don't have any objection; while it's a little bumpier for developers without a warning as compared to with one, I'm significantly less concerned about breakage that individual developers can resolve entirely locally than things that need to flow upstream from broken developers to plugin authors and then though the ecosystem and back to developers, as the latter is (from what I've seen) orders of magnitude more disruptive.

Yes, that is correct. That is true for both this tool change, and for the error that users might encounter as a result of the re-land of https://github.com/flutter/engine/pull/53001

We talked offline and there are some difficulties in testing something that is run in gradle and needs gradle objects but is actually a script. For now the compromise was to include a patch version delta so that we could ensure the warning logic does not break.

We talked offline and there are some difficulties in testing something that is run in gradle and needs gradle objects but is actually a script. For now the compromise was to include a patch version delta so that we could ensure the warning logic does not break.

It isn't possible to bump a Gradle patch version and test that warn prints (I'd have to bump a minor version, because our minimum supported AGP version already requires the maximum patch version of AGP 7.0.x).
So I've left that test out, but included tests that we print warnings and don't block the build for AGP and KGP. Let me know if you'd prefer I bump the "warn" minor version for Gradle to 7.1.0 so we can include that test as well.

Mac builders seem to be timing out very frequently right now


Enrich node group names with the cluster name

It is not straightforward to know which node group is which unless users look at tags so this PR addresses it.

I've been away from Terraform for a while, are these changes backwards compatible?

This "renaming" will trigger the deletion of existing node groups so member nodes will be terminated and recreated. If RADAR-base stores all critical states in external PVs/DBs then yes, it is backwards-compatible but will cause downtime.


Add feature to create Azure Firewall

What problem are you facing?
Create Azure Firewall using crossplane and add NAT rules, Network rules and Application rules.
How could Crossplane help solve your problem?
Creation of Azure Firewall through crossplane will help in provisioning the resource in azure and also reconciliation.

Working on this enhancement. Azure Firewall creation. Azure Firewall Controller creation is done. Currently working on adding the rules.
FYI @muvaf @hasheddan , please assign this issue to us. (Shreya and Me)
Contributors:
Shubham Roy Choudhury : https://github.com/escortnotice
Shreya Namdeo : https://github.com/ShreyNamdeo

Developed AzureFirewall feature and have sent a PR. Currently you can only create a NAT and Network Rule (5tuple).
There is a bug as of now, which we are working on which is , the private ip is not getting created and assigned  to the azure firewall, when the firewall gets created.
PR: https://github.com/crossplane/provider-azure/pull/201


ROX-12750: Resource grouping - central part for Config and DebugLogs

Description
A detailed explanation of the changes in your PR.
Feel free to remove this section if it is overkill for your PR, and the title of your PR is sufficiently descriptive.
Checklist

[ ] Investigated and inspected CI test results
[ ] Unit test and regression tests added
[ ] Evaluated and added CHANGELOG entry if required
[ ] Determined and documented upgrade steps
[ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.
Testing Performed
TODO(replace-me)
Use this space to explain how you tested your PR, or, if you didn't test it, why
you did not do so. Valid reasons include, for example, "CI is sufficient",
"No testable changes". Feel free to attach JSON snippets, curl commands,
screenshots.
In addition to reviewing your code, reviewers must also review your testing
instructions and make sure they are sufficient.

Current dependencies on/for this PR:

master

PR #5075

PR #5091

PR #5092   👈

This comment was auto-generated by Graphite.


fix: make StreamListener public

To fix java.lang.IllegalAccessError on other JVMs see

I've been using @IEnoobong's fix and it resolves the issue using twitter4j with Kotlin. Thanks @IEnoobong.
Any chance of getting this reviewed by a maintainer?


issue in render own model

I'm trying to follow this link
[https://github.com/tensorflow/lucid/wiki/Importing-Models-into-Lucid]
And I have error in feature visualization of a layer with lucid
render.render_vis(model, "Conv2D_3:0")
What is the proper parameter in my case?
I checked my node name with this code
for node in model.graph_def.node:
      print(node.name)

And results are below.
Const
Variable
Variable_1
Variable_2
Variable_3
Variable_4
Variable_5
Variable_6
Variable_7
Variable_8
Variable_9
Variable_10
Variable_11
Conv2D_3
add_6
Relu_5
MaxPool_3
Conv2D_4
add_7
Relu_6
MaxPool_4
Conv2D_5
add_8
Relu_7
MaxPool_5
Reshape_1/shape
Reshape_1
MatMul_3
add_9
Relu_8
MatMul_4
add_10
Relu_9
MatMul_5
add_11
Softmax
lucid_metadata_json

Could you help me how can I solve this problem? :)

What error do you get?

@colah
The error message is as follows:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-36-5878bc10721e> in <module>()
      3 #_ = render.render_vis(model, obj)
      4
----> 5 _ = render.render_vis(model,"Softmax:0")

6 frames
/usr/local/lib/python3.6/dist-packages/lucid/optvis/render.py in render_vis(model, objective_f, param_f, optimizer, transforms, thresholds, print_objectives, verbose, relu_gradient_override, use_fixed_seed)
     93
     94     T = make_vis_T(model, objective_f, param_f, optimizer, transforms,
---> 95                    relu_gradient_override)
     96     print_objective_func = make_print_objective_func(print_objectives, T)
     97     loss, vis_op, t_image = T("loss"), T("vis_op"), T("input")

/usr/local/lib/python3.6/dist-packages/lucid/optvis/render.py in make_vis_T(model, objective_f, param_f, optimizer, transforms, relu_gradient_override)
    175     with gradient_override_map({'Relu': redirected_relu_grad,
    176                                 'Relu6': redirected_relu6_grad}):
--> 177       T = import_model(model, transform_f(t_image), t_image)
    178   else:
    179     T = import_model(model, transform_f(t_image), t_image)

/usr/local/lib/python3.6/dist-packages/lucid/optvis/render.py in import_model(model, t_image, t_image_raw, scope, input_map)
    255     t_image_raw = t_image
    256
--> 257   T_ = model.import_graph(t_image, scope=scope, forget_xy_shape=True, input_map=input_map)
    258
    259   def T(layer):

/usr/local/lib/python3.6/dist-packages/lucid/modelzoo/vision_base.py in import_graph(self, t_input, scope, forget_xy_shape, input_map)
    199       final_input_map.update(input_map)
    200     tf.import_graph_def(
--> 201         self.graph_def, final_input_map, name=scope)
    202     self.post_import(scope)
    203

/tensorflow-1.15.2/python3.6/tensorflow_core/python/util/deprecation.py in new_func(*args, **kwargs)
    505                 'in a future version' if date is None else ('after %s' % date),
    506                 instructions)
--> 507       return func(*args, **kwargs)
    508
    509     doc = _add_deprecated_arg_notice_to_docstring(

/tensorflow-1.15.2/python3.6/tensorflow_core/python/framework/importer.py in import_graph_def(graph_def, input_map, return_elements, name, op_dict, producer_op_list)
    403       name=name,
    404       op_dict=op_dict,
--> 405       producer_op_list=producer_op_list)
    406
    407

/tensorflow-1.15.2/python3.6/tensorflow_core/python/framework/importer.py in _import_graph_def_internal(graph_def, input_map, return_elements, validate_colocation_constraints, name, op_dict, producer_op_list)
    533     raise ValueError(
    534         'Attempted to map inputs that were not found in graph_def: [%s]' %
--> 535         ', '.join(missing_unused_input_keys))
    536
    537   if return_elements is None:

**ValueError: Attempted to map inputs that were not found in graph_def: [input:0]**

Attempted to map inputs that were not found in graph_def: [input:0]
When you exported your model, you had to declare what the name of the input node to your model was. It appears that you may have made an error when doing so, and that the name you gave doens't exist in the model.

@colah ,
Thanks to your answer, I solved the problem.
However, I have one more problem in rendering my model.
The link below is the colab notebook where the problem occurred.
https://colab.research.google.com/drive/1UPtYvjM_qurK1SwkfNa-4cekb07Nz93-?usp=sharing
And also, I attached another colab notebook about building own model, so please refer to it if necessary.
https://colab.research.google.com/drive/1CSRftnEDQiyXIlMwWrfWNgHQcdvUPCtH?usp=sharing
How can I solve this part?

When you run feature visualization, you optimize an image of size set by the argument param_f. Some models are incompatible with certain input sizes. Try doing something like:
render.render_vis(model, "conv2d_2/convolution:3", param_f=lambda: param.image(MODEL_INPUT_WIDTH))

@colah ,
Thanks to your answer, I solved the problem.
However, I have one more problem in rendering my model.
Here is my error message
---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
/tensorflow-1.15.2/python3.6/tensorflow_core/python/framework/importer.py in _import_graph_def_internal(graph_def, input_map, return_elements, validate_colocation_constraints, name, op_dict, producer_op_list)
    500         results = c_api.TF_GraphImportGraphDefWithResults(
--> 501             graph._c_graph, serialized, options)  # pylint: disable=protected-access
    502         results = c_api_util.ScopedTFImportGraphDefResults(results)

InvalidArgumentError: Negative dimension size caused by subtracting 2 from 1 for 'import/max_pooling2d_1/MaxPool' (op: 'MaxPool') with input shapes: [1,32,?,1].

During handling of the above exception, another exception occurred:

ValueError                                Traceback (most recent call last)
7 frames
/tensorflow-1.15.2/python3.6/tensorflow_core/python/framework/importer.py in _import_graph_def_internal(graph_def, input_map, return_elements, validate_colocation_constraints, name, op_dict, producer_op_list)
    503       except errors.InvalidArgumentError as e:
    504         # Convert to ValueError for backwards compatibility.
--> 505         raise ValueError(str(e))
    506
    507     # Create _DefinedFunctions for any imported functions.

ValueError: Negative dimension size caused by subtracting 2 from 1 for 'import/max_pooling2d_1/MaxPool' (op: 'MaxPool') with input shapes: [1,32,?,1].

The link below is the colab notebook where the problem occurred.
https://colab.research.google.com/drive/1UPtYvjM_qurK1SwkfNa-4cekb07Nz93-?usp=sharing
And also, I attached another colab notebook about building own model, so please refer to it if necessary.
https://colab.research.google.com/drive/1CSRftnEDQiyXIlMwWrfWNgHQcdvUPCtH?usp=sharing
How can I solve this part?

hello, have you solved this problem?

When you run feature visualization, you optimize an image of size set by the argument param_f. Some models are incompatible with certain input sizes. Try doing something like:
render.render_vis(model, "conv2d_2/convolution:3",
                               param_f=lambda: param.image(MODEL_INPUT_WIDTH))

hello, I try this, but it doesn't work.

param_f = lambda: param.image(128)
_ = render.render_vis(model, "73/BiasAdd:2", param_f)


[bug]: Empty line after CQL attempts to be executed

I pasted this into the enhance console
CREATE KEYSPACE example WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '1'} AND durable_writes = true;

I think its picking up the empty line and trying to run it

Working on that


Add ApexDocs to Carlos' classes

Included in beta release version 3.35 (Beta 11) and higher

Included in production release version 3.35


add BPS env support in helm chart

Describe the problem/challenge you have
i want to add config in values.yaml to limit bps but there is no config to use.
Describe the solution you'd like
[A clear and concise description of what you want to happen.]
add rbpsPerGb and wbpsPerGb to .Values.lvmPlugin.ioLimits and add option in commandline in /deploy/helm/charts/templates/lvm-node.yaml

Requesting more info on this. I am going ahead closing this for now. Please feel free to reopen with more elaborate details for the requirements.


Add support to vulnerability aliases

This is an initial implementation that adds support to vulnerability aliases as documented in the spec.
Note that support is only added when creating a new Vex document or adding a new statement. It doesn't support filtering or merging based on aliases.
Closes https://github.com/openvex/vexctl/issues/219

@puerco thanks for the quick review and comments. Yes, I'll add the improvements that you requested, just a note that I'll have to travel for a few days, so there might be some delay before I update the PR.

@macedogm if you need this change we can handle the validation in a follow up. If you need this one quickly, just rebase the PR, we merge it and I can add the validation logic :)

@puerco I can wait a few days, no rush on that. It's more up to you if you prefer to merge this one quickly and do the rest on a follow up PR.

Ah the linter is not happy, otherwise LGTM

@puerco hopefully I addressed your comments. PTAL and let me know if the style is as expected.
Additionally, should we consider adding a validation in internal/cmd/add.go to check if an alias being added is repeated with another aliases or vulnerabilities ID already present in the document? Would this validation make sense at the moment?

The vexStatementOptions are embedded in the addOptions, so your change should work in both :)
https://github.com/openvex/vexctl/blob/9bbf7cd70fc0d79f97ba21502aea40beec09f74d/internal/cmd/add.go#L36-L40
Thank you!


Scrollbar does not scroll all the way down the track

I'm creating a web chat module, so my scrolling element gets HTML dynamically added to it each time a message is sent.
I added a red border to the scrollbar track, and as you can see it does span the full height of the chat message container.
However, the scrollbar doesn't scroll all the way to the bottom.
I tried looking in simplebar.js and simplebar.css, but wasn't able to find the cause of this issue.
Here is the gist of my element structure:

        ...

const msgBar = new SimpleBar(document.querySelector(".chatMessages"));

Hello, i have same issue

I have the same problem, it happens when there is too much data. Have you solved this problem?

It's not a single issue, there are many unexpected results on the demo page too.

If you provide me with a reproductible example on codesandbox or similar I can take a look. But otherwise it's pretty much impossible for me to help with the info you provided since it works as intended for me on the demo site https://grsmto.github.io/simplebar/examples/

Hey! Try adding a thousand blocks or more, or try adding blocks dynamically. Have a nice day!

I found a workaround for this. The problem is arising because for some reason the simplebar-content-wrapper is larger than what your content is supposed to be. My workaround was to set the height of the simplebar-content-wrapper to the same height as the height I originally set for my scroll content. For me, it's the viewport height minus the height of my navbar.
.simplebar-content-wrapper {     height: calc(100vh - #{$fixed-navbar-height}) !important; }

I found a workaround for this. The problem is arising because for some reason the simplebar-content-wrapper is larger than what your content is supposed to be. My workaround was to set the height of the simplebar-content-wrapper to the same height as the height I originally set for my scroll content. For me, it's the viewport height minus the height of my navbar.
.simplebar-content-wrapper {     height: calc(100vh - #{$fixed-navbar-height}) !important; }


A few small fixes and updates

Found an old ->req->query and should have been ->req->post, some unused globals (mostly $settings) minor other tweaks here and there

/me :heart: when globals are removed


Tasks for Go 1.22

Update the lexer with the new bufio

[x] https://github.com/golang/go/issues/56381

I don't remember what rewrites should be done and the current lexer is working fine.


Scoped Dependency Injection failed

Hi,
I was directed here to ask my question again. I have a scoped service which is normally injected in all other services once per request. Only the implemented ISqlServerConnection which is created by a DbContext with its internal service provider gives me a new instance of my service. Any helpful tips?

How did it fail? Do you have a stack trace? Do you have a minimal repro? What does the code look like?

I doesn't fail, it gives me a new instance of the service but not the scoped one.
Code:

public class ContextService
{
    public string TenantCode { get; set; }
}
public class ApplicationSqlServerConnection : SqlServerConnection
{
    protected ContextService ContextService;

    public ApplicationSqlServerConnection(IDbContextOptions options, ILogger<SqlServerConnection> logger, ContextService contextService)
        : base(options, logger)
    {
        ContextService = contextService;
    }

    public override void Open()
    {
        base.Open();
        //Login using ContextService.TenantCode, but it is null
    }

    public override async Task OpenAsync(CancellationToken cancellationToken = default(CancellationToken))
    {
        await base.OpenAsync(cancellationToken);
        //Login using ContextService.TenantCode, but it is null
    }
}

Startup ConfigureServices()
...
services
    .AddEntityFrameworkSqlServer()
    .AddDbContext<AppDbContext>((serviceProvider, options) => options
        .UseSqlServer(
            sqlServerConnectionString,
            sqlServerOptions => sqlServerOptions.EnableRetryOnFailure())
        .ConfigureWarnings(warnings => warnings.Throw(RelationalEventId.QueryClientEvaluationWarning))
        .UseInternalServiceProvider(serviceProvider));
...
services.AddScoped<ISqlServerConnection, ApplicationSqlServerConnection>();
services.AddScoped<ContextService>();
...
public class HomeController
{
    private AppDbContext _DbContext;
    private ContextService _ContextService;

    public HomeController(AppDbContext dbContext, ContextService contextService)
    {
       _DbContext = dbContext;
        _ContextService = contextService;
    }

   public IActionResult Index()
   {
         _ContextService.TenantCode = "0815";
        _DbContext.SomeData.ToList(); // Fire the SqlServerConnection.Open()
   }
}

I'm assuming here, but is it possible that there are actually 2 different scopes being created?
@ajcvickers Does EF create it's own scope when activating the ISqlServerConnection?

@audacity76 You can't resolve EF's internal services like this. They are created in a scope that is managed by the DbContext. Your HomeController is not created in that scope. You really shouldn't try to mix EF's internal services with your application's services like this. That's one of the reasons we recommend strongly against calling UseInternalServiceProvider--as you have seen, even if you try to combine the service providers like this it usually doesn't work in the way you expect. If you really need access to EF's internal services, then the best thing to do is call DbContext.GetService<>().

@ajcvickers How can I replace service ISqlServerConnection if I remove UseInternalServiceProvider()?

@audacity76 Use ReplaceService on the DbContextOptionsBuilder.

@ajcvickers Ok. Now it finds the new implementation but the dependency injection inside the ApplicationSqlServerConnection doesn't work then. Service Provider doesn't find my ContextService. How can I configure this?

This really isn't a DI issue 😄

@audacity76 In 2.0, if you need application services inside of an EF service, then you can use context.GetService for this.

@ajcvickers So, no chance in 1.1?

@audacity76 It is likely possible to do with enough hacking of the internals, but I wouldn't recommend it. This ability was added to 2.0 specifically because it was messy to do it any other way.
Closing this for now because I don't think there is anything actionable here.

@ajcvickers After migrating to 2.1 I started a new attempt on this but still I can't get my scoped ContextService instance. Can you please further explain how/where I have to use context.GetService


[Postman Support]: Clarification headerList: per path ?

Clarification question:
Right now headerList is valid for all requests since it is made for authentication API keys.
Maybe it would be nice to have the option to overwrite in the configuration just some API header for defined endpoints ?

@networkinss Can you confirm is this issue already fixed and Share more information about this issue

It is not an issue but a feature request.
It is not implemented.
API header are valid for all requests.


chore: improve embedded version handling

Use new feature in releasetool (https://github.com/googleapis/releasetool/pull/317) to manage the client version instead of maven tricks introduced in https://github.com/googleapis/java-bigtable/pull/451
This should not be merged until the releasetool feature is released

Jeff is putting together a more general solution in https://github.com/googleapis/release-please/pull/850. Need to wait for that

After https://github.com/googleapis/repo-automation-bots/pull/1629 is merged, you should be able to add:
extraFiles:
  - google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/ClientVersion.java

to .github/release-please.yml and automation should be able to replace the version string.


Optional baseElement relies on arity

Hey @bfred-it,
It seems that you check the presence of baseElement by relying on function arity rather than checking its type (ie. null or undefined). I wonder if there is any reason to do that?
It seems a little odd to me that passing undefined as baseElement actually makes select scoping its selection to... nothing?
Here is an example to illustrate the issue. Let's say I want to abstract select from my consumer:

export const selectCssHook = (hook: CSSHook, baseElement?: Element) => {
  return select(`.${cssHookToClass(hook)}`, baseElement);
};

With the current implementation of select, the above function will fail when no baseElement is passed. I would expect not to. If I want select to work properly with no baseElement, I then need to rewrite it to something like:

export const selectCssHook = (hook: CSSHook, baseElement?: Element) => {
  return baseElement
    ? select(`.${cssHookToClass(hook)}`, baseElement)
    : select(`.${cssHookToClass(hook)}`);
};

Are you open to refactor this? I can open a PR if you want.

https://github.com/bfred-it/select-dom/commit/bd578b975e35d9f802cb43a900a6d3c83095c76a

What do you expect the result of this code to be?
select('.a', select('.b'))

Is it the same as .a .b? Nope. If select-dom doesn't rely on arity and .b isn't found, select would look for .a on document, ignoring the baseElement parameter altogether.

To solve your issue, use ...args to pass the arguments, e.g.
export const selectCssHook = (hook: CSSHook, ...args) => {
  return select(`.${cssHookToClass(hook)}`, ...args);
};

Thanks for the precisions!


Strange behaviour with Pagination + sorting

I've got a large table with 3000 entries that is displayed using pagination
When first filtering on column A, sorting is working well.
If I filter on column B and now on column A again, datas doesn't seem sorted correctly anymore.
Any idea ?

@tonthon, could you please explain more detail?  which column is on sorting? The flow of reproducing is like following:

Sort column A
filter column A
filter column B
filter column A again with other condition???
the problem appear?

sorry I mixed words, it's all about sorting here
1- Sort column A : ok
2- Sort column B : ok
3- Sort column A again : sorting doesn't work anymore.

hi @tonthon, sorry for lately reply, so there's nothing about filtering?

Sorry, I'm also very long in reacting.
There's nothing about filtering (filtering is activated but not involved in the problematic scenario).
But we're using pagination, I dont' know if it may interfere.

If I've got some time, I'll try to extract an example illustrating the problem.

I'll open this issue until the issue can be reproduce there certainly.  thanks you


Doc updates for CnaoDown

Thank you for the review @apinnick , hopefully the content is ship-shape now.
@sradco , when you have a bit of time, please look into the changes and let me know if something looks off, and if not, feel free to merge :-)


try disable "--cuda_ray‘’， I solve this issue with it. I guess that it happened with enable "--cuda_ray‘’ and '--fp16' together，cause CUDA raymarching calculate tensor error, but pytorch is OK.

          try disable "--cuda_ray‘’， I solve this issue with it. I guess that it happened with enable "--cuda_ray‘’ and '--fp16' together，cause CUDA raymarching calculate tensor error, but pytorch is OK.

Originally posted by @lang-dye in https://github.com/ashawkey/stable-dreamfusion/issues/331#issuecomment-1649552604

just disable '--fp16'


RealmSwift build with Realm Core 11.2.0

Goals
Build and test application using RealmSwift SDK with fix for realm-core crash (realm-core v11.2.0)
Could someone provide an indication of when a new RealmSwift SDK is likely to be released with the new realm-core v11.2.0.  This contains a bug fix we need to complete testing.
Just for future reference what is the typical build cycle to incorporated realm-core fixes into the RealmSwift SDK ?
Thanks.
Duncan

Hey @duncangroenewald , the latest version should be released later today: https://github.com/realm/realm-cocoa/pull/7373. Generally speaking, there is a 24-48 hour turnaround for new versions off of core releases (depends on if the core version has breaking changes, of course).

@jsflax - great thanks.


Does not seem to handle the rust-std-wasm32-unknown-emscripten component correctly

active toolchain
----------------

nightly-2018-08-19-x86_64-apple-darwin (default)
rustc 1.30.0-nightly (33b923fd4 2018-08-18)

$ rustup component add rust-std --target wasm32-unknown-emscripten
info: downloading component 'rust-std' for 'wasm32-unknown-emscripten'
 13.1 MiB /  13.1 MiB (100 %)   4.3 MiB/s ETA:   0 s
info: installing component 'rust-std' for 'wasm32-unknown-emscripten'

$ rustup-find --verbose --skip -c rust-std-wasm32-unknown-emscripten
[i] Channel: nightly.
[i] Target: 2018-08-19-x86_64-apple-darwin.
[i] Required components: rust-std-wasm32-unknown-emscripten.
[i] Some components were missing in 2018-08-25; trying previous day...
[i] Some components were missing in 2018-08-24; trying previous day...
[i] Some components were missing in 2018-08-23; trying previous day...
[i] Some components were missing in 2018-08-22; trying previous day...
[i] Some components were missing in 2018-08-21; trying previous day...
[i] Some components were missing in 2018-08-20; trying previous day...
[i] Some components were missing in 2018-08-19; trying previous day...
[i] Some components were missing in 2018-08-18; trying previous day...
[i] Some components were missing in 2018-08-17; trying previous day...
[i] Some components were missing in 2018-08-16; trying previous day...
[i] Some components were missing in 2018-08-15; trying previous day...
[i] Some components were missing in 2018-08-14; trying previous day...
[i] Some components were missing in 2018-08-13; trying previous day...
[i] Some components were missing in 2018-08-12; trying previous day...
[i] Some components were missing in 2018-08-11; trying previous day...
[i] Some components were missing in 2018-08-10; trying previous day...
[i] Some components were missing in 2018-08-09; trying previous day...
[i] Some components were missing in 2018-08-08; trying previous day...
[i] Some components were missing in 2018-08-07; trying previous day...
[i] Some components were missing in 2018-08-06; trying previous day...
[i] Some components were missing in 2018-08-05; trying previous day...
[i] Some components were missing in 2018-08-04; trying previous day...
[i] Some components were missing in 2018-08-03; trying previous day...
[i] Some components were missing in 2018-08-02; trying previous day...
[i] Some components were missing in 2018-08-01; trying previous day...
[i] Some components were missing in 2018-07-31; trying previous day...
[i] Some components were missing in 2018-07-30; trying previous day...
[i] Some components were missing in 2018-07-29; trying previous day...
[i] Some components were missing in 2018-07-28; trying previous day...
[i] Some components were missing in 2018-07-27; trying previous day...
[-] Could not find a match in the last 30 days.

I see you have some special-casing for other WASM components / components with different targets, perhaps they need to be expanded?
https://github.com/6A/rustup-find/blob/b201b3385c2f265d08106b1721ffe696e355d459/src/main.rs#L237

This should be fixed in ac1941f4c77fbcc1841b771841fd321709aace28, thanks for your patience!


Adding Sprint 1 features from teams: lisa, hendrik, tobi

Features from following US are added:
Team Lisa: #25 , #26
Team Hendrik: #13,  #15 ,  #20  , #40
Team Tobi: #24 , #29

Coverage remained the same at 100.0% when pulling 178f512deccafd01ebf3f705241b569fa519147c on dev into ff5a9d075fa79febbf55468b2b7f451f4f6ffb98 on master.

Coverage remained the same at 100.0% when pulling 0bad1323be77ed5bb71022d2ba23b9b746f970ef on dev into ff5a9d075fa79febbf55468b2b7f451f4f6ffb98 on master.

The user stories from Team Tobi are approved by PO

Coverage remained the same at 100.0% when pulling 869cd818d5ac45d7f03b2256f5b8db1bd6980700 on dev into ff5a9d075fa79febbf55468b2b7f451f4f6ffb98 on master.


Integration Test - Release - 2019/06/17 23:07:10

Auto create for integration test. IssueCommandFlow

@PRMergerTest2 : Thanks for your contribution! The author(s) have been notified to review your proposed change.