I have followed the directions here for mapbox, and can successfully build the package locally. I have previously been able to build my app with older versions of mapbox, but this new version breaks it.
I have post-clone script below to add the .netrc file to the build computer and then run the flutter build command. It makes it to the flutter build line, and then fails on pod install. The error message doesn't indicate what URL returns 403. This is the code output from running with --verbose.
I have entered the mapbox_key into the App Center environment variables for the build and verified it is being set properly with the echo command.
Has anyone experienced this problem before and know how to fix it?
error message
Cloning into '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20220201-5726-105j6ub'...
Cloning into '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20220201-5726-cc9t4i'...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 66 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (22) The requested URL returned error: 403
[ +14 ms] "flutter ios" took 426,650ms.
[ +7 ms] Error running pod install
[ ]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 CocoaPods._runPodInstall (package:flutter_tools/src/macos/cocoapods.dart:340:7)
<asynchronous suspension>
#2 CocoaPods.processPods (package:flutter_tools/src/macos/cocoapods.dart:168:7)
<asynchronous suspension>
#3 processPodsIfNeeded (package:flutter_tools/src/macos/cocoapod_utils.dart:44:30)
<asynchronous suspension>
#4 buildXcodeProject (package:flutter_tools/src/ios/mac.dart:203:3)
<asynchronous suspension>
#5 _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:264:37)
<asynchronous suspension>
#6 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27)
<asynchronous suspension>
#7 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#8 CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#9 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9)
<asynchronous suspension>
#10 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#11 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5)
<asynchronous suspension>
#12 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
<asynchronous suspension>
#13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14 main (package:flutter_tools/executable.dart:92:3)
<asynchronous suspension>
[ +3 ms] ensureAnalyticsSent: 1ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hooks complete
[ ] exiting with code 1
##[error]The process '/bin/bash' failed with exit code 1
##[error]Bash failed with error: The process '/bin/bash' failed with exit code 1
##[section]Finishing: Post Clone Script
##[section]Starting: Xcode build (signed)
post-clone script
#!/usr/bin/env bash
set -e
set -x
cd ~
echo "machine api.mapbox.com
login mapbox
password $mapbox_key" > .netrc
chmod 0600 .netrc
cat .netrc
cd ./work/1/s/rider_app
git clone https://github.com/flutter/flutter.git -b 2.5.3 --depth 1
export PATH="$PATH:`pwd`/flutter/bin"
flutter doctor
flutter clean
echo "Installed flutter in `pwd`/flutter"
flutter build ios --verbose --release --no-codesign --no-sound-null-safety --dart-define=TRC_API_URL=$TRC_API_URL --dart-define=TRC_RIDER_GRPC_API_URL=$TRC_RIDER_GRPC_API_URL
I needed to select at least all of these token scopes in order to fix this issue. I am not sure which additional scope fixed the problem. I only had DOWNLOADS:READ selected originally.
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 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
I have two iOS devices, iPhone 8 and iPhone 12 mini, both runs iOS 14.4.
Flutter debug works normally on iPhone 8, but it won't launch app on iPhone 12 mini. It will hang on launch screen and then just exit.
Running "flutter pub get" in myproject...
Launching lib/main.dart on XX iPhone in debug mode...
lib/main.dart:1
Automatically signing iOS for device deployment using specified development team in Xcode project: XYXYXYXYX
Xcode build done. 117,9s
Error launching application on XX iPhone.
Exited (sigterm)
I can start debugging from XCode on both devices, but even after successfull start from XCode, debug won't work from flutter next time when I run flutter run on iPhone 12 mini.
Runnin flutter run --release also works OK.
This is what I get at the end when I run flutter run --verbose
...
...
Application launched on the device. Waiting for observatory port.
[+30020 ms] Installing and launching... (completed in 61,6s)
[ +1 ms] Error launching application on Sheriff iPhone.
[ +5 ms] "flutter run" took 372.990ms.
[ +7 ms]
#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:617:7)
<asynchronous suspension>
#2 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1080:12)
<asynchronous suspension>
#3 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:931:27)
<asynchronous suspension>
#4 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#5 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#6 CommandRunner.runCommand (package:args/command_runner.dart:197:13)
<asynchronous suspension>
#7 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
<asynchronous suspension>
#8 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#9 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#10 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:230:5)
<asynchronous suspension>
#11 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:63:9)
<asynchronous suspension>
#12 run.<anonymous closure> (package:flutter_tools/runner.dart:61:12)
<asynchronous suspension>
#13 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#14 AppContext.run (package:flutter_tools/src/base/context.dart:149:12)
<asynchronous suspension>
#15 runInContext (package:flutter_tools/src/context_runner.dart:70:10)
<asynchronous suspension>
#16 main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>
[ +85 ms] (lldb) process detach
[ +228 ms] ensureAnalyticsSent: 230ms
[ +1 ms] Running shutdown hooks
[ ] Shutdown hook priority 4
[ +56 ms] Shutdown hooks complete
[ ] exiting with code 1
flutter doctor
# flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 1.24.0-10.2.pre, on macOS 11.2.2 20D80 darwin-x64, locale sr-Latn-RS)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
[✓] Android Studio (version 4.1)
[✓] VS Code (version 1.52.1)
[✓] Connected device (1 available)
• No issues found!
Local network connection is allowed for the app on iPhone 12 mini.
I have tried all kinds of flutter clean, pod install, deleting DeriverdData, restarting iOS device etc. but it didn't work.
What am I missing here?
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'm following the Getting Started with Flutter guide and getting stuck when running the actual flutter command:
flutter init -o my_app
Resolving dependencies...
Error on line 17, column 16 of pubspec.yaml: Invalid version constraint: Could not parse version "^1.4.0". Unknown text at "^1.4.0".
stack_trace: ^1.4.0
^^^^^^
Unhandled exception:
Uncaught Error: FileSystemException: Cannot open file, path = '/Users/craig/Code/flutter/packages/flutter_tools/packages/sky_tools/executable.dart' (OS Error: No such file or directory, errno = 2)
Stack Trace:
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:349)
#1 _RootZone.runUnary (dart:async/zone.dart:1151)
#2 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:496)
#3 _Future._propagateToListeners (dart:async/future_impl.dart:579)
#4 _Future._completeWithValue (dart:async/future_impl.dart:339)
#5 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:401)
#6 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#7 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#8 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
Unhandled exception:
Uncaught Error: FileSystemException: Cannot open file, path = '/Users/craig/Code/flutter/bin/cache/flutter_tools.snapshot' (OS Error: No such file or directory, errno = 2)
Stack Trace:
#0 _File.open.<anonymous closure> (dart:io/file_impl.dart:349)
#1 _RootZone.runUnary (dart:async/zone.dart:1151)
#2 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:496)
#3 _Future._propagateToListeners (dart:async/future_impl.dart:579)
#4 _Future._completeWithValue (dart:async/future_impl.dart:339)
#5 _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:401)
#6 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#7 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#8 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#9 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
#0 _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:883)
#1 _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:41)
#2 _asyncRunCallback (dart:async/schedule_microtask.dart:48)
#3 _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:84)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:131)
Looks like your Dart version is outdated < 1.9.2.
Try dart --version to get the version of your installed Dart SDK.
Current is 1.12.x.
Update 2018-03-20
During the migration phase to Dart 2 you might want to install Dart from the dev channel to get a 2.0.0-alpha.x version.
The newest stable version is 1.24.x
For example
brew install dart --devel
Update 2018-06-21
Now also supported:
brew install dart#2
For others who're facing a similar error, I suggest that you read the docs carefully. I didn't, hence I wasted quite some time looking out for the solution elsewhere, even though it was right in front of my eyes all the time: https://flutter.io/setup-macos/#update-your-path
I'm writing the commands down so that you can copy and paste them easily in your terminal window:
touch $HOME/.bash_profile
open $HOME/.bash_profile
Line 1 creates a text file named .bash_profile. Line 2 opens it.
Then the line given below has to be pasted in the text file:
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
Don't forget to save the file after pasting. flutter doctor should work with every Terminal window now.
Open your terminal and run this
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
then run flutter, it will work.
It's because you the path you set up is temporary. To add the path
export PATH=[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin:$PATH
[PATH_TO_FLUTTER_GIT_DIRECTORY] -> Folder where you downloaded flutter or cloned from git.
Then do
echo $PATH
Watch this video to easy install
https://www.youtube.com/watch?v=Em8igImhBKc