Skip to content

Running Flutter Web App in release-mode leads to error #13

Description

@iKK001

In debug mode, my Flutter Web Application successfully connects to my usbDevice.

My USB-device is an ESP32-S3.

And I am on Flutter version 3.24.4 • channel stable • https://github.com/flutter/flutter.git
(Dart 3.5.4 • DevTools 2.37.3)
I tried in Chrome, Edge and Safari Browsers.

I am able to successfully connect my USB-device with usbDevice.requestDevices(...) cmd inside the browser.

However, if I run my Flutter Web Application in release mode, then the usbDevice connection-popup does not show up and an error occurs.

i.e. if I try to run my Flutter Web app with the following cmd (i.e. in release mode), then the usbDevice connection code crashes

flutter run -d chrome --release

Here is my call of the connect method inside Flutter Web:

Future<void> _connectToDevice() async {
    try {
      pairedDevice = await usbDevice
          .requestDevices([DeviceFilter(vendorId: 0x303a, productId: 0x1001)]);
    } catch (e) {
      Utils.showSnackBar(e.toString(), Colors.red);      
      setState(() => _status = 'Error: $e');
    }
  }

And the following error message is shown:

Invalid argument: Instance of 'minified:UK'

What can I do to make my Flutter Web application run in release mode ??

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions