Skip to content

Cannot read properties of undefined (reading 'new') #53

Description

@vitalii-vov

Hello.
I use this library for Flutter Web.

static Client createRemoteClient(Credentials credentials) {
  var dio = WdDio(debug: true); // Exception
  final client = Client(
    uri: credentials.site,
    c: dio,
    auth: BasicAuth(user: credentials.login, pwd: credentials.password),
  );
  return client;
}

When trying to run this code on the Web in Chrome, I get

Launching lib/main.dart on Chrome in debug mode...
This app is linked to the debug service: ws://127.0.0.1:51580/iWU1AuUZTag=/ws
Debug service listening on ws://127.0.0.1:51580/iWU1AuUZTag=/ws
Connecting to VM Service at ws://127.0.0.1:51580/iWU1AuUZTag=/ws
Connected to the VM Service.
TypeError: Cannot read properties of undefined (reading 'new')
packages/webdav_client/src/adapter/adapter_web.dart 4:35 getAdapter
packages/webdav_client/src/webdav_dio.dart 38:25 new
packages/ble_updater_configurator/api/services/webdav/webdav_update_service_helper.dart 21:15 createRe moteClient 
Exited.

This code works on ios and android.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions