After I updated my iPhone to iOS 16.2 I encountered a problem that I don't have with another iPhone that has iOS 14 installed. Songs that used to go in the background now only go in the foreground. As a player I use just audio. This problem does not occur with Android. I don't see any programming problems otherwise the problem would also occur with the iPhone that has iOS 14 installed, whereas with this iPhone everything works correctly, as before.
In the console I have no error message apart from the one it has always given but has never been a problem.
[NowPlaying] [MRNowPlaying] Ignoring setPlaybackState because application does not contain entitlement com.apple.mediaremote.set-playback-state for platform
Now I would say this has been added but I don't remember if it was there before.
[Entitlements] MSVEntitlementUtilities - Process Runner PID[572] - Group: (null) - Entitlement: com.apple.mediaremote.external-artwork-validation - Entitled: NO - Error: (null)
With another simpler app with iOS 16.2 I have the same problem, and I also noticed an error message that may help find the problem
[BackgroundTask] Background Task 9 ("Flutter debug task"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this.
So now the audio can be heard perfectly in the foreground but if I put the app in the background when changing audio files the audio stops. This problem wasn't there before, and the fact that it works perfectly with iOS 14 suggests a problem with the iOS 16.2 update.
My Doctor -v
[✓] Flutter (Channel stable, 3.3.10, on macOS 12.6.2 21G320 darwin-x64, locale it-IT)
• Flutter version 3.3.10 on channel stable at /Users/carlosacchetti/Developer/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 135454af32 (5 weeks ago), 2022-12-15 07:36:55 -0800
• Engine revision 3316dd8728
• Dart version 2.18.6
• DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/carlosacchetti/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• 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.10+0-b96-7281165)
[✓] IntelliJ IDEA Community Edition (version 2021.1.1)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• 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
[✓] VS Code (version 1.74.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.56.0
[✓] Connected device (4 available)
• SM G780G (mobile) • RF8T30H0K2Y • android-arm64 • Android 13 (API 33)
• iPhone CS (mobile) • 00008110-000A5CD42682801E • ios • iOS 16.2 20C65
• macOS (desktop) • macos • darwin-x64 • macOS 12.6.2 21G320 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 108.0.5359.124
! Error: iPhone CS is busy: Fetching debug symbols for iPhone CS. Xcode will continue when iPhone CS is finished. (code -10)
! Error: Apple Watch di Carlo needs to connect to determine its availability. Check the connection between the device and its
companion iPhone, and the connection between the iPhone and Xcode. Both devices may also need to be restarted and unlocked.
(code 1)
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
#csacchetti I had a similar issue.
I'm mimicking the playlist behaviour but not using the ConcatenatingAudioSource, just switching tracks manually calling player.setAudioSource() with the proper index, and listening to the "completed" playbackState in order to skip to the next index.
Since I was using the player's 'LoopMode.off', after the 'completed' state was emitted, an 'idle' state was emitted as well. I think broadcasting this 'idle' state in iOS 16 might close the audio session.
I don't know if this is exactly what's happening, and I can't explain why it didn't occur in the previous iOS versions. But this fixed it for me.
Try to broadcast AudioProcessingState.ready when you get a ProcessingState.idle, so that the OS keep your session alive while you switch tracks:
processingState: {
ProcessingState.idle: Platform.isIOS ? AudioProcessingState.ready : AudioProcessingState.idle,
ProcessingState.loading: AudioProcessingState.loading,
ProcessingState.buffering: AudioProcessingState.buffering,
ProcessingState.ready: AudioProcessingState.ready,
ProcessingState.completed: AudioProcessingState.completed,
}[_player.processingState]!,
Related
I am using VS Code for Flutter developement since a long time and up until now, launching the web version from VS code has worked just fine. However, similar to what others have posted I now get a "Waiting for connection from debug service on Chrome...".
The Chrome window opens but the URL just says: "http://localhost:57698/" and the page is white.
If I click reload, the URL changes to "http://localhost:57698/#/" and the page loads correctly. This seem to match other peoples experience for this problem, that hot reloading or similar loads the page.
If I launch the web version from the command line with: "flutter run -d chrome" it also works fine. It is only when launching from VSCode it no longer works (and it has been ok for 2 years). I have tried to restart the whole computer as well as Chrome and VS code and I have done flutter clean, still the same. I have also tested on 2 different computers, no change. Is there some magic thing in Chrome that can get stuck or what could have happened?
My flutter doctor says that all is ok:
[✓] Flutter (Channel stable, 2.10.5, on macOS 13.2 22D49 darwin-arm, locale en-ES)
• Flutter version 2.10.5 at /Users/johanlantz/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 5464c5bac7 (10 months ago), 2022-04-18 09:55:37 -0700
• Engine revision 57d3bac3dd
• Dart version 2.16.2
• DevTools version 2.9.2
[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
• Android SDK at /Users/johanlantz/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 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• CocoaPods version 1.11.2
[✓] 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)
[✓] VS Code (version 1.74.3)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.58.0
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.119
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Downgrading the dart and flutter VS code plugins from 3.58.0 to 3.56.0 fixed this (on two separate MacBooks with the same issue).
The latest version of the plugin switched to a new API (because an old API is being removed). Unfortunately when running on the web, it appears as if the new API is available (the VM Service version number is high enough), but the API is unfortunately not actually available.
A fix is on the way - you can get it early by switching to the Pre-Release version of the extension:
I'm getting this error when I try to run my application on the iOS simulator:
Launching lib/main.dart on iPhone 14 Pro Max in debug mode...
Running Xcode build...
└─Compiling, linking and signing... 9,2s
Xcode build done. 27,9s
Connecting to the VM Service is taking longer than expected...
Still attempting to connect to the VM Service...
If you do NOT see the Flutter application running, it might have crashed. The device logs (e.g. from adb or XCode) might have more details.
If you do see the Flutter application running on the device, try re-running with --host-vmservice-port to use a specific port known to be available.
At the end of the Xcode build done. 27,9s print in the terminal, the App opens in the iOS simulator for a few milliseconds, but is instantly closed, and a crash screen from Xcode is opened.
Here is my flutter doctor -v:
[✓] Flutter (Channel master, 3.8.0-9.0.pre.18, on macOS 13.2 22D49 darwin-arm64, locale pt-BR)
• Flutter version 3.8.0-9.0.pre.18 on channel master at /Users/rafael/Documents/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f945ad99c3 (55 minutes ago), 2023-02-10 00:05:44 +0100
• Engine revision 40e17fb524
• Dart version 3.0.0 (build 3.0.0-218.0.dev)
• DevTools version 2.21.1
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc2)
• Android SDK at /Users/rafael/Library/Android/sdk
• Platform android-33, build-tools 33.0.0-rc2
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• 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.10+0-b96-7281165)
[✓] VS Code (version 1.75.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.58.0
[✓] Connected device (3 available)
• iPhone 14 Pro Max (mobile) • 49BFE69F-8CDD-4726-A6A4-60AC1E87E6E9 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.2 22D49 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 109.0.5414.119
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
I solved the problem by removing a package that I had in the application that has the pub google_mobile_ads in its .yaml, and as I am not implementing Ads in this App I did not configure the necessary items in AndroidManifest.xml and Info.plist.
I found a lot of this issue in production and still could not solved.
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.thitsarparami.app/com.ryanheise.audioservice.AudioServiceActivity}: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.thitsarparami.app-a-dcbjkGZG7bhB8y1Z4zZw==/base.apk"],nativeLibraryDirectories=[/data/app/org.thitsarparami.app-a-dcbjkGZG7bhB8y1Z4zZw==/lib/arm64, /system/lib64, /hw_product/lib64, /system/product/lib64]]] couldn't find "libflutter.so"
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3897)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4076)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:91)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2473)
at android.os.Handler.dispatchMessage(Handler.java:110)
at android.os.Looper.loop(Looper.java:219)
at android.app.ActivityThread.main(ActivityThread.java:8349)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1055)
Device specifications
Model name
Pixel 2 (virtual)
Manufacturer
Google
Android version
Android 9 (SDK 28)
Locale
th_TH
Screen size
1080 x 1920
Screen density (DPI)
441
RAM (total memory)
OpenGL ES version
ABI
armeabi
CPU
flutter doctor
[✓] Flutter (Channel stable, 3.0.5, on macOS 12.4 21F79 darwin-x64, locale en-GB)
• Flutter version 3.0.5 at /Users/aungmyooo/Development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f1875d570e (5 days ago), 2022-07-13 11:24:16 -0700
• Engine revision e85ea0e79c
• Dart version 2.17.6
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/aungmyooo/Library/Android/sdk
• Platform android-33, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• 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-7590822)
[✓] VS Code (version 1.69.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.44.0
[✓] Connected device (3 available)
• iPhone (mobile) • 06e02964e429eeebf29550b03ef955abe09891ef • ios • iOS 15.5 19F77
• macOS (desktop) • macos • darwin-x64 • macOS 12.4 21F79 darwin-x64
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114
[✓] HTTP Host Availability
• All required HTTP hosts are available
This is the salient part of the error message:
Fatal Exception: java.lang.RuntimeException: Unable to start activity ...
... couldn't find "libflutter.so"
This appears to be a build-time issue.
It's been reported multiple different times over multiple different versions. I see several "workarounds" ... but no "fix".
Specifically:
https://github.com/flutter/flutter/issues/32756
Seems like uninstalling the app and reinstalling fixed it, error
occured without changing anything in the code, just opened up Android
studio again and pressed the run button...
See also:
https://stackoverflow.com/a/65032771/421195
Flutter does not currently support building for x86 Android (See
Issue 9253).
Add following code under the buildTypes in android\app\build.gradle
buildTypes {
release {
ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86_64'
}
}
}
... and ...
https://stackoverflow.com/a/69998842/421195
In app level build.gradle following line should be added
defaultConfig {
...
ndk { abiFilters "armeabi", "x86", "armeabi-v7a","x86_64", "mips",
"mips64", "arm64-v8a" }
}
SUGGESTION: Review the threads, post back and let us know if any of the suggestions worked for you.
I tried to run my app i am getting the error as CocoaPods not installed. Skipping pod
install. When i run the app in the terminal using 'flutter run' it's working perfectly. I don't know why it's not working in Android studio.
Please find the error below.
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Warning: CocoaPods not installed. Skipping pod install.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
CocoaPods not installed or not in valid state.
Error launching application on iPhone 12 Pro Max.
Flutter doctor also i don't find any issue.
flutter doctor -v
[✓] Flutter (Channel stable, 3.0.4, on macOS 12.4 21F79 darwin-arm, locale en-GB)
• Flutter version 3.0.4 at /opt/homebrew/Caskroom/flutter/2.5.0/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 85684f9300 (2 weeks ago), 2022-06-30 13:22:47 -0700
• Engine revision 6ba2af10bb
• Dart version 2.17.5
• DevTools version 2.12.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/elamparithibalakrishnan/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
• 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 2020.3)
• 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.10+0-b96-7249189)
[✓] Connected device (3 available)
• iPhone 12 Pro Max (mobile) • 0C7D4F63-17B1-4E66-8277-767ED0672937 • ios • com.apple.CoreSimulator.SimRuntime.iOS-15-5
(simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 12.4 21F79 darwin-arm
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114
! Error: iPhone is not connected. Xcode will continue when iPhone is connected. (code -13)
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Can anyone please help me on this issue.
Thanks in advance.
Please help me!
The app was close to be finished and since I did run flutter upgrade to solve a bug I had to run:
flutter clean
flutter channel master
flutter upgrade
flutter run
and now its not starting anymore and the following code shows up..
Launching lib/main.dart on iPhone 12 Pro Max in debug mode...
Running Xcode build...
Xcode build done. 7,6s
Failed to build iOS app
Error output from Xcode build:
↳
** BUILD FAILED **
Xcode's output:
↳
/Users/patrickmeyer/AndroidStudioProjects/my_fitness_challenge/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORPlatform.m:140:55: error: 'currentRadioAccessTechnology' is deprecated: first deprecated in iOS 12.0 [-Werror,-Wdeprecated-declarations]
networkCurrentRadioAccessTechnology = networkInfo.currentRadioAccessTechnology;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
serviceCurrentRadioAccessTechnology
In module 'CoreTelephony' imported from /Users/patrickmeyer/AndroidStudioProjects/my_fitness_challenge/ios/Pods/GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/GDTCORPlatform.h:32:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator14.3.sdk/System/Library/Frameworks/CoreTelephony.framework/Headers/CTTelephonyNetworkInfo.h:154:61: note: 'currentRadioAccessTechnology' has been explicitly marked deprecated here
#property (nonatomic, readonly, retain, nullable) NSString* currentRadioAccessTechnology API_DEPRECATED_WITH_REPLACEMENT("serviceCurrentRadioAccessTechnology", ios(7.0, 12.0)) API_UNAVAILABLE(macos);
^
1 error generated.
PromisesObjC-crewhghtjvlepwbqltmbxkeqlsao
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
My flutter doctor looks good...
[✓] Flutter (Channel master, 1.26.0-2.0.pre.117, on Mac OS X 10.15.7 19H114
darwin-x64, locale de-DE)
• Flutter version 1.26.0-2.0.pre.117 at
/Users/patrickmeyer/Developer/flutter
• Framework revision 15c009b805 (17 hours ago), 2020-12-22 20:09:03 -0500
• Engine revision b7cd3f8e70
• Dart version 2.12.0 (build 2.12.0-173.0.dev)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/patrickmeyer/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.3, Build version 12C33
• CocoaPods version 1.10.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.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
1.8.0_242-release-1644-b3-6915495)
[✓] Connected device (2 available)
• iPhone 12 Pro Max (mobile) • 11ACA273-A0C3-405D-993A-A9AF9057887C • ios
• com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
• Chrome (web) • chrome •
web-javascript • Google Chrome 87.0.4280.88
• No issues found!
This could be because of compatible issues between flutter and Xcode version. Switch to the previous version and see if the error is there. Try other versions of flutter manually, using flutter version .
You can also run the program from Xcode, and try opening the emulator from there.
You can indeed use
flutter create .
to "repair" the current project to a limited degree.
If the ios/ or android/ folders are missing, they are created.
You can use this to switch native language Java/Kotlin, ObjC/Swift or to get the generated files updated to match newer Flutter versions by deleting the directories and running
flutter create . [options]
You need to re-apply previously made manual changes yourself though.