Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] runtime error on web - unsupported operation, Platform._operatingSystem #89

Closed
stonymahony opened this issue Apr 20, 2023 · 1 comment · Fixed by #91
Closed

[Bug] runtime error on web - unsupported operation, Platform._operatingSystem #89

stonymahony opened this issue Apr 20, 2023 · 1 comment · Fixed by #91

Comments

@stonymahony
Copy link

stonymahony commented Apr 20, 2023

Bug Description

I get an Unsupported operation: Platform._operatingSystem error for web with Flutter 3.7.12 and appflowy_editor 1.6, 1.8 and also 1.9.

Thrown exception:
Unsupported operation: Platform._operatingSystem

Stack trace:
http://localhost:8080/C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart
266:49      throw_
http://localhost:8080/C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/patch/io_patch.dart
244:5                   _operatingSystem
http://localhost:8080/C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/io/platform_impl.dart
56:40                                          get operatingSystem
http://localhost:8080/C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/io/platform.dart
64:45                                               get _operatingSystem
http://localhost:8080/C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart
872:8   get
http://localhost:8080/C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/io/platform.dart
149:51                                              get isAndroid
http://localhost:8080/C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart
872:8   get
http://localhost:8080/packages/appflowy_editor/src/render/style/editor_style.dart 194:33
get light
http://localhost:8080/C:/b/s/w/ir/cache/builder/src/out/host_debug/dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart
872:8   get
http://localhost:8080/packages/appflowy_editor/src/render/style/editor_style.dart 6:19
get lightEditorStyleExtension
http://localhost:8080/packages/appflowy_editor/src/service/editor_service.dart 44:16
<fn>
http://localhost:8080/packages/appflowy_editor/src/service/editor_service.dart 45:16
new

How to Reproduce

Run the example from your repo under /example.

Expected Behavior

No runtime error.

Operating System

Windows 10

AppFlowy Editor Version(s)

1.6, 1.8, 1.9

Screenshots

No response

Additional Context

No response

Xazin added a commit to Xazin/appflowy-editor that referenced this issue Apr 22, 2023
@Xazin
Copy link
Collaborator

Xazin commented Apr 22, 2023

Good catch, this was my bad.

LucasXu0 added a commit that referenced this issue Apr 24, 2023
* fix: remove platform check in theme on web

Closes: #89

* Update shortcut_event.dart

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants