dart-lang / sdk

The Dart SDK, including the VM, dart2js, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
9.99k stars 1.54k forks source link

"org-dartlang-untranslatable-uri" URL crashes compiler #36481

Open Hixie opened 5 years ago

Hixie commented 5 years ago

I tried to run an app and I was missing a dependency in the pubspec.yaml file. The compiler reported some errors (after sending the app to the device, surprisingly) but then crashed with:

Unhandled exception:

FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Acloud_firestore%2Fcloud_firestore.dart; message=StandardFileSystem only supports file:* and data:* URIs)

#0      StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)

#1      asFileUri (package:vm/kernel_front_end.dart:557:37)

<asynchronous suspension>

#2      FrontendCompiler._outputDependenciesDelta (package:vm/frontend_server.dart:388:39)

<asynchronous suspension>

#3      FrontendCompiler.compile (package:vm/frontend_server.dart:362:13)

<asynchronous suspension>

#4      _FlutterFrontendCompiler.compile (package:frontend_server/server.dart:31:22)

<asynchronous suspension>

#5      listenAndCompile.<anonymous closure> (package:vm/frontend_server.dart:723:26)

<asynchronous suspension>

#6      _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)

#7      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)

#8      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)

#9      _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)

#10     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)

#11     _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)

#12     _LineSplitterSink._addLines (dart:convert/line_splitter.dart:150:13)

#13     _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:125:5)

#14     StringConversionSinkMixin.add (dart:convert/string_conversion.dart:163:5)

#15     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)

#16     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)

#17     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)

#18     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)

#19     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:68:11)

#20     _EventSinkWrapper.add (dart:async/stream_transformers.dart:15:11)

#21     _StringAdapterSink.add (dart:convert/string_conversion.dart:236:11)

#22     _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:241:7)

#23     _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:312:20)

#24     _Utf8ConversionSink.add (dart:convert/string_conversion.dart:305:5)

#25     _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)

#26     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:120:24)

#27     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)

#28     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)

#29     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)

#30     _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)

#31     _StreamController._add (dart:async/stream_controller.dart:640:7)

#32     _StreamController.add (dart:async/stream_controller.dart:586:5)

#33     _Socket._onData (dart:io-patch/socket_patch.dart:1774:41)

#34     _RootZone.runUnaryGuarded (dart:async/zone.dart:1314:10)

#35     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:336:11)

#36     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:263:7)

#37     _SyncStreamController._sendData (dart:async/stream_controller.dart:764:19)

#38     _StreamController._add (dart:async/stream_controller.dart:640:7)

#39     _StreamController.add (dart:async/stream_controller.dart:586:5)

#40     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1323:33)

#41     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:844:14)

#42     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)

#43     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)

#44     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)

#45     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)
KboyHub commented 5 years ago

I have the question too. How can I solve the question? the log is : `FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file: and data: URIs)

0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)

1 asFileUri (package:vm/kernel_front_end.dart:589:37)

#2 FrontendCompiler._outputDependenciesDelta (package:vm/frontend_server.dart:391:39) #3 FrontendCompiler.compile (package:vm/frontend_server.dart:365:13) #4 _FlutterFrontendCompiler.compile (package:frontend_server/server.dart:31:22)`
Tahaan commented 5 years ago

Almost exact same for me.

I believe it started after I did an include of a Web package in stead of the Flutter Dart package, specifically for the intl package.

Initializing gradle... Resolving dependencies... Running Gradle task 'assembleDebug'... Unhandled exception: FileSystemException(uri=org-dartlang-untranslatable-uri:dart%3Ahtml; message=StandardFileSystem only supports file: and data: URIs)

0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)

1 asFileUri (package:vm/kernel_front_end.dart:589:37)

#2 FrontendCompiler._outputDependenciesDelta (package:vm/frontend_server.dart:391:39) #3 FrontendCompiler.compile (package:vm/frontend_server.dart:365:13) #4 _FlutterFrontendCompiler.compile (package:frontend_server/server.dart:31:22) #5 starter (package:frontend_server/server.dart:133:27) #6 main (file:///b/s/w/ir/k/src/flutter/frontend_server/bin/starter.dart:8:30) #7 _startIsolate. (dart:isolate-patch/isolate_patch.dart:298:32) #8 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:171:12) Compiler failed on /home/johan3/AndroidStudioProjects/zoozoo_kiosk/lib/main.dart Finished with error: Gradle task assembleDebug failed with exit code 1 EDIT: After running flutter clear the issue is solved.
vphriang1 commented 5 years ago

flutter clean solved my issue too.

esanthosh28 commented 5 years ago

Yeah...! my issue was solved... Thank you guys

jonahwilliams commented 4 years ago

I think this is fixed via https://github.com/dart-lang/sdk/commit/d8462dd015f2dcd4397e0124c82ba1c934d3a569

itsdani121 commented 3 years ago

Error: Could not resolve the package 'flut' in 'package:flut/main.dart'. org-dartlang-untranslatable-uri:package%3Aflut%2Fmain.dart: Error: Not found: 'package:flut/main.dart' i have same issue but not found why? kindly anybody help me about this

DikshaCT27 commented 2 years ago

Resolved this by removing import dart:html from my file which is causing the error. One can trace this by reading the unhandled exception error with the file name with an error message.

saibotma commented 2 years ago

Had the dependency in dev_dependencies instead of dependencies by accident.