Skip to content

bug: logto_dart_sdk with flutter WASM which currently makes logto unusable due to flutter_secure_storage_web conflict #81

Description

@drewid

Describe the bug

Getting a major problem with adding and using logto_dart_sdk with flutter WASM which currently makes logto unusable

Adding just logto_dart_sdk: ^3.0.0 to pubspec.yaml gives the following error when building:

Target dart2wasm failed: ProcessException: Process exited abnormally with exit code 254: ../../../../../AppData/Local/Pub/Cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/lib/flutter_secure_storage_web.dart:5:8: Error: Dart library 'dart:html' is not available on this platform.

To resolve this issue, flutter_secure_storage_web requires v2.0 or higher due to the conversion from dart:html to package:web

But adding flutter_secure_storage_web: ^2.0.0-beta.2 gives a weird dependency issue.

Because flutter_secure_storage >=6.1.0 <9.1.0 depends on flutter_secure_storage_web ^1.1.1 and flutter_secure_storage >=9.1.0 <9.1.1 depends on flutter_secure_storage_web ^1.2.0, flutter_secure_storage >=6.1.0 <9.1.1 requires flutter_secure_storage_web ^1.1.1.

logto_dart_sdk is asking for a version ^1.1.1 but flutter_secure_storage_web requires v2.0 or higher due to the conversion from dart:html to package:web

Expected behavior

I expect to be able to build and run when choosing wasm build option

How to reproduce?

Just create a minimal flutter app following the instructions for wasm and logto-io

Context

  • Logto Cloud (but never got that far)
  • Self-hosted, Logto version =
    • Container (Docker image)
    • Raw Node.js

Screenshots

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions