I am running iOS 15.4.1 and VS Code March 2022 (version 1.66)
After upgrading to iOS 15.4.1, which could just be a coincidence, my Flutter app no longer runs in VS Code.
It just produces the error "Error launching application on [name of my phone]".
I have tried "flutter clean", rebooting my iPhone and rebooting my Mac, without success.
Interesting that when I run "flutter run --verbose" from a terminal window, the app launches on my iPhone, but with the following message:
[ ] Error launching application on [name of my iphone].
[ +3 ms] "flutter run" took 71,369ms.
[ +2 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:663:9)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1043:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:196:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:91:3)
<asynchronous suspension>
Any help is appreciated.
Thanks
Related
After update the flutter version the plugin Just_audio has stopped working giving me these exceptions (sometimes the code stop before and return less errors):
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: (-1) unknown error
#0 AudioPlayer._load
package:just_audio/just_audio.dart:850
<asynchronous suspension>
#1 AudioPlayer._setPlatformActive.setPlatform
package:just_audio/just_audio.dart:1435
<asynchronous suspension>
#2 AudioPlayer.load
package:just_audio/just_audio.dart:780
<asynchronous suspension>
#3 AudioPlayer.setAudioSource
package:just_audio/just_audio.dart:755
<asynchronous suspension>
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: MissingPluginException(No implementation found for method load on channel com.ryanheise.just_audio.methods.26d4c1e0-6fef-4ed1-8917-3ea8d6e473e8)
#0 MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:313
<asynchronous suspension>
#1 MethodChannelAudioPlayer.load
package:just_audio_platform_interface/method_channel_just_audio.dart:58
<asynchronous suspension>
#2 AudioPlayer._load
package:just_audio/just_audio.dart:836
<asynchronous suspension>
#3 AudioPlayer.load
package:just_audio/just_audio.dart:780
<asynchronous suspension>
#4 AudioPlayer.setAudioSource
package:just_audio/just_audio.dart:755
<asynchronous suspension>
I have tried to clean the project and recover the plugin's versions of the previous code (that was working before the update)
I have tried in a real iPhone, restarted multiple times the computer, the IDE.
I have updated the plugins to the last version.
Can anyone tell me what can be the problem? I am trying to check for other plugins but if the code that was working before is not working now just with the flutter update...
i am new by Flutter development. I have a problem by build an IOS App.
I have MacBook Air with M1 Chip (Big Sur)
My App works perfectly on Android Simulator, Real Device, Web, iPhone Simualtor, but when I try to build an iOS App, I get the following error:
[ +10 ms] Encountered error while building for device.
[ +2 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:270:7)
<asynchronous suspension>
#2 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1043:27)
<asynchronous suspension>
#3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#4 CommandRunner.runCommand (package:args/command_runner.dart:196:13)
<asynchronous suspension>
#5 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
<asynchronous suspension>
#6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
<asynchronous suspension>
#8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#10 main (package:flutter_tools/executable.dart:91:3)
<asynchronous suspension>
Can anybody help me please?
When I'm trying to document my dart code, I get the following error:
Unhandled exception:
Invalid argument (uri): Unknown package: Instance of '_SimpleUri'
#0 ResourceLoader.resolveResourceUri.<anonymous closure> (package:dartdoc/src/generator/resource_loader.dart:41:11)
<asynchronous suspension>
#1 ResourceLoader.getResourceFile (package:dartdoc/src/generator/resource_loader.dart:31:15)
<asynchronous suspension>
#2 _DefaultTemplatesLoader.loadTemplate (package:dartdoc/src/generator/templates.dart:168:24)
<asynchronous suspension>
#3 Templates._create (package:dartdoc/src/generator/templates.dart:265:25)
<asynchronous suspension>
#4 initHtmlGenerator (package:dartdoc/src/generator/html_generator.dart:22:19)
<asynchronous suspension>
#5 Dartdoc.fromContext (package:dartdoc/dartdoc.dart:149:21)
<asynchronous suspension>
#6 main (file:///b/s/w/ir/cache/builder/src/third_party/dart/third_party/pkg/dartdoc/bin/dartdoc.dart:24:9)
<asynchronous suspension>
When I use the command dart --version, I get this:
Dart SDK version: 2.13.1 (stable) (Fri May 21 12:45:36 2021 +0200) on "linux_x64"
dartdoc --version:
dartdoc version: 0.42.0
Why is this happening? I'm new to dart, so I have no idea how to debug this.
I had no issues at all building my project, I duplicated it to start a new one, still worked then I made some code changes then I randomly can't build it at all. Even the previous project stopped building and I have no idea what the error is. I've tried purging the dart pub cache and everything but it seems this specific error hasn't happened to anyone yet from what I've searched.
Output:
Unhandled exception:
Invalid argument(s): A directory corresponding to fileSystemPath "/Users/chrisl/.pub-cache/hosted/pub.dartlang.org/devtools-0.9.7+1/build" could not be found
#0 createStaticHandler (package:shelf_static/src/static_handler.dart:50:5)
#1 defaultHandler (package:devtools_server/src/external_handlers.dart:40:23)
<asynchronous suspension>
#2 serveDevTools (package:devtools_server/src/server.dart:183:21)
#3 DevTools.start (package:dwds/src/servers/devtools.dart:26:15)
#4 Dwds.start (package:dwds/dwds.dart:132:33)
#5 WebDevServer.start (package:webdev/src/serve/webdev_server.dart:130:25)
#6 ServerManager.start (package:webdev/src/serve/server_manager.dart:23:38)
#7 _startServerManager (package:webdev/src/serve/dev_workflow.dart:103:27)
#8 DevWorkflow.start (package:webdev/src/serve/dev_workflow.dart:196:31)
<asynchronous suspension>
#9 DaemonCommand.run (package:webdev/src/command/daemon_command.dart:108:29)
<asynchronous suspension>
#10 CommandRunner.runCommand (package:args/command_runner.dart:197:27)
#11 _CommandRunner.runCommand (package:webdev/src/webdev_command_runner.dart:38:24)
#12 CommandRunner.run.<anonymous closure> (package:args/command_runner.dart:112:25)
#13 new Future.sync (dart:async/future.dart:223:31)
#14 CommandRunner.run (package:args/command_runner.dart:112:14)
Build Output
I do AngularDart development on Windows 10. I'm getting strange behavior with webdev recently. I have to run webdev like this:
C:\Users\galankus>C:\tools\dart-sdk\bin\pub.bat global run webdev
A tool to develop Dart web projects.
Usage: webdev <command> [arguments]
Global options:
-h, --help Print this usage information.
Available commands:
build Run builders to build a package.
help Display help information for webdev.
serve Run a local web development server and a file system watcher that re-builds on changes.
Run "webdev help <command>" for more information about a command.
If I try to run it directly, the below is what I get. Any ideas on how I can debug/fix this?
C:\Users\galankus>webdev
Crash when formatting: [Encoding] Unable to decode bytes as UTF-8.
RangeError (index): Invalid value: Not in range 0..271500, inclusive: 271792
#0 _StringBase.[] (dart:core/runtime/libstring_patch.dart:233:55)
#1 Source.getTextLine (package:kernel/ast.dart:5772:42)
#2 getSourceLine (package:front_end/src/fasta/messages.dart:27:9)
#3 format (package:front_end/src/fasta/command_line_reporting.dart:80:27)
#4 ProcessedOptions.format (package:front_end/src/base/processed_options.dart:206:32)
#5 ProcessedOptions.report (package:front_end/src/base/processed_options.dart:215:22)
#6 CompilerContext.report (package:front_end/src/fasta/compiler_context.dart:67:13)
#7 Loader.addMessage (package:front_end/src/fasta/loader.dart:258:20)
#8 Loader.addCompileTimeError (package:front_end/src/fasta/loader.dart:207:5)
#9 LibraryBuilder.addCompileTimeError (package:front_end/src/fasta/builder/library_builder.dart:89:12)
#10 SourceLoader.tokenize (package:front_end/src/fasta/source/source_loader.dart:174:17)
<asynchronous suspension>
#11 SourceLoader.buildOutline (package:front_end/src/fasta/source/source_loader.dart:192:26)
<asynchronous suspension>
#12 Loader.buildOutlines (package:front_end/src/fasta/loader.dart:176:13)
<asynchronous suspension>
#13 KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:237:20)
<asynchronous suspension>
#14 IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:232:24)
<asynchronous suspension>
#15 CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:46)
#16 new Future.sync (dart:async/future.dart:222:31)
#17 CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:19)
#18 _rootRun (dart:async/zone.dart:1126:13)
#19 _CustomZone.run (dart:async/zone.dart:1023:19)
#20 _runZoned (dart:async/zone.dart:1518:10)
#21 runZoned (dart:async/zone.dart:1465:12)
#22 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:117:12)
#23 IncrementalCompiler.computeDelta (package:front_end/src/fasta/incremental_compiler.dart:102:20)
<asynchronous suspension>
#24 IncrementalCompiler.compile (package:vm/incremental_compiler.dart:38:44)
<asynchronous suspension>
#25 IncrementalCompilerWrapper.compileInternal (file:///E:/b/build/slave/dart-sdk-windows-dev/build/sdk/pkg/vm/bin/kernel_service.dart:158:28)
<asynchronous suspension>
#26 Compiler.compile.<anonymous closure> (file:///E:/b/build/slave/dart-sdk-windows-dev/build/sdk/pkg/vm/bin/kernel_service.dart:132:39)
#27 new Future.<anonymous closure> (dart:async/future.dart:174:37)
#28 _rootRun (dart:async/zone.dart:1122:38)
#29 _CustomZone.run (dart:async/zone.dart:1023:19)
#30 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#31 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#32 _rootRun (dart:async/zone.dart:1126:13)
#33 _CustomZone.run (dart:async/zone.dart:1023:19)
#34 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949:23)
#35 Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
#36 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#37 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#38 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
Crash when compiling file:///C:/Users/galankus/AppData/Roaming/Pub/Cache/global_packages/webdev/bin/webdev.dart.snapshot,
at character offset 264110:
RangeError (index): Invalid value: Not in range 0..271500, inclusive: 271792
#0 _StringBase.[] (dart:core/runtime/libstring_patch.dart:233:55)
#1 Source.getTextLine (package:kernel/ast.dart:5772:42)
#2 getSourceLine (package:front_end/src/fasta/messages.dart:27:9)
#3 format (package:front_end/src/fasta/command_line_reporting.dart:80:27)
#4 ProcessedOptions.format (package:front_end/src/base/processed_options.dart:206:32)
#5 ProcessedOptions.report (package:front_end/src/base/processed_options.dart:215:22)
#6 CompilerContext.report (package:front_end/src/fasta/compiler_context.dart:67:13)
#7 Loader.addMessage (package:front_end/src/fasta/loader.dart:258:20)
#8 Loader.addCompileTimeError (package:front_end/src/fasta/loader.dart:207:5)
#9 LibraryBuilder.addCompileTimeError (package:front_end/src/fasta/builder/library_builder.dart:89:12)
#10 SourceLoader.tokenize (package:front_end/src/fasta/source/source_loader.dart:174:17)
<asynchronous suspension>
#11 SourceLoader.buildOutline (package:front_end/src/fasta/source/source_loader.dart:192:26)
<asynchronous suspension>
#12 Loader.buildOutlines (package:front_end/src/fasta/loader.dart:176:13)
<asynchronous suspension>
#13 KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:237:20)
<asynchronous suspension>
#14 IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:232:24)
<asynchronous suspension>
#15 CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:46)
#16 new Future.sync (dart:async/future.dart:222:31)
#17 CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:19)
#18 _rootRun (dart:async/zone.dart:1126:13)
#19 _CustomZone.run (dart:async/zone.dart:1023:19)
#20 _runZoned (dart:async/zone.dart:1518:10)
#21 runZoned (dart:async/zone.dart:1465:12)
#22 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:117:12)
#23 IncrementalCompiler.computeDelta (package:front_end/src/fasta/incremental_compiler.dart:102:20)
<asynchronous suspension>
#24 IncrementalCompiler.compile (package:vm/incremental_compiler.dart:38:44)
<asynchronous suspension>
#25 IncrementalCompilerWrapper.compileInternal (file:///E:/b/build/slave/dart-sdk-windows-dev/build/sdk/pkg/vm/bin/kernel_service.dart:158:28)
<asynchronous suspension>
#26 Compiler.compile.<anonymous closure> (file:///E:/b/build/slave/dart-sdk-windows-dev/build/sdk/pkg/vm/bin/kernel_service.dart:132:39)
#27 new Future.<anonymous closure> (dart:async/future.dart:174:37)
#28 _rootRun (dart:async/zone.dart:1122:38)
#29 _CustomZone.run (dart:async/zone.dart:1023:19)
#30 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#31 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#32 _rootRun (dart:async/zone.dart:1126:13)
#33 _CustomZone.run (dart:async/zone.dart:1023:19)
#34 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949:23)
#35 Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
#36 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#37 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#38 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
#0 _StringBase.[] (dart:core/runtime/libstring_patch.dart:233:55)
#1 Source.getTextLine (package:kernel/ast.dart:5772:42)
#2 getSourceLine (package:front_end/src/fasta/messages.dart:27:9)
#3 format (package:front_end/src/fasta/command_line_reporting.dart:80:27)
#4 ProcessedOptions.format (package:front_end/src/base/processed_options.dart:206:32)
#5 ProcessedOptions.report (package:front_end/src/base/processed_options.dart:215:22)
#6 CompilerContext.report (package:front_end/src/fasta/compiler_context.dart:67:13)
#7 Loader.addMessage (package:front_end/src/fasta/loader.dart:258:20)
#8 Loader.addCompileTimeError (package:front_end/src/fasta/loader.dart:207:5)
#9 LibraryBuilder.addCompileTimeError (package:front_end/src/fasta/builder/library_builder.dart:89:12)
#10 SourceLoader.tokenize (package:front_end/src/fasta/source/source_loader.dart:174:17)
<asynchronous suspension>
#11 SourceLoader.buildOutline (package:front_end/src/fasta/source/source_loader.dart:192:26)
<asynchronous suspension>
#12 Loader.buildOutlines (package:front_end/src/fasta/loader.dart:176:13)
<asynchronous suspension>
#13 KernelTarget.buildOutlines (package:front_end/src/fasta/kernel/kernel_target.dart:237:20)
<asynchronous suspension>
#14 IncrementalCompiler.computeDelta.<anonymous closure> (package:front_end/src/fasta/incremental_compiler.dart:232:24)
<asynchronous suspension>
#15 CompilerContext.runInContext.<anonymous closure>.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:46)
#16 new Future.sync (dart:async/future.dart:222:31)
#17 CompilerContext.runInContext.<anonymous closure> (package:front_end/src/fasta/compiler_context.dart:118:19)
#18 _rootRun (dart:async/zone.dart:1126:13)
#19 _CustomZone.run (dart:async/zone.dart:1023:19)
#20 _runZoned (dart:async/zone.dart:1518:10)
#21 runZoned (dart:async/zone.dart:1465:12)
#22 CompilerContext.runInContext (package:front_end/src/fasta/compiler_context.dart:117:12)
#23 IncrementalCompiler.computeDelta (package:front_end/src/fasta/incremental_compiler.dart:102:20)
<asynchronous suspension>
#24 IncrementalCompiler.compile (package:vm/incremental_compiler.dart:38:44)
<asynchronous suspension>
#25 IncrementalCompilerWrapper.compileInternal (file:///E:/b/build/slave/dart-sdk-windows-dev/build/sdk/pkg/vm/bin/kernel_service.dart:158:28)
<asynchronous suspension>
#26 Compiler.compile.<anonymous closure> (file:///E:/b/build/slave/dart-sdk-windows-dev/build/sdk/pkg/vm/bin/kernel_service.dart:132:39)
#27 new Future.<anonymous closure> (dart:async/future.dart:174:37)
#28 _rootRun (dart:async/zone.dart:1122:38)
#29 _CustomZone.run (dart:async/zone.dart:1023:19)
#30 _CustomZone.runGuarded (dart:async/zone.dart:925:7)
#31 _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:965:23)
#32 _rootRun (dart:async/zone.dart:1126:13)
#33 _CustomZone.run (dart:async/zone.dart:1023:19)
#34 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949:23)
#35 Timer._createTimer.<anonymous closure> (dart:async/runtime/libtimer_patch.dart:21:15)
#36 _Timer._runTimers (dart:isolate/runtime/libtimer_impl.dart:382:19)
#37 _Timer._handleMessage (dart:isolate/runtime/libtimer_impl.dart:416:5)
#38 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:165:12)
Edit: the below did not change anything, I still get the error above.
C:\Users\galankus>pub global activate webdev
Package webdev is currently active at version 0.2.3.
Resolving dependencies...
+ args 1.4.3
+ charcode 1.1.1
+ collection 1.14.10
+ io 0.3.2+1
+ meta 1.1.5
+ path 1.6.1
+ pub_semver 1.4.1
+ source_span 1.4.0
+ stack_trace 1.9.2
+ string_scanner 1.0.2
+ webdev 0.2.3
+ yaml 2.1.14
Precompiling executables...
Precompiled webdev:bin\webdev.
Installed executable webdev.
Activated webdev 0.2.3.
This was a bug in recent Dart versions that was fixed already.
Updating Dart and the global activated webdev package should fix it
To update a globally activated package, just activate it again:
pub global activate webdev
Use this Command to activate WebDev
dart pub global activate webdev