MixinNetwork / MixinNetwork/flutter-plugins

[Web] offset != null

Open
#103 8 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

desktop_drop need-more-information
Dominant language
C
Stars
512
Forks
292
Avg merge
15h 8m
Merged PRs (30d)
7

Description

Flutter Web:
If you put a file on the drag zone, an error occurs as shown below.

Error

_handleMethodChannel: Assertion failed: file:///Users/patrick386/.pub-cache/hosted/pub.dartlang.org/desktop_drop-0.3.3/lib/src/channel.dart:96:16
_offset != null
is not true dart-sdk/lib/internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49 throw
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 29:3 assertFailed
packages/desktop_drop/src/channel.dart 96:24 _handleMethodChannel
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5 _async
packages/desktop_drop/src/channel.dart 40:36 [_handleMethodChannel]
packages/desktop_drop/src/channel.dart 33:22
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5 _async
packages/desktop_drop/src/channel.dart 31:36
packages/flutter/src/services/platform_channel.dart 404:55 _handleAsMethodCall
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5 _async
packages/flutter/src/services/platform_channel.dart 401:40 [_handleAsMethodCall]
packages/flutter/src/services/platform_channel.dart 397:34
packages/flutter/src/services/binding.dart 380:35
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5 _async
packages/flutter/src/services/binding.dart 377:98
lib/_engine/engine/platform_dispatcher.dart 1121:13 invoke2
lib/ui/channel_buffers.dart 25:12 invoke
lib/ui/channel_buffers.dart 65:7 push
lib/ui/channel_buffers.dart 130:16 push
packages/flutter_web_plugins/src/plugin_registry.dart 144:23 send
packages/flutter/src/services/platform_channel.dart 157:52 _invokeMethod
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5 _async
packages/flutter/src/services/platform_channel.dart 155:30 [_invokeMethod]
packages/flutter/src/services/platform_channel.dart 340:12 invokeMethod
packages/desktop_drop/desktop_drop_web.dart 55:17
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 334:14 _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 339:39 dcall
dart-sdk/lib/html/dart2js/html_dart2js.dart 37285:58

Flutter doctor -v

[✓] Flutter (Channel stable, 3.0.0, on macOS 12.4 21F79 darwin-arm, locale ko-KR)
• Flutter version 3.0.0 at /Users/patrick386/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ee4e09cce0 (2 weeks ago), 2022-05-09 16:45:18 -0700
• Engine revision d1b9a6938a
• Dart version 2.17.0
• DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at /Users/patrick386/Library/Android/sdk
• Platform android-32, build-tools 32.1.0-rc1
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.3

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)

[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 101.0.4951.64

[✓] HTTP Host Availability
• All required HTTP hosts are available

• No issues found!

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/src/channel.dart at the reported assertion on line 96 and the web entry point in desktop_drop_web.dart around line 55. Reproduce the drag-and-drop case in Flutter Web using the issue's environment details, then verify that dropping a file no longer triggers the _offset assertion.

Written by the indexing model from the issue text.

Assessment

Tech stack
flutter
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.