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

FilePickerWeb breaks Android app and is the only thing that works for web #1572

Closed
2 tasks
rickyManalo opened this issue Aug 8, 2024 · 2 comments
Closed
2 tasks
Labels
new issue An issue that hasn't yet been seen from the maintainer

Comments

@rickyManalo
Copy link

Before creating an issue, make sure that you are on the latest file_picker version and that there aren't already any similar opened inssues. Also, check if it isn't described on the Wiki, specially on Troubleshooting page.

Also, sometimes a simple flutter clean and flutter build again with latest file_picker version, may end up by fixing cached issues, so I encourage you to first do so.

Describe the bug
I'm currently trying to implement an image picker for my app. I was already able to make file_picker work for Android, but it doesn't work for web. I found out about FilePickerWeb and it does seems to work on web, but it also seem like it causes issues for Android.

If I use just FilePicker for web, I would get this error: Uncaught LateInitializationError: Field '_instance' has not been initialized.

If I use FilePickerWeb for web, I would get tons of error when building the app. .I added them below

Platform

  • [ x] Android
  • iOS
  • [ x] Web
  • Desktop

Platform OS version
What version did it happen? ^8.0.7

How are you picking?
List targetImgExtensionArr = ['jpg', 'jpeg', 'png', 'webp', 'gif', 'bmp'];
if(kIsWeb){
result = await FilePickerWeb.platform.pickFiles(
type: FileType.custom,
allowMultiple: false,
allowedExtensions: targetImgExtensionArr,
);
}else if(Platform.isAndroid || Platform.isIOS){
result = await FilePicker.platform.pickFiles(
type: FileType.custom,
allowMultiple: false,
allowedExtensions: targetImgExtensionArr,
);
}

Details to reproduce the issue
Provide all the details to reproduce the issue.

Error Log

/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_cascade.dart:36:40: Error: Type 'JSObject' not found.
extension type CSSLayerStatementRule._(JSObject )
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_cascade.dart:37:25: Error: Type 'JSObject' not found.
implements CSSRule, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_cascade.dart:38:20: Error: Type 'JSString' not found.
external JSArray get nameList;
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_cascade.dart:38:12: Error: Type 'JSArray' not found.
external JSArray get nameList;
^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_cascade.dart:22:33: Error: The type 'JSObject' can't be implemented by an extension type.
implements CSSGroupingRule, JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_cascade.dart:37:25: Error: The type 'JSObject' can't be implemented by an extension type.
implements CSSRule, JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_cascade.dart:11:2: Error: Couldn't find constructor 'JS'.
@js()
^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_cascade.dart:21:36: Error: 'JSObject' isn't a type.
extension type CSSLayerBlockRule.
(JSObject )
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_cascade.dart:36:40: Error: 'JSObject' isn't a type.
extension type CSSLayerStatementRule.
(JSObject )
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations_2.dart:14:8: Error: Dart library 'dart:js_interop' is not available on this platform.
import 'dart:js_interop';
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations_2.dart:20:31: Error: Type 'JSObject' not found.
extension type CSSAnimation.
(JSObject ) implements Animation, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations_2.dart:20:65: Error: Type 'JSObject' not found.
extension type CSSAnimation.
(JSObject ) implements Animation, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations_2.dart:20:65: Error: The type 'JSObject' can't be implemented by an extension type.
extension type CSSAnimation.
(JSObject ) implements Animation, JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations_2.dart:11:2: Error: Couldn't find constructor 'JS'.
@js()
^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations_2.dart:20:31: Error: 'JSObject' isn't a type.
extension type CSSAnimation.
(JSObject ) implements Animation, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:14:8: Error: Dart library 'dart:js_interop' is not available on this platform.
import 'dart:js_interop';
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:22:33: Error: Type 'JSObject' not found.
extension type AnimationEvent.
(JSObject ) implements Event, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:22:63: Error: Type 'JSObject' not found.
extension type AnimationEvent.
(JSObject ) implements Event, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:32:37: Error: Type 'JSObject' not found.
extension type AnimationEventInit.
(JSObject ) implements EventInit, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:32:71: Error: Type 'JSObject' not found.
extension type AnimationEventInit.
(JSObject ) implements EventInit, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:51:34: Error: Type 'JSObject' not found.
extension type CSSKeyframeRule.
(JSObject ) implements CSSRule, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:51:66: Error: Type 'JSObject' not found.
extension type CSSKeyframeRule.
(JSObject ) implements CSSRule, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:61:35: Error: Type 'JSObject' not found.
extension type CSSKeyframesRule.
(JSObject ) implements CSSRule, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:61:67: Error: Type 'JSObject' not found.
extension type CSSKeyframesRule.
(JSObject ) implements CSSRule, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:22:63: Error: The type 'JSObject' can't be implemented by an extension type.
extension type AnimationEvent.
(JSObject ) implements Event, JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:32:71: Error: The type 'JSObject' can't be implemented by an extension type.
extension type AnimationEventInit.
(JSObject ) implements EventInit, JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:51:66: Error: The type 'JSObject' can't be implemented by an extension type.
extension type CSSKeyframeRule.
(JSObject ) implements CSSRule, JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:61:67: Error: The type 'JSObject' can't be implemented by an extension type.
extension type CSSKeyframesRule.
(JSObject ) implements CSSRule, JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:11:2: Error: Couldn't find constructor 'JS'.
@js()
^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:22:33: Error: 'JSObject' isn't a type.
extension type AnimationEvent.
(JSObject ) implements Event, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:32:37: Error: 'JSObject' isn't a type.
extension type AnimationEventInit.
(JSObject ) implements EventInit, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:51:34: Error: 'JSObject' isn't a type.
extension type CSSKeyframeRule.
(JSObject ) implements CSSRule, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/css_animations.dart:61:35: Error: 'JSObject' isn't a type.
extension type CSSKeyframesRule.
(JSObject ) implements CSSRule, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:14:8: Error: Dart library 'dart:js_interop' is not available on this platform.
import 'dart:js_interop';
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:33:41: Error: Type 'JSObject' not found.
extension type CSPViolationReportBody.
(JSObject )
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:34:28: Error: Type 'JSObject' not found.
implements ReportBody, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:35:12: Error: Type 'JSObject' not found.
external JSObject toJSON();
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:52:47: Error: Type 'JSObject' not found.
extension type SecurityPolicyViolationEvent.
(JSObject )
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:53:23: Error: Type 'JSObject' not found.
implements Event, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:72:51: Error: Type 'JSObject' not found.
extension type SecurityPolicyViolationEventInit.
(JSObject )
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:73:27: Error: Type 'JSObject' not found.
implements EventInit, JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:34:28: Error: The type 'JSObject' can't be implemented by an extension type.
implements ReportBody, JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:53:23: Error: The type 'JSObject' can't be implemented by an extension type.
implements Event, JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:73:27: Error: The type 'JSObject' can't be implemented by an extension type.
implements EventInit, JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:11:2: Error: Couldn't find constructor 'JS'.
@js()
^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:33:41: Error: 'JSObject' isn't a type.
extension type CSPViolationReportBody.
(JSObject )
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:52:47: Error: 'JSObject' isn't a type.
extension type SecurityPolicyViolationEvent.
(JSObject )
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/csp.dart:72:51: Error: 'JSObject' isn't a type.
extension type SecurityPolicyViolationEventInit.
(JSObject )
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:14:8: Error: Dart library 'dart:js_interop' is not available on this platform.
import 'dart:js_interop';
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:43:27: Error: Type 'JSObject' not found.
extension type $Console.
(JSObject ) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:43:50: Error: Type 'JSObject' not found.
extension type $Console.
(JSObject ) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:46:5: Error: Type 'JSAny' not found.
JSAny? data, [
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:50:23: Error: Type 'JSAny' not found.
external void debug(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:51:23: Error: Type 'JSAny' not found.
external void error(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:52:22: Error: Type 'JSAny' not found.
external void info(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:53:21: Error: Type 'JSAny' not found.
external void log(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:55:5: Error: Type 'JSAny' not found.
JSAny? tabularData,
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:56:13: Error: Type 'JSString' not found.
JSArray properties,
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:56:5: Error: Type 'JSArray' not found.
JSArray properties,
^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:58:23: Error: Type 'JSAny' not found.
external void trace(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:59:22: Error: Type 'JSAny' not found.
external void warn(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:61:5: Error: Type 'JSAny' not found.
JSAny? item,
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:62:5: Error: Type 'JSObject' not found.
JSObject? options,
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:64:24: Error: Type 'JSAny' not found.
external void dirxml(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:67:23: Error: Type 'JSAny' not found.
external void group(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:68:32: Error: Type 'JSAny' not found.
external void groupCollapsed(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:72:5: Error: Type 'JSAny' not found.
JSAny? data, [
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:43:50: Error: The type 'JSObject' can't be implemented by an extension type.
extension type $Console.
(JSObject ) implements JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:11:2: Error: Couldn't find constructor 'JS'.
@js()
^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:16:2: Error: Couldn't find constructor 'JS'.
@js()
^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:42:2: Error: Couldn't find constructor 'JS'.
@js('console')
^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:44:4: Error: Couldn't find constructor 'JS'.
@js('assert')
^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:43:27: Error: 'JSObject' isn't a type.
extension type $Console.
(JSObject ) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:46:5: Error: 'JSAny' isn't a type.
JSAny? data, [
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:50:23: Error: 'JSAny' isn't a type.
external void debug(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:51:23: Error: 'JSAny' isn't a type.
external void error(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:52:22: Error: 'JSAny' isn't a type.
external void info(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:53:21: Error: 'JSAny' isn't a type.
external void log(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:55:5: Error: 'JSAny' isn't a type.
JSAny? tabularData,
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:56:13: Error: 'JSString' isn't a type.
JSArray properties,
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:56:5: Error: 'JSArray' isn't a type.
JSArray properties,
^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:58:23: Error: 'JSAny' isn't a type.
external void trace(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:59:22: Error: 'JSAny' isn't a type.
external void warn(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:61:5: Error: 'JSAny' isn't a type.
JSAny? item,
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:62:5: Error: 'JSObject' isn't a type.
JSObject? options,
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:64:24: Error: 'JSAny' isn't a type.
external void dirxml(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:67:23: Error: 'JSAny' isn't a type.
external void group(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:68:32: Error: 'JSAny' isn't a type.
external void groupCollapsed(JSAny? data);
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/console.dart:72:5: Error: 'JSAny' isn't a type.
JSAny? data, [
^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/compression.dart:14:8: Error: Dart library 'dart:js_interop' is not available on this platform.
import 'dart:js_interop';
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/compression.dart:22:36: Error: Type 'JSObject' not found.
extension type CompressionStream.
(JSObject ) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/compression.dart:22:59: Error: Type 'JSObject' not found.
extension type CompressionStream.
(JSObject ) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/compression.dart:31:38: Error: Type 'JSObject' not found.
extension type DecompressionStream.
(JSObject ) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/compression.dart:31:61: Error: Type 'JSObject' not found.
extension type DecompressionStream.
(JSObject ) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/compression.dart:22:59: Error: The type 'JSObject' can't be implemented by an extension type.
extension type CompressionStream.
(JSObject ) implements JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/compression.dart:31:61: Error: The type 'JSObject' can't be implemented by an extension type.
extension type DecompressionStream.
(JSObject ) implements JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/compression.dart:11:2: Error: Couldn't find constructor 'JS'.
@js()
^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/compression.dart:22:36: Error: 'JSObject' isn't a type.
extension type CompressionStream.
(JSObject ) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/compression.dart:31:38: Error: 'JSObject' isn't a type.
extension type DecompressionStream.
(JSObject ) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/angle_instanced_arrays.dart:14:8: Error: Dart library 'dart:js_interop' is not available on this platform.
import 'dart:js_interop';
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/angle_instanced_arrays.dart:38:41: Error: Type 'JSObject' not found.
extension type ANGLE_instanced_arrays.
(JSObject ) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/angle_instanced_arrays.dart:38:64: Error: Type 'JSObject' not found.
extension type ANGLE_instanced_arrays.
(JSObject ) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/angle_instanced_arrays.dart:38:64: Error: The type 'JSObject' can't be implemented by an extension type.
extension type ANGLE_instanced_arrays.
(JSObject ) implements JSObject {
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/angle_instanced_arrays.dart:11:2: Error: Couldn't find constructor 'JS'.
@js()
^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/dom/angle_instanced_arrays.dart:38:41: Error: 'JSObject' isn't a type.
extension type ANGLE_instanced_arrays.
(JSObject _) implements JSObject {
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/helpers/events/providers.dart:5:8: Error: Dart library 'dart:js_interop' is not available on this platform.
import 'dart:js_interop';
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/helpers/events/providers.dart:6:8: Error: Dart library 'dart:js_interop_unsafe' is not available on this platform.
import 'dart:js_interop_unsafe';
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/helpers/events/providers.dart:615:25: Error: 'JSObject' isn't a type.
final jsObject = e as JSObject;
^^^^^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/helpers/events/providers.dart:618:47: Error: The getter 'toJS' isn't defined for the class 'String'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'toJS'.
} else if (jsObject.hasProperty('mozHidden'.toJS).toDart) {
^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/helpers/events/providers.dart:620:46: Error: The getter 'toJS' isn't defined for the class 'String'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'toJS'.
} else if (jsObject.hasProperty('msHidden'.toJS).toDart) {
^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/helpers/events/providers.dart:622:50: Error: The getter 'toJS' isn't defined for the class 'String'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'toJS'.
} else if (jsObject.hasProperty('webkitHidden'.toJS).toDart) {
^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/helpers/extensions.dart:24:8: Error: Dart library 'dart:js_interop' is not available on this platform.
import 'dart:js_interop';
^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/helpers/extensions.dart:35:69: Error: The getter 'toJS' isn't defined for the class 'num'.
Try correcting the name to the name of an existing getter, or defining a getter or field named 'toJS'.
(quality == null) ? toDataURL(type) : toDataURL(type, quality.toJS);
^^^^
/C:/Users/DTC01/AppData/Local/Pub/Cache/hosted/pub.dev/web-0.5.1/lib/src/helpers/extensions.dart:51:7: Error: The method 'jsify' isn't defined for the class 'Map<String, bool>'.

  • 'Map' is from 'dart:core'.
    Try correcting the name to the name of an existing method, or defining a method named 'jsify'.
    }.jsify();
    ^^^^^
    Unhandled exception:
    FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ajs_interop; message=StandardFileSystem only supports file:* and data:* URIs)
    #0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:34)
    WIP clouding support; #1 asFileUri (package:vm/kernel_front_end.dart:752)
    adds support for retrieving file paths from gallery and camera due to… #2 writeDepfile (package:vm/kernel_front_end.dart:892)
#3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:680) #4 starter (package:frontend_server/starter.dart:101) #5 main (file:///C:/b/s/w/ir/x/w/sdk/pkg/frontend_server/bin/frontend_server_starter.dart:13)

Target kernel_snapshot failed: Exception

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'D:\DevFiles\tools\flutter_windows_3.22.2-stable\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 23s
Error: Gradle task assembleDebug failed with exit code 1

Screenshots and/or video
If applicable, add screenshots or video to help explain your problem.

Flutter Version details
3.22.2

@rickyManalo rickyManalo added the new issue An issue that hasn't yet been seen from the maintainer label Aug 8, 2024
@rickyManalo
Copy link
Author

After some testing, if I run the app on Chrome through Android Studio, everything works fine. But if I use the built web page on Opera GX and Chrome, I'd get an error that are also different for each browser. For OperaGX, I'd get a "LateInitializationError: Field '_instance' has not been initialized." error. For Chrome, I'd get a "Uncaught [minifiied variables]" error.

@rickyManalo
Copy link
Author

It seems like I was missing some dependencies in my server that's why file picker wasn't working correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new issue An issue that hasn't yet been seen from the maintainer
Projects
None yet
Development

No branches or pull requests

1 participant